lucene-general mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Mattew Johnstein <>
Subject Re: Position offsets for Phrase queries
Date Mon, 06 Jun 2011 20:28:05 GMT

Thanks for the tip. By using the FieldTermStack and FieldPhraseList(fieldFragList.fragInfos)
I was able to extract the startOffset and endOffset of a particular Phrase query. However,
I am trying to get the position offset. How could we get that?


From: Koji Sekiguchi <>
Sent: Sunday, June 5, 2011 3:17 AM
Subject: Re: Position offsets for Phrase queries

(11/06/05 7:08), Mattew Johnstein wrote:
> Hi all,
> I am trying to figure out how Lucene gets the offset positionsinformation for Phrase/MultiPhrase
queries when it is doing the highlighting with "hl.useFastVectorHighlighter=true" .
> I know that using FVH, Lucene is able to get the term positions of the termSet from the
TermVectorComponent. But for phrase queries how does Lucene get the offset position of only
the "exact phrase" match?


I'm not sure this is the answer you wanted, but look at:

FVH constructs QueryPhraseMap from user query and FieldTermStack from
TermFreqVector info in the index.

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message