lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Sarvadnya Mutalik" <>
Subject Problem : Searching with Lucene 2.0
Date Thu, 06 Jul 2006 05:58:15 GMT
Hi, I'm using Lucene 2.0, latest ver of Apache Lucene search engine.
After successfully indexing, when I tried to search, I'm not able to get
the complete information.
In the following code snippet, I'm getting the values for  "doctitle"
and "summary" as null.
While it says there are two results.

	for (int i = startindex; i < (thispage + startindex); i++) {  //
for each element

                        Document doc = hits.doc(i);
//get the next document 
                        String doctitle = doc.get("title");
//get its title
                        String url = doc.get("path");
//get its url field

                        if ((doctitle == null) || doctitle.equals(""))
//use the url if it has no title
                                doctitle = url;

		String summary = doc.get("summary");


Please help..


The information transmitted is intended only for the person or entity to
which it is addressed and may contain confidential and/or privileged
material. Any review, retransmission, dissemination or other use of, or
taking of any action in reliance upon, this information by persons or
entities other than the intended recipient is prohibited. If you
received this in error, please contact the sender and delete all copies
from any computer.

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