lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Amaresh Kumar Yadav <>
Subject RE: return document name as null Please help
Date Tue, 30 May 2006 15:57:17 GMT
Thanks Pasha,

I got success.



-----Original Message-----
From: Pasha Bizhan []
Sent: Tuesday, May 30, 2006 6:47 PM
Subject: RE: return document name as null Please help


> From: Amaresh Kumar Yadav [] 
> I am using attached source code for indexing on windows plateform.
> after compiling and making war file, build folder is created 

I guess you use lucene demo for files not for html files. 

In this case documents don't contain the fileds "title" and "summary".
And you should use "path" field instead of "title" field.

Edit results.jps
                        Document doc = hits.doc(i);                    //get
the next document 
-                        String doctitle = doc.get("title");
//get its title
+                        String doctitle = doc.get("path");            //get
its title

                        String url = doc.get("url");                   //get
its url field
                        if ((doctitle == null) || doctitle.equals("")) //use
the url if it has no title

Also, use Luke to inspect your index.

Pasha Bizhan

To unsubscribe, e-mail:
For additional commands, e-mail:


This email and any files transmitted with it are confidential and are solely for the use of
the individual or entity to which it is addressed. Any use, distribution, copying or disclosure
by any other person is strictly prohibited. If you receive this transmission in error, please
notify the sender by reply email and then destroy the message. Opinions, conclusions and other
information in this message that do not relate to official business of the company shall be
understood to be neither given nor endorsed by NIIT Ltd. or NIIT Technologies Ltd. Any information
contained in this email, when addressed to Clients is subject to the terms and conditions
in governing client contract.

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message