lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Radha Sreedharan <radh...@gmail.com>
Subject Re: Highlight - SimpleSpanFragment
Date Sun, 14 Jun 2009 01:49:49 GMT
Currently I am following a long drawn approach where
1) I find index of the matching text in the original
2) For a list of words to the left of index and to the right of index+length
of matching text
3) Then a pick some words from the 1st list and prepend to my  matching text
text and from my second list and append to my  matching text


However I really feel that I am doing something redundant and that Lucene
should be returning me  the matching text !!!

Pls Do help me out in this .

On Fri, Jun 12, 2009 at 11:25 PM, Radha Sreedharan <radha84@gmail.com>wrote:

> Hi all,
>
> I am using *SimpleSpanFragment *to find the words a few positions around
> the match.
>
> I am specifying the number of characters, which is the second parameter of
> the *SimpleSpanFragment *constructor .
>
> However, it always gives the words to the right of the match and does not
> give me the words to the left. ( I need both sides ie around the match ).
>
> On searching through the existing material on the forum, I can gather that
> getting the words around the match is possible. But, the examples I saw were
> for SimpleFragmenter
>
> Is the issue because I am using *SimpleSpanFragment ?  *Why shouldnt it
> work for *SimpleSpanFragment  ?
> *
> Any help will be deeply appreciated..*
> *
> Regards,
> Radha
>

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