You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Rebecca Watson <be...@gmail.com> on 2010/07/13 13:30:13 UTC

faceting over field not in all documents

hi,

has anyone had experience with faceting over a field where the field
is not present
in all documents within the index?

i'm hoping that -- faceting simply calculates+returns the counts for docs that
have the field present while results may still contain documents that don't
have the facet field (i.e. the field faceted on)?

thanks for any help, i guess if no one has tried this i'll let you know :)

bec :)

Re: faceting over field not in all documents

Posted by Rebecca Watson <be...@gmail.com>.
brilliant! thanks very much for your help :)

On 13 July 2010 21:47, Jonathan Rochkind <ro...@jhu.edu> wrote:
>> i'm hoping that -- faceting simply calculates+returns the counts for docs that
>> have the field present while results may still contain documents that don't
>> have the facet field (i.e. the field faceted on)?
>
> Yes, that's exactly what happens. You can use facet.missing to get a count for documents with no value in the facet field too, if you want.
>
> Jonathan

RE: faceting over field not in all documents

Posted by Jonathan Rochkind <ro...@jhu.edu>.
> i'm hoping that -- faceting simply calculates+returns the counts for docs that
> have the field present while results may still contain documents that don't
> have the facet field (i.e. the field faceted on)?

Yes, that's exactly what happens. You can use facet.missing to get a count for documents with no value in the facet field too, if you want. 

Jonathan

Re: faceting over field not in all documents

Posted by Ahmet Arslan <io...@yahoo.com>.
> i'm hoping that -- faceting simply calculates+returns the
> counts for docs that
> have the field present while results may still contain
> documents that don't
> have the facet field (i.e. the field faceted on)?

http://wiki.apache.org/solr/SimpleFacetParameters#facet.missing ?