List Info

Thread: Result grouping options




Result grouping options
country flaguser name
United Kingdom
2007-09-26 08:00:07
Hello,

For the project I'm working on now it is important to group
the results 
of a query by a "product" field. Documents
belong to only one product and there will never be more than
10 
different products alltogether.

When searching through the archives I identified 3 options:

1) [[Client-side XSLT]]
2) Faceting and querying all possible product facets
3) Field collapsing on product field (SOLR-236)

Option 1 is not feasable.
Option 2 would be possible, but 10 queries for every single
initial 
query is not really a good idea either.
Option 3 seems like the best option as far as I undestand it
but it only 
exists as a patch.

Is it possible to use faceting to not only get the facet
count but also 
the top-n documents for every facet
directly? If not, how hard would it be to implement this as
an extension?

If its not possible at all, would field collapsing really be
a solution 
here and can it somehow be used
with Solr.1.2?

Thanks a lot!

Thomas

Re: Result grouping options
user name
2007-09-29 23:58:54
: Is it possible to use faceting to not only get the facet
count but also the
: top-n documents for every facet
: directly? If not, how hard would it be to implement this
as an extension?

not hard ... a custom request handler could subclass 
StandardRequestHandler, call super.handleRequest, and then
pull the field 
faceting info out of the response object, and fetch a
DocList for each of 
the top N field constraints.




-Hoss


[1-2]

about | contact  Other archives ( Real Estate discussion Medical topics )