lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From DKorah <dcko...@gmail.com>
Subject RE: Indexing and Searching from within a single Document
Date Tue, 08 Apr 2008 13:54:17 GMT

Lucene is a library to index data.
Its up to you to drive it the way you want.
Think about the search result, how would your user like to see the
information that the search page has brought up. Do they want to know page
numbers, or is it section number, or it could be even sentence number.
Depending on that breakup and stick the positional information like chapter,
paragraph, section number, sentence number etc along with the fragment of
the book and make a document. Dont forget to add a metadata to identify the
book.

Hope that helped.


jing_gao wrote:
> 
> Hi,
> 
> Some indexing tools give configurable options, you can use separators in a
> single documents (such as "//", "%%%"), and indexing engine would treat
> each block as a separate document.
> Does Lucene have this type of functionalities?
> 
> Thanks!
> Jing
> 
> -----Original Message-----
> From: syedfa [mailto:fayyazuddin@gmail.com] 
> Sent: Monday, April 07, 2008 10:13 AM
> To: java-user@lucene.apache.org
> Subject: Indexing and Searching from within a single Document
> 
> 
> 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
> -- 
> View this message in context:
> http://www.nabble.com/Indexing-and-Searching-from-within-a-single-Document-tp16537558p16537558.html
> Sent from the Lucene - Java Users mailing list archive at Nabble.com.
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
> 
> 
> 
> ---------------------------------------------------------------------
> To unsubscribe, e-mail: java-user-unsubscribe@lucene.apache.org
> For additional commands, e-mail: java-user-help@lucene.apache.org
> 
> 
> 

-- 
View this message in context: http://www.nabble.com/Indexing-and-Searching-from-within-a-single-Document-tp16537558p16558732.html
Sent from the Lucene - Java Users mailing list archive at Nabble.com.


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


Mime
View raw message