Re: PayloadNearQuery and AveragePayloadFunction

2012-02-03 Thread Peter Keegan
All term queries, including payload queries, deal only with words from the query that exist in a document. They don't know what other terms are in a matching document, due to the inverted nature of the index. Peter On Fri, Feb 3, 2012 at 11:50 AM, shyama wrote: > Hi Peter > Thanks for your repl

Re: PayloadNearQuery and AveragePayloadFunction

2012-02-03 Thread shyama
Hi Peter Thanks for your reply. I guess I found the problem. scorePayload function is only called for query terms. Problem was, when I was retrieving payloads for each tokens in token stream, it was return misleading payloads due to the fact that I did not skip TermPositions that does not belongs

Re: PayloadNearQuery and AveragePayloadFunction

2012-02-03 Thread Peter Keegan
AveragPayloadFunction is just what it sounds like: return numPayloadsSeen > 0 ? (payloadScore / numPayloadsSeen) : 1; What values are you seeing returned from PayloadHelper.decodeFloat ? Peter On Fri, Feb 3, 2012 at 4:13 AM, shyama wrote: > Hi Peter > I have checked payload associated with term

Re: PayloadNearQuery and AveragePayloadFunction

2012-02-03 Thread shyama
Hi Peter I have checked payload associated with terms, and they are fine in the index. I was not clear enough I believe. When I say interested in class A, then scorePayload function returns 3 for only for class A terms. Again, When I say interested in class B, then my scorePayload function returns

Re: PayloadNearQuery and AveragePayloadFunction

2012-02-02 Thread Peter Keegan
I don't quite follow what you're doing, but is it possible that your payloads are not on the desired terms when you indexed them? The first explanation shows that the matching document contained "luteinizing hormone" in both fields 'AbstractText' and 'AbstractTitle'. The average payload value was '

Re: PayloadNearQuery

2009-12-22 Thread Grant Ingersoll
ing, any other ideas then ? > > -Original Message- > From: Uwe Schindler [mailto:u...@thetaphi.de] > Sent: Monday, December 21, 2009 11:18 PM > To: java-user@lucene.apache.org > Subject: RE: PayloadNearQuery > > Then I have no other idea how to solve this. It seems

RE: PayloadNearQuery

2009-12-21 Thread Elias Khsheibun
You are right, that is the behavior that I'm getting, any other ideas then ? -Original Message- From: Uwe Schindler [mailto:u...@thetaphi.de] Sent: Monday, December 21, 2009 11:18 PM To: java-user@lucene.apache.org Subject: RE: PayloadNearQuery Then I have no other idea how to

RE: PayloadNearQuery

2009-12-21 Thread Uwe Schindler
> Sent: Monday, December 21, 2009 10:05 PM > To: java-user@lucene.apache.org > Subject: Re: PayloadNearQuery > > I don't think that will work, as I don't believe that the SpanQueries > delegate scoring to the subclauses. Instead, they just rely on iterating > the spans. &

Re: PayloadNearQuery

2009-12-21 Thread Grant Ingersoll
I don't think that will work, as I don't believe that the SpanQueries delegate scoring to the subclauses. Instead, they just rely on iterating the spans. -Grant On Dec 21, 2009, at 2:44 PM, Uwe Schindler wrote: > It is as you describe: > > PayloadTermQuery is a subclass of SpanQuery. So creat

RE: PayloadNearQuery

2009-12-21 Thread Elias Khsheibun
),new AveragePayloadFunction()); for (int i=1 ; imailto:u...@thetaphi.de] Sent: Monday, December 21, 2009 9:45 PM To: java-user@lucene.apache.org Subject: RE: PayloadNearQuery It is as you describe: PayloadTermQuery is a subclass of SpanQuery. So create a SpanNearQuery

RE: PayloadNearQuery

2009-12-21 Thread Uwe Schindler
It is as you describe: PayloadTermQuery is a subclass of SpanQuery. So create a SpanNearQuery with slop=0 and order=true and add first the PayloadNearQuery, then the rest of the phrase terms as SpanTermQuery in order of appearance. Uwe - Uwe Schindler H.-H.-Meier-Allee 63, D-28213 Bremen htt