faceting over field not in all documents

classic Classic list List threaded Threaded
4 messages Options
Reply | Threaded
Open this post in threaded view
|

faceting over field not in all documents

Rebecca Watson
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 :)
Reply | Threaded
Open this post in threaded view
|

Re: faceting over field not in all documents

iorixxx
> 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 ?


     
Reply | Threaded
Open this post in threaded view
|

RE: faceting over field not in all documents

Jonathan Rochkind-2
In reply to this post by Rebecca Watson
> 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
Reply | Threaded
Open this post in threaded view
|

Re: faceting over field not in all documents

Rebecca Watson
brilliant! thanks very much for your help :)

On 13 July 2010 21:47, Jonathan Rochkind <[hidden email]> 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