incubator-blur-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From amccu...@apache.org
Subject [2/2] git commit: Fixed bug, was using the value of a column instead of the name.
Date Wed, 19 Jun 2013 20:09:21 GMT
Fixed bug, was using the value of a column instead of the name.


Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo
Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/2ee0c17e
Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/2ee0c17e
Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/2ee0c17e

Branch: refs/heads/master
Commit: 2ee0c17ed96d47c4c02e206839a61553b49d1b6b
Parents: f2a669f
Author: Aaron McCurry <amccurry@gmail.com>
Authored: Wed Jun 19 16:08:28 2013 -0400
Committer: Aaron McCurry <amccurry@gmail.com>
Committed: Wed Jun 19 16:08:28 2013 -0400

----------------------------------------------------------------------
 .../org/apache/blur/manager/indexserver/LocalIndexServer.java | 6 +-----
 .../src/main/java/org/apache/blur/utils/HighlightHelper.java  | 2 +-
 .../src/main/java/org/apache/blur/analysis/BlurAnalyzer.java  | 2 +-
 .../test/java/org/apache/blur/analysis/BlurAnalyzerTest.java  | 7 +++++++
 4 files changed, 10 insertions(+), 7 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/2ee0c17e/blur-core/src/main/java/org/apache/blur/manager/indexserver/LocalIndexServer.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/manager/indexserver/LocalIndexServer.java
b/blur-core/src/main/java/org/apache/blur/manager/indexserver/LocalIndexServer.java
index 5872c11..453afcd 100644
--- a/blur-core/src/main/java/org/apache/blur/manager/indexserver/LocalIndexServer.java
+++ b/blur-core/src/main/java/org/apache/blur/manager/indexserver/LocalIndexServer.java
@@ -23,7 +23,6 @@ import java.io.IOException;
 import java.net.URI;
 import java.net.URISyntaxException;
 import java.util.ArrayList;
-import java.util.HashSet;
 import java.util.List;
 import java.util.Map;
 import java.util.Set;
@@ -50,8 +49,6 @@ import org.apache.blur.utils.BlurConstants;
 import org.apache.blur.utils.BlurUtil;
 import org.apache.hadoop.fs.Path;
 import org.apache.lucene.analysis.core.KeywordAnalyzer;
-import org.apache.lucene.analysis.standard.StandardAnalyzer;
-import org.apache.lucene.analysis.util.CharArraySet;
 import org.apache.lucene.index.CorruptIndexException;
 import org.apache.lucene.index.DirectoryReader;
 import org.apache.lucene.index.IndexWriter;
@@ -105,8 +102,7 @@ public class LocalIndexServer extends AbstractIndexServer {
 
   @Override
   public BlurAnalyzer getAnalyzer(String table) {
-    return new BlurAnalyzer(new StandardAnalyzer(LUCENE_VERSION, new CharArraySet(LUCENE_VERSION,
-        new HashSet<String>(), false)));
+    return _tableContext.getAnalyzer();
   }
 
   @Override

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/2ee0c17e/blur-core/src/main/java/org/apache/blur/utils/HighlightHelper.java
----------------------------------------------------------------------
diff --git a/blur-core/src/main/java/org/apache/blur/utils/HighlightHelper.java b/blur-core/src/main/java/org/apache/blur/utils/HighlightHelper.java
index 8ac1b38..93915e6 100644
--- a/blur-core/src/main/java/org/apache/blur/utils/HighlightHelper.java
+++ b/blur-core/src/main/java/org/apache/blur/utils/HighlightHelper.java
@@ -135,7 +135,7 @@ public class HighlightHelper {
       Number numericValue = f.numericValue();
       
       Query fieldFixedQuery;
-      if (analyzer.isFullTextField(text)) {
+      if (analyzer.isFullTextField(name)) {
         fieldFixedQuery = fixSuperQuery(query, name);  
       } else {
         fieldFixedQuery = fixedQuery;

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/2ee0c17e/blur-query/src/main/java/org/apache/blur/analysis/BlurAnalyzer.java
----------------------------------------------------------------------
diff --git a/blur-query/src/main/java/org/apache/blur/analysis/BlurAnalyzer.java b/blur-query/src/main/java/org/apache/blur/analysis/BlurAnalyzer.java
index f008f02..47c9891 100644
--- a/blur-query/src/main/java/org/apache/blur/analysis/BlurAnalyzer.java
+++ b/blur-query/src/main/java/org/apache/blur/analysis/BlurAnalyzer.java
@@ -126,7 +126,7 @@ public final class BlurAnalyzer extends AnalyzerWrapper {
   }
 
   public BlurAnalyzer() {
-    this(new NoStopWordStandardAnalyzer());
+    this(new AnalyzerDefinition());
   }
 
   private Analyzer getAnalyzer(String name) {

http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/2ee0c17e/blur-query/src/test/java/org/apache/blur/analysis/BlurAnalyzerTest.java
----------------------------------------------------------------------
diff --git a/blur-query/src/test/java/org/apache/blur/analysis/BlurAnalyzerTest.java b/blur-query/src/test/java/org/apache/blur/analysis/BlurAnalyzerTest.java
index f974123..36970b1 100644
--- a/blur-query/src/test/java/org/apache/blur/analysis/BlurAnalyzerTest.java
+++ b/blur-query/src/test/java/org/apache/blur/analysis/BlurAnalyzerTest.java
@@ -98,6 +98,13 @@ public class BlurAnalyzerTest {
     assertTrue(analyzer.isFullTextField("a.b"));
     assertFalse(analyzer.isFullTextField("d.a"));
   }
+  
+  @Test
+  public void testFullTextFieldsDefault() throws IOException {
+    BlurAnalyzer analyzer = new BlurAnalyzer();
+    assertTrue(analyzer.isFullTextField("a.b"));
+    assertTrue(analyzer.isFullTextField("d.a"));
+  }
 
   private AnalyzerDefinition getDef1() {
 


Mime
View raw message