You are viewing a plain text version of this content. The canonical link for it is here.
Posted to general@lucene.apache.org by Mattew Johnstein <mj...@yahoo.com> on 2011/06/05 00:08:54 UTC
Position offsets for Phrase queries
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?
Thanks,
Mattew
Re: Position offsets for Phrase queries
Posted by Koji Sekiguchi <ko...@r.email.ne.jp>.
Mattew,
What did you mean by "position offset"? If you meant position, each member
in FieldTermStack should have it. Please see the legend in the bottom line of step 2.
koji
--
http://www.rondhuit.com/en/
(11/06/07 5:28), Mattew Johnstein wrote:
> Koji,
>
> 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?
>
> Mattew
>
>
>
> ________________________________
> From: Koji Sekiguchi<ko...@r.email.ne.jp>
> To: general@lucene.apache.org
> 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?
>
> Mattew,
>
> I'm not sure this is the answer you wanted, but look at:
>
> https://builds.apache.org//job/Lucene-trunk/javadoc/contrib-highlighter/org/apache/lucene/search/vectorhighlight/package-summary.html#package_description
>
> FVH constructs QueryPhraseMap from user query and FieldTermStack from
> TermFreqVector info in the index.
>
> koji
Re: Position offsets for Phrase queries
Posted by Mattew Johnstein <mj...@yahoo.com>.
Koji,
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?
Mattew
________________________________
From: Koji Sekiguchi <ko...@r.email.ne.jp>
To: general@lucene.apache.org
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?
Mattew,
I'm not sure this is the answer you wanted, but look at:
https://builds.apache.org//job/Lucene-trunk/javadoc/contrib-highlighter/org/apache/lucene/search/vectorhighlight/package-summary.html#package_description
FVH constructs QueryPhraseMap from user query and FieldTermStack from
TermFreqVector info in the index.
koji
--
http://www.rondhuit.com/en/
Re: Position offsets for Phrase queries
Posted by Koji Sekiguchi <ko...@r.email.ne.jp>.
(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?
Mattew,
I'm not sure this is the answer you wanted, but look at:
https://builds.apache.org//job/Lucene-trunk/javadoc/contrib-highlighter/org/apache/lucene/search/vectorhighlight/package-summary.html#package_description
FVH constructs QueryPhraseMap from user query and FieldTermStack from
TermFreqVector info in the index.
koji
--
http://www.rondhuit.com/en/