java-user@lucene.apache.org
[Top] [All Lists]

Re: Indexing and Searching from within a single Document

Subject: Re: Indexing and Searching from within a single Document
From: Karl Wettin
Date: Mon, 07 Apr 2008 21:19:51 +0200
You want to break down your book in mutiple documents, perhaps one per paragraph or so?

I hope this helps.

    karl



syedfa skrev:
Dear Fellow Java/Lucene developers:

I am writing an application where a user is able to search for keywords from
within a single book.  When the user conducts a search, he/she should
receive a set of results that show the sentence/phrase within the book where
the keyword is found.  Unfortunately, all of the examples that I have for
searching using Lucene discuss the concept of searching multiple documents,
instead of within a single document.  I have written an application that
creates an index of this book, but I now want to search it.  In the result
set, I would like the keyword(s) to be highlighted using Lucene's
HighLighter feature.  Once the user clicks on the hit from the result set
list that they are looking for, the application should take them directly
within to that section of the book where that keyword is found.  The book
that I have indexed is in xml format.

My question is, how would I write an application that allows me to search a
single document, and present a set of results to the user that list portions
of text from the book that contains the user's keyword, instead of
presenting a list of document titles where that keyword is found?

Any help would be greatly appreciated.  Thanks to all who reply.

Sincerely;
Fayyaz


---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscribe@xxxxxxxxxxxxxxxxx
For additional commands, e-mail: java-user-help@xxxxxxxxxxxxxxxxx

<Prev in Thread] Current Thread [Next in Thread>