I think they do a proximity result based on keyword matches. So... If you search for "lucene" and the document returned has this word at the very start and the very end of the document, then you will see the two sentences (sequences of words) surrounding the two keyword matches, one from the start of the document and one from the end.

How you determine which words from the result you include in the summary is up to you. The problem with this it that in Lucene-land you have to store the content of the document inside in index verbatim (so you can get arbitrary portions of it out). This means your index will be larger than it really needs to be.

I usually just store the first 255 characters in the index and use this as a summary. It's not as good as Google, but it seems to work ok.

----- Original Message ----- From: "Ben" <[EMAIL PROTECTED]>
To: "Lucene" <[email protected]>
Sent: Friday, January 28, 2005 5:08 PM
Subject: Search results excerpt similar to Google



Hi

Is it hard to implement a function that displays the search results
excerpts similar to Google?

Is it just string manipulations or there are some logic behind it? I
like their excerpts.

Thanks

---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]




---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to