You are viewing a plain text version of this content. The canonical link for it is here.
Posted to java-user@lucene.apache.org by Fabiano Nunes <fa...@nunes.me> on 2010/12/01 13:15:33 UTC

PayloadSpanUtil and unstored fields.

PayloadSpanUtil can't retrieve payloads from unstored fields (Field.Store.NO).
Since the payloads is stored in terms, why do I need store the fields?
Example:
PayloadSpanUtil psu = new PayloadSpanUtil(ireader);
 Collection<byte[]> tests = psu.getPayloadsForQuery(query);
Assert.assertTrue((tests.size() > 0)); // <------- tests is always 0 if the
field is Field.Store.NO

Thanks.

Re: PayloadSpanUtil and unstored fields.

Posted by Fabiano Nunes <fa...@nunes.me>.
Sorry. I'm opening it again.

On Wed, Dec 1, 2010 at 10:18 AM, Fabiano Nunes <fa...@nunes.me> wrote:

> Please, ignore this thread.
> It's *my misunderstanding* of query.getSpans().
>
> Thanks!
>
> On Wed, Dec 1, 2010 at 10:15 AM, Fabiano Nunes <fa...@nunes.me> wrote:
>
>> PayloadSpanUtil can't retrieve payloads from unstored fields (
>> Field.Store.NO). Since the payloads is stored in terms, why do I need
>> store the fields?
>> Example:
>>  PayloadSpanUtil psu = new PayloadSpanUtil(ireader);
>>  Collection<byte[]> tests = psu.getPayloadsForQuery(query);
>> Assert.assertTrue((tests.size() > 0)); // <------- tests is always 0 if
>> the field is Field.Store.NO
>>
>> Thanks.
>>
>
>

Re: PayloadSpanUtil and unstored fields.

Posted by Fabiano Nunes <fa...@nunes.me>.
Please, ignore this thread.
It's *my misunderstanding* of query.getSpans().

Thanks!

On Wed, Dec 1, 2010 at 10:15 AM, Fabiano Nunes <fa...@nunes.me> wrote:

> PayloadSpanUtil can't retrieve payloads from unstored fields (
> Field.Store.NO). Since the payloads is stored in terms, why do I need
> store the fields?
> Example:
>  PayloadSpanUtil psu = new PayloadSpanUtil(ireader);
>  Collection<byte[]> tests = psu.getPayloadsForQuery(query);
> Assert.assertTrue((tests.size() > 0)); // <------- tests is always 0 if the
> field is Field.Store.NO
>
> Thanks.
>