On Mar 22, 2011, at 6:43 AM, Dawn Zoë Raison wrote: > Hi Folks, > > Before I run off and reinvent the wheel here - has anyone done any form of > result grouping with lucene? > > My use case looks something like this: > Newspaper pages are stored as documents in the lucene index. > I need to list the newpapers that match my criteria in date order, so that I > can then in a subsequent search enumerate the first n pages from each. n is > derived from the UI - in this case the screen width the user has available. > Ideally I'd want to pull all papers for a given date - so a way to pull a > result set that identifies a set of dates that have pages stored against them > would be ideal. It seems to me that the only way to do this at present would > be to define a custom collector and aggregate such a result set on the fly? > > My reason for wanting to group is so that I can easily compute the > next/previous start indexes as the user browses through the timeline. If I > have to include the (variable) page count each time it gets convoluted. More > so since some pages may be missing from each paper. > > Any thoughts appreciated.
Have you looked at Solr and date faceting capabilities? Also, it has result grouping, but I think you are just describing faceting/filtering. -------------------------- Grant Ingersoll http://www.lucidimagination.com/ Search the Lucene ecosystem docs using Solr/Lucene: http://www.lucidimagination.com/search --------------------------------------------------------------------- To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org For additional commands, e-mail: java-user-h...@lucene.apache.org