Re: SpanTermQuery getSpans

2014-04-02 Thread Martin Líška
Gregory, that was indeed my problem. Thank you very much for your support. Martin This is a reply to http://mail-archives.apache.org/mod_mbox/lucene-java-user/201404.mbox/%3CCAASL1-8jRbEG%3DLi96eDLY-Pr_zwev6vk4vk4BW_ryKF1Dnb4KA%40mail.gmail.com%3E On 1 April 2014 23:52, Martin Líška wrote: >

Re: SpanTermQuery getSpans

2014-04-01 Thread Gregory Dearing
Martin, Note that the documents within each index segment (leaf context) are zero indexed. Meaning that each segment in your index will contain a different document with a segment-relative docId of 0. When working inleaf context, you can calculate a document's absolute docId with something like:

SpanTermQuery getSpans

2014-04-01 Thread Martin Líška
Dear all, I'm experiencing troubles with SpanTermQuery.getSpans(AtomicReaderContext context, Bits acceptDocs, Map termContexts) method in version 4.6. I want to use it to retrieve payloads of matched spans. First, I search the index with IndexSearcher.search(query, limit) and I get TopDocs. In th