lucene-java-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r915883 - in /lucene/java/branches/flex_1458: contrib/misc/src/java/org/apache/lucene/index/ contrib/misc/src/java/org/apache/lucene/misc/ contrib/remote/src/test/org/apache/lucene/search/ src/java/org/apache/lucene/index/codecs/standard/
Date Wed, 24 Feb 2010 17:27:27 GMT
Author: rmuir
Date: Wed Feb 24 17:27:27 2010
New Revision: 915883

URL: http://svn.apache.org/viewvc?rev=915883&view=rev
Log:
LUCENE-2111: more BytesRef.toString -> BytesRef.utf8ToString()

Modified:
    lucene/java/branches/flex_1458/contrib/misc/src/java/org/apache/lucene/index/TermVectorAccessor.java
    lucene/java/branches/flex_1458/contrib/misc/src/java/org/apache/lucene/misc/HighFreqTerms.java
    lucene/java/branches/flex_1458/contrib/remote/src/test/org/apache/lucene/search/TestRemoteSort.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardTermsDictReader.java
    lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardTermsDictWriter.java

Modified: lucene/java/branches/flex_1458/contrib/misc/src/java/org/apache/lucene/index/TermVectorAccessor.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/misc/src/java/org/apache/lucene/index/TermVectorAccessor.java?rev=915883&r1=915882&r2=915883&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/misc/src/java/org/apache/lucene/index/TermVectorAccessor.java
(original)
+++ lucene/java/branches/flex_1458/contrib/misc/src/java/org/apache/lucene/index/TermVectorAccessor.java
Wed Feb 24 17:27:27 2010
@@ -122,7 +122,7 @@
           if (docID == documentNumber) {
 
             frequencies.add(Integer.valueOf(docs.freq()));
-            tokens.add(text.toString());
+            tokens.add(text.utf8ToString());
 
             if (!mapper.isIgnoringPositions()) {
               int[] positions = new int[docs.freq()];

Modified: lucene/java/branches/flex_1458/contrib/misc/src/java/org/apache/lucene/misc/HighFreqTerms.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/misc/src/java/org/apache/lucene/misc/HighFreqTerms.java?rev=915883&r1=915882&r2=915883&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/misc/src/java/org/apache/lucene/misc/HighFreqTerms.java
(original)
+++ lucene/java/branches/flex_1458/contrib/misc/src/java/org/apache/lucene/misc/HighFreqTerms.java
Wed Feb 24 17:27:27 2010
@@ -61,7 +61,7 @@
         while(true) {
           BytesRef term = termsEnum.next();
           if (term != null) {
-            tiq.insertWithOverflow(new TermInfo(new Term(field, term.toString()), termsEnum.docFreq()));
+            tiq.insertWithOverflow(new TermInfo(new Term(field, term.utf8ToString()), termsEnum.docFreq()));
           } else {
             break;
           }    

Modified: lucene/java/branches/flex_1458/contrib/remote/src/test/org/apache/lucene/search/TestRemoteSort.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/contrib/remote/src/test/org/apache/lucene/search/TestRemoteSort.java?rev=915883&r1=915882&r2=915883&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/contrib/remote/src/test/org/apache/lucene/search/TestRemoteSort.java
(original)
+++ lucene/java/branches/flex_1458/contrib/remote/src/test/org/apache/lucene/search/TestRemoteSort.java
Wed Feb 24 17:27:27 2010
@@ -220,7 +220,7 @@
     public void setNextReader(IndexReader reader, int docBase) throws IOException {
       docValues = FieldCache.DEFAULT.getInts(reader, "parser", new FieldCache.IntParser()
{
           public final int parseInt(BytesRef termRef) {
-            return (termRef.toString().charAt(0)-'A') * 123456;
+            return (termRef.utf8ToString().charAt(0)-'A') * 123456;
           }
         });
     }

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardTermsDictReader.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardTermsDictReader.java?rev=915883&r1=915882&r2=915883&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardTermsDictReader.java
(original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardTermsDictReader.java
Wed Feb 24 17:27:27 2010
@@ -553,7 +553,7 @@
         }
         DocsEnum docsEnum = postingsReader.docs(fieldInfo, state, skipDocs, reuse);
         if (Codec.DEBUG) {
-          docsEnum.desc = fieldInfo.name + ":" + bytesReader.term.toString();
+          docsEnum.desc = fieldInfo.name + ":" + bytesReader.term.utf8ToString();
         }
         return docsEnum;
       }
@@ -569,7 +569,7 @@
           DocsAndPositionsEnum postingsEnum = postingsReader.docsAndPositions(fieldInfo,
state, skipDocs, reuse);
           if (Codec.DEBUG) {
             if (postingsEnum != null) {
-              postingsEnum.desc = fieldInfo.name + ":" + bytesReader.term.toString();
+              postingsEnum.desc = fieldInfo.name + ":" + bytesReader.term.utf8ToString();
             }
           }
           if (Codec.DEBUG) {

Modified: lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardTermsDictWriter.java
URL: http://svn.apache.org/viewvc/lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardTermsDictWriter.java?rev=915883&r1=915882&r2=915883&view=diff
==============================================================================
--- lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardTermsDictWriter.java
(original)
+++ lucene/java/branches/flex_1458/src/java/org/apache/lucene/index/codecs/standard/StandardTermsDictWriter.java
Wed Feb 24 17:27:27 2010
@@ -173,8 +173,8 @@
     public PostingsConsumer startTerm(BytesRef text) throws IOException {
       postingsWriter.startTerm();
       if (Codec.DEBUG) {
-        postingsWriter.desc = fieldInfo.name + ":" + text.toString();
-        System.out.println("stdw.startTerm term=" + fieldInfo.name + ":" + text.toString()
+ " seg=" + segment);
+        postingsWriter.desc = fieldInfo.name + ":" + text.utf8ToString();
+        System.out.println("stdw.startTerm term=" + fieldInfo.name + ":" + text.utf8ToString()
+ " seg=" + segment);
       }
       return postingsWriter;
     }
@@ -183,7 +183,7 @@
     public void finishTerm(BytesRef text, int numDocs) throws IOException {
 
       if (Codec.DEBUG) {
-        Codec.debug("finishTerm seg=" + segment + " text=" + fieldInfo.name + ":" + text.toString()
+ " numDocs=" + numDocs + " numTerms=" + numTerms);
+        Codec.debug("finishTerm seg=" + segment + " text=" + fieldInfo.name + ":" + text.utf8ToString()
+ " numDocs=" + numDocs + " numTerms=" + numTerms);
       }
 
       if (numDocs > 0) {
@@ -191,7 +191,7 @@
 
         if (Codec.DEBUG) {
           Codec.debug("  tis.fp=" + out.getFilePointer() + " isIndexTerm?=" + isIndexTerm);
-          System.out.println("  term bytes=" + text.toString());
+          System.out.println("  term bytes=" + text.utf8ToString());
         }
         termWriter.write(text);
         out.writeVInt(numDocs);



Mime
View raw message