portals-jetspeed-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From pau...@apache.org
Subject cvs commit: jakarta-jetspeed/src/java/org/apache/jetspeed/services/lucene LuceneSearchService.java
Date Wed, 21 May 2003 02:17:52 GMT
paulsp      2003/05/20 19:17:52

  Modified:    src/java/org/apache/jetspeed/services/lucene
                        LuceneSearchService.java
  Log:
  o Pass path to GetMethod.  startSession ignores the path.  This
    was preventing the document from retrieved and correctly indexed.
  o Convert System.out.println to log.debug statements
  
  Revision  Changes    Path
  1.6       +3 -3      jakarta-jetspeed/src/java/org/apache/jetspeed/services/lucene/LuceneSearchService.java
  
  Index: LuceneSearchService.java
  ===================================================================
  RCS file: /home/cvs/jakarta-jetspeed/src/java/org/apache/jetspeed/services/lucene/LuceneSearchService.java,v
  retrieving revision 1.5
  retrieving revision 1.6
  diff -u -r1.5 -r1.6
  --- LuceneSearchService.java	20 May 2003 07:16:29 -0000	1.5
  +++ LuceneSearchService.java	21 May 2003 02:17:52 -0000	1.6
  @@ -306,7 +306,7 @@
       {
           HttpClient client = new HttpClient();
           client.startSession(pageToAdd);
  -        GetMethod method = new GetMethod("/");
  +        GetMethod method = new GetMethod(pageToAdd.getPath());
           method.setFollowRedirects(true);
           int statusCode = -1;
           int attempt = 0;
  @@ -319,7 +319,7 @@
                   // execute the method.
                   client.executeMethod(method);
                   statusCode = method.getStatusCode();
  -                System.out.println("Status code = " + statusCode);
  +                Log.debug("URL = " + pageToAdd.toString() + "Status code = " + statusCode);
               }
               catch (HttpException e)
               {
  @@ -352,7 +352,7 @@
                       doc.add(Field.Text(this.contentFieldName, content));
                       IndexWriter indexWriter = new IndexWriter(rootDir, new StandardAnalyzer(),
false);
                       indexWriter.addDocument(doc);
  -                    System.out.println("Index Docuemnt Count = " + indexWriter.docCount());
  +                    Log.debug("Index Docuemnt Count = " + indexWriter.docCount());
                       indexWriter.optimize();
                       indexWriter.close();
                       Log.info("Added '" + pageToAdd.toString() + "' to index");
  
  
  

---------------------------------------------------------------------
To unsubscribe, e-mail: jetspeed-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: jetspeed-dev-help@jakarta.apache.org


Mime
View raw message