lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Otis Gospodnetic <otis_gospodne...@yahoo.com>
Subject Re: [PATCH] Add URL and Title to SearchFiles.Java
Date Tue, 01 Jan 2002 00:26:55 GMT
It's been applied.

Thanks for the patch.

Otis

--- Paul Spencer <paulsp@apache.org> wrote:
> What is the status of this patch?  I believe I makes for a better
> demo 
> application since it will display a valid URL instead of "null"
> 
> Paul Spencer
> 
> Paul Spencer wrote:
> 
> > The patch below will display the URL and Title for documents added
> with 
> > IndexHTML.  Currently "null" is displayed as the file name.
> > 
> > Paul Spencer
> > 
> > Index: SearchFiles.java
> > ===================================================================
> > RCS file: 
> >
>
/home/cvs/jakarta-lucene/src/demo/org/apache/lucene/SearchFiles.java,v
> > retrieving revision 1.2
> > diff -c -r1.2 SearchFiles.java
> > *** SearchFiles.java    2001/09/18 17:21:38    1.2
> > --- SearchFiles.java    2001/12/09 09:41:30
> > ***************
> > *** 91,97 ****
> >       for (int start = 0; start < hits.length(); start +=
> HITS_PER_PAGE) {
> >         int end = Math.min(hits.length(), start + HITS_PER_PAGE);
> >         for (int i = start; i < end; i++)
> > !         System.out.println(i + ". " + hits.doc(i).get("path"));
> >         if (hits.length() > end) {
> >           System.out.print("more (y/n) ? ");
> >           line = in.readLine();
> > --- 91,106 ----
> >       for (int start = 0; start < hits.length(); start +=
> HITS_PER_PAGE) {
> >         int end = Math.min(hits.length(), start + HITS_PER_PAGE);
> >         for (int i = start; i < end; i++)
> > !             if (hits.doc(i).get("path") != null) {
> > !           System.out.println(i + ". " + hits.doc(i).get("path"));
> > !             } else {
> > !               if (hits.doc(i).get("url") != null) {
> > !             System.out.println(i + ". " +
> hits.doc(i).get("url"));
> > !             System.out.println("   - " +
> hits.doc(i).get("title"));
> > !               } else {
> > !             System.out.println(i + ". " + "No Path or URL to
> document");
> > !               }
> > !             }
> >         if (hits.length() > end) {
> >           System.out.print("more (y/n) ? ");
> >           line = in.readLine();
> > 
> > 
> > -- 
> > To unsubscribe, e-mail:   
> > <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
> > For additional commands, e-mail: 
> > <mailto:lucene-dev-help@jakarta.apache.org>
> > 
> > 
> 
> 
> 
> --
> To unsubscribe, e-mail:  
> <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
> For additional commands, e-mail:
> <mailto:lucene-dev-help@jakarta.apache.org>
> 


__________________________________________________
Do You Yahoo!?
Send your FREE holiday greetings online!
http://greetings.yahoo.com

--
To unsubscribe, e-mail:   <mailto:lucene-dev-unsubscribe@jakarta.apache.org>
For additional commands, e-mail: <mailto:lucene-dev-help@jakarta.apache.org>


Mime
View raw message