lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Devshree Sane <devshree.s...@gmail.com>
Subject Re: Using FastVectorHighlighter for snippets
Date Thu, 23 Sep 2010 17:09:23 GMT
One more observation.
The length of the snippet returned is not equal to the  fragment length
specified.
Does anyone know the reason why?

On Wed, Sep 22, 2010 at 3:05 PM, Devshree Sane <devshree.sane@gmail.com>wrote:

> Thanks for your reply Koji.
>
> On Wed, Sep 22, 2010 at 4:51 AM, Koji Sekiguchi <koji@r.email.ne.jp>wrote:
>
>>  (10/09/22 3:24), Devshree Sane wrote:
>>
>>> I am a bit confused about the parameters that are passed to the
>>> FastVectorHighlighter.getBestFragments() method. One parameter is a
>>> document
>>> id and another is the maximum number of fragments. Does it mean that only
>>> the maximum number of fragments will be retrieved from document with
>>> given
>>> id (even if there are more fragments in the same document)?
>>>
>>>  Correct.
>>
>>
> I did a little experiment for this. Following are my observations.
> Changing the number of characters from 100 to 1000 decreased the number of
> fragments returned.
>
> Is this because the document text was covered with a few 1000 character
> fragments? If so, then this means that one fragment can contain more than
> one occurrence of the query term. Is this so? If yes, is there a way to find
> the number of occurrences of the query term inside a particular
> snippet/fragment?
>
> Also is there a way to get the beginning and ending positions/offsets in
> the document of the snippet/fragment being returned?
>
>
>
>
>

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