pdfbox-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From le...@apache.org
Subject svn commit: r784547 - in /incubator/pdfbox/trunk/src/main/java/org/apache/pdfbox/searchengine/lucene: IndexFiles.java LucenePDFDocument.java
Date Sun, 14 Jun 2009 12:03:43 GMT
Author: lehmi
Date: Sun Jun 14 12:03:43 2009
New Revision: 784547

URL: http://svn.apache.org/viewvc?rev=784547&view=rev
Log:
replacing some deprecated code after upgrading lucene from 2.2.0 to 2.4.1 (see PDFBOX-365)

Modified:
    incubator/pdfbox/trunk/src/main/java/org/apache/pdfbox/searchengine/lucene/IndexFiles.java
    incubator/pdfbox/trunk/src/main/java/org/apache/pdfbox/searchengine/lucene/LucenePDFDocument.java

Modified: incubator/pdfbox/trunk/src/main/java/org/apache/pdfbox/searchengine/lucene/IndexFiles.java
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/src/main/java/org/apache/pdfbox/searchengine/lucene/IndexFiles.java?rev=784547&r1=784546&r2=784547&view=diff
==============================================================================
--- incubator/pdfbox/trunk/src/main/java/org/apache/pdfbox/searchengine/lucene/IndexFiles.java
(original)
+++ incubator/pdfbox/trunk/src/main/java/org/apache/pdfbox/searchengine/lucene/IndexFiles.java
Sun Jun 14 12:03:43 2009
@@ -170,7 +170,7 @@
         {
             Date start = new Date();
 
-            writer = new IndexWriter(index, new StandardAnalyzer(), create);
+            writer = new IndexWriter(index, new StandardAnalyzer(), create, IndexWriter.MaxFieldLength.LIMITED);
 
             if (!create)
             {                 // delete stale docs

Modified: incubator/pdfbox/trunk/src/main/java/org/apache/pdfbox/searchengine/lucene/LucenePDFDocument.java
URL: http://svn.apache.org/viewvc/incubator/pdfbox/trunk/src/main/java/org/apache/pdfbox/searchengine/lucene/LucenePDFDocument.java?rev=784547&r1=784546&r2=784547&view=diff
==============================================================================
--- incubator/pdfbox/trunk/src/main/java/org/apache/pdfbox/searchengine/lucene/LucenePDFDocument.java
(original)
+++ incubator/pdfbox/trunk/src/main/java/org/apache/pdfbox/searchengine/lucene/LucenePDFDocument.java
Sun Jun 14 12:03:43 2009
@@ -167,7 +167,7 @@
     {
         if ( value != null )
         {
-            document.add( new Field( name, value, Field.Store.YES, Field.Index.UN_TOKENIZED
) );
+            document.add( new Field( name, value, Field.Store.YES, Field.Index.NOT_ANALYZED
) );
         }
     }
 
@@ -183,7 +183,7 @@
     {
         if ( value != null )
         {
-            document.add( new Field( name, value, Field.Store.YES, Field.Index.TOKENIZED
) );
+            document.add( new Field( name, value, Field.Store.YES, Field.Index.ANALYZED )
);
         }
     }
 
@@ -215,7 +215,7 @@
     {
         if ( value != null )
         {
-            document.add( new Field( name, value, Field.Store.NO, Field.Index.UN_TOKENIZED
) );
+            document.add( new Field( name, value, Field.Store.NO, Field.Index.NOT_ANALYZED
) );
         }
     }
 



Mime
View raw message