Hi, I'm working on an application which requires a complex scoring (based on semantics analysis). The scoring must be highly configurable, and I've found ways to do that, but I'm facing a discrete but annoying problem. All my queries are, basically, complex span queries. I mean for example a SpanNearQuery which embeds a SpanOrQuery which itself may embed another SpanNearQuery etc...
I've followed the instructions at http://lucene.zones.apache.org:8080/hudson/job/Lucene-Nightly/javadoc/org/apache/lucene/search/package-summary.html#changingScoring about changing scoring. The problem is that a document score is highly dependent on *what* matched, and that the getSpans() method on spanqueries does not provide that kind of information. I created my own SpanQuery subclasses which override the createWeight method so that the scorer used is my own too. It basically replaces the SpanScorer, and should recurse the spans tree to compose a score based on the type of subqueries (near, and, or, not) and what matched. The problem is that the getspans() methods that exists in Lucene are either anonymous classes which I cannot browse, or that I have not access to the required information. Basically, in a SpanOrQuery, I am not able to find out what matched. Have any of you faced that kind of problem, and found out an elegant way to do it without having to completely rewrite each getSpans() method for all types of queries (this is basically what was done in a previous version of the application) ? Thanks, Cedric -- View this message in context: http://www.nabble.com/Span-queries-and-complex-scoring-tf4422915.html#a12615745 Sent from the Lucene - Java Users mailing list archive at Nabble.com. --------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]