Created
November 9, 2011 19:58
-
-
Save elben/1352769 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
diff --git a/src/lucandra/IndexReader.java b/src/lucandra/IndexReader.java | |
index e88e789..5596b87 100644 | |
--- a/src/lucandra/IndexReader.java | |
+++ b/src/lucandra/IndexReader.java | |
@@ -34,6 +34,7 @@ import com.google.common.collect.MapMaker; | |
import org.apache.cassandra.db.*; | |
import org.apache.cassandra.thrift.ColumnParent; | |
import org.apache.cassandra.utils.ByteBufferUtil; | |
+import org.apache.cassandra.utils.FBUtilities; | |
import org.apache.log4j.Logger; | |
import org.apache.lucene.analysis.SimpleAnalyzer; | |
import org.apache.lucene.analysis.tokenattributes.TypeAttribute; | |
@@ -344,7 +345,7 @@ public class IndexReader extends org.apache.lucene.index.IndexReader | |
else if(term.isSetIs_binary()) | |
{ | |
if(term.is_binary) | |
- f = new Field(term.getField(), term.getText()); | |
+ f = new Field(term.getField(), FBUtilities.bytesToHex(term.getText()), Store.YES, Index.NOT_ANALYZED); | |
else | |
f = new Field(term.getField(), new String(term.getText(),"UTF-8"), Store.YES, Index.ANALYZED); | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment