On Wed, Aug 22, 2012 at 10:36 AM, Robert Muir <rcm...@gmail.com> wrote: > On Tue, Aug 21, 2012 at 7:42 AM, shashank <shashank91.b...@gmail.com> wrote: >> Hello, >> >> I am working on a project wherein each entity to be ranked is not a single >> document but infact a group of documents. >> >> So, the ranking not only involves standard search engine scoring parameters >> but also the association of documents within an entity/group i.e. >> association of documents within the group also contributes to the ranking >> score. > > You may want to look at Lucene's block join module > (http://lucene.apache.org/core/4_0_0-BETA/join/index.html): combined > with IndexWriter's add/updateDocuments functionality which lets you > add documents as a 'group'. > Currently I think the way in which the group is scored is just an enum > with a fixed set of choices (ScoreMode), so you might have to modify > the source code at the moment if you have a sophisticated way of > scoring the group of documents, but this would be nice to fix so that > its something extensible...
Also look at grouping module. If you have no parent documents/fields (ie only child docs that must be grouped/scored according to some criteria) then grouping should work. But Robert is right: the scoring of a group is fairly simplistic now ... so you may need to tweak the code to do what you need (and please send patches back!). Mike McCandless http://blog.mikemccandless.com