What do you mean by a custom one - please explain. I must use a
PayloadTermQuery ?

And for the TermPositionPayloadTokenFilter there is a method that is not
used - incrementToken (only used in the main method) ... I didn't see in the
code the place that examines if the query term is at an even offset of the
document I can see it is only called from the main method - but how should
this work all together ?

Thank you.


> If I need to override the QueryParser
> to return PayloadTermQuery, what
> function for PayloadFunction should I use in the constructor (If you 
> can show me an example).

I am not sure about that. Maybe custom one.

> In your code I didn't see an indexer, will this work with the regular 
> IndexWriter but with the new Analyzer that you overloaded

No, at index time [IndexWriter] you are going to use a new analyzer that
uses WhitespaceTokenizer  + TermPositionPayloadTokenFilter.

PayloadAnalyzer will be used at query time. [QueryParser]

You need to setSimilarity(new CustomSimilarity) of both indexer and
searcher.



---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to