lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Pasha Bizhan" <>
Subject RE: return document name as null Please help
Date Tue, 30 May 2006 13:16:36 GMT

> 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:

View raw message