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 Shishir Jain <sh...@gmail.com> on 2010/03/12 07:13:17 UTC

How to get Facet results only on a range of search results documents

Hi,

I would like to return Facet results only on the range of search results
(say 1-100) not on the whole set of search results. Any idea how can I do
it?

Here is the reason I want to do it:

My document set is quite huge: About 100 Million documents. When a query is
run, the returned results are on average about 10000 or so. And I want to do
faceting on the defined window of 100 documents around the result set the
user is looking at, as the faceting is most relevant only around the result
document the user is looking at.

Thanks & Regards,
Shishir Jain

Re: How to get Facet results only on a range of search results documents

Posted by Chris Hostetter <ho...@fucit.org>.
: I would like to return Facet results only on the range of search results
: (say 1-100) not on the whole set of search results. Any idea how can I do
: it?

Thta's pretty trivial to do in the client layer (fetch the first 100 
results, iterate over them, and count per facet field)

If you really wanted this to happen server side, you could write a custom 
subclass of the QueryComponent that used the DocList to build and replace 
the DocSet ... that way faceting would only know about hte documents on 
the current page.


-Hoss