lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Martin Líška <>
Subject Re: SpanTermQuery getSpans
Date Wed, 02 Apr 2014 21:05:39 GMT

that was indeed my problem. Thank you very much for your support.


This is a reply to

On 1 April 2014 23:52, Martin Líška <> wrote:
> Dear all,
> I'm experiencing troubles with SpanTermQuery.getSpans(AtomicReaderContext context, Bits
acceptDocs, Map<Term,TermContext> termContexts) method in version 4.6. I want to use
it to retrieve payloads of matched spans.
> First, I search the index with, limit) and I get TopDocs.
In these TopDocs, there is a certain document A. I know, that the query is an instance of
PayloadTermQuery, so I search for spans using query.getSpans(indexReader.leaves().get(0),
null, new HashMap()); but this wont return the spans for the document A.
> I observed, that getSpans method won't return any spans for documents with IDs greater
than say 900, even though documents with IDs greater than 900 were returned in the original
search. All other documents below ID 900 are returned sucessfully from getSpans method.
> I also tried passing all the leaves of indexReader to getSpans with no effect.
> Please help.
> Thank you

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message