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 <shyamasree_s...@yahoo.com> wrote: > 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 to current document. > > I still wonder, whether AveragePayloadFunction will consider query terms > for > "payload seen so far", or all terms in current field of current document. I > will check this out. In my previous testing I found, it only considers > query > terms. > > Thanks again. > Shyama > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/PayloadNearQuery-and-AveragePayloadFunction-tp3710454p3713653.html > Sent from the Lucene - Java Users mailing list archive at Nabble.com. > > --------------------------------------------------------------------- > To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org > For additional commands, e-mail: java-user-h...@lucene.apache.org > >