Re: Retrieving payload attribute in highlighter

2010-12-01 Thread Fabiano Nunes
Thanks Erick. This solved my problem. Now I can retrieve payloads using on the fly readers. On Tue, Nov 30, 2010 at 6:49 PM, Erick Erickson wrote: > Warning, ignorance alert. I'm not all that up on the guts of this one. > > But take a look at MemoryIndex, there's an example there. The gist > is

Re: Retrieving payload attribute in highlighter

2010-11-30 Thread Erick Erickson
Warning, ignorance alert. I'm not all that up on the guts of this one. But take a look at MemoryIndex, there's an example there. The gist is that you create a MemoryIndex on the fly and index the doc in question into it, then you can get the IndexReader from the IndexSearcher associated with the M

Re: Retrieving payload attribute in highlighter

2010-11-30 Thread Fabiano Nunes
Ok. I'll go ahead. Just one more thing: the apidocs warning says "(...) IndexReader should only contain doc of interest, best to use MemoryIndex (..)". How can I build a reader with a subset of docs? Thanks! On Tue, Nov 30, 2010 at 2:31 PM, Erick Erickson wrote: > That's the Lucene developers' w

Re: Retrieving payload attribute in highlighter

2010-11-30 Thread Erick Erickson
That's the Lucene developers' way of saying "we don't guarantee backwards compatibility". The devs go to great lengths to honor the contract of not changing public APIs without going through a deprecation process, which causes quite a lot of work. But that conflicts with the desirable process of h

Re: Retrieving payload attribute in highlighter

2010-11-30 Thread Fabiano Nunes
I've figured out the PayloadSpanUtil class. It's exactly what I'm expecting. But, I'm concerned about the warning message in API docs (indeed, I think I dont understand it). There is any other approach? Can I have the same results retrieving the termPositions without performance issues? Thanks. O