Hi. I think we are doing similar things, at least I am trying to implement document boosting with pagerank. Having issues of howto appky the scoring of specific docs without actually reindex them. I feel something should be done at query time which looks at external data but do not know howto implement that. Do you ?
Kindly //Marcus On Sun, Apr 12, 2009 at 8:25 PM, Steven Bethard <beth...@stanford.edu>wrote: > On 4/10/2009 5:13 PM, Steven Bethard wrote: > > On 4/10/2009 12:56 PM, Steven Bethard wrote: > >> I need to have a scoring model of the form: > >> > >> s1(d, q)^a1 * s2(d, q)^a2 * ... * sN(d, q)^aN > >> > >> where "d" is a document, "q" is a query, "sK" is a scoring function, and > >> "aK" is the exponential boost factor for that scoring function. > [snip] > > My third thought was to create a wrapper class that takes a Query and an > > exponential boost factor. The wrapper class would delegate to the Query > > for all methods except .weight(). For .weight(), it would return a > > Weight wrapper that delegated to the Weight for all methods except > > .getValue(). For .getValue(), it would return the original value, raised > > to the appropriate exponent. But will that really work, or am I going to > > mess up the normalization or something else? > > I've started playing around with this route. I'm not 100% sure I've > implemented all the Query and Weight methods correctly (the > documentation for these is pretty terse), but assuming I have it right, > that should give me the ability to create the "s(d, q)^a" terms, by just > coming up with a Query for each term, and then wrapping it in my wrapper > class to add the exponential boost. > > So to finish up the scoring, I want to create a Query that takes all the > sub-queries and just multiplies their scores together. This seems like > something Lucene must already be doing somewhere. I looked at > BooleanQuery hoping maybe that was already doing something like this, > but BooleanWeight.getValue() just seems to return the boost factor, so I > guess not. > > So does anyone know of an existing Query class that will simply multiply > its sub-queries together? > > More generally, is there any other documentation about Lucene's scoring > mechanisms than the following? There isn't quite enough detail (or I > don't know how to read it) to answer my questions here. > > http://lucene.apache.org/java/2_4_1/scoring.html > > http://lucene.apache.org/java/2_4_1/api/org/apache/lucene/search/package-summary.html > > Also, I seem to have gotten very little response to my questions here, > perhaps because they are asking about the expert interfaces? Is there a > better place to ask such questions? > > Thanks, > > Steve > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > > -- Marcus Herou CTO and co-founder Tailsweep AB +46702561312 marcus.he...@tailsweep.com http://www.tailsweep.com/ http://blogg.tailsweep.com/