for my thesis work (Question Answering) I used to retrieve first the
document and then play with java to extract the needed answer.
for your case what you will do is first locate the positions of the
query terms in the document (in this case it might be distributed
throughout the document - hence difficult to get the 15/20 words) then
count something10 words forward and backward and extract the match.
this is the way I handle my problem. Hope there might be different I
dea too

Seid M.

On 5/25/09, KK <dioxide.softw...@gmail.com> wrote:
> Hi All,
> I'm trying to index some non-english web pages and I'm keeping all the
> content of the page in a single field and the searches are working fine as
> well. Now when I search for some query it gives the complete page, which is
> expected. Now I want to restrict the showing of results to say 20 words
> around the match, something like google does, otherwise we cann't make users
> to look for a match in the whole page content[I'll use highlighter after
> this is done]. So getting positions of the matched word/phrase might help so
> that I can extract some words before and some words after that and will show
> that to end user. Any idea on doing the same will be very helpful. Thank
> you.
>
> KK.
>


-- 
"RABI ZIDNI ILMA"

---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org

Reply via email to