You can facet on multivalued fields, but i don't think its going to return results like you want. The facet counts are the number of documents that both match the query and have a particular field term (no matter how many times). It won't return the number of times a term occurs over all those documents like I think you're expecting in your example. I'm not sure of any search component that currently does that. You might want to ask the solr user lists:
http://lucene.apache.org/solr/mailing_lists.htmlHope I understood your question and was helpful,
- Donovan
On May 5, 2011 10:48am, chilakilez <
chila...@gmail.com> wrote:
> $extraSettings = array("facet" => "true", # Turn faceting on
>
> 'facet.mincount' => "1", # Just displays those that
>
> are above 0
>
> 'facet.limit' => '-1'), # facet.limit by
>
> default will only load 100 faceted categories, -1 (infinite)
>
> 'facet.field' => 'words'); # facet.field
>
> Facet words field
>
>
>
> $response = $this->_solr->search($query, $pim_offset, $pim_limit,
>
> $extraSettings);
>
>
>
> Does the above work for multivalued fields? i have a multivalued field
>
> called words, and for some reason i'm unable to facet it via solr-php-
>
> client.
>
> Am I missing something in here?
>
> My problem is that is one document contains two or more words, the
>
> faceting doesn't add these up, so if have:
>
> 1
>
> Hello
>
>
>
> builders
>
> builders
>
> buildings
>
> buildings
>
> construction
>
> construction
>
> green
>
> green
>
>
>
>
>
> It just shows up:
>
>
>
>
>
> 1
>
> 1
>
> 1
>
> 1
>
>
>
> I'm not sure if this a solr-php-client related question (as faceting
>
> in other fields works fine) or more towards Solr functionality
>
> itlsef...
>
> Would appreciate the help
>
>
>
> --
>
> You received this message because you are subscribed to the Google Groups "PHP Solr Client" group.
>
> To post to this group, send email to
php-sol...@googlegroups.com.
>
> To unsubscribe from this group, send email to
php-solr-clie...@googlegroups.com.
>
> For more options, visit this group at
http://groups.google.com/group/php-solr-client?hl=en.
>
>
>
>