Updated Branches: refs/heads/master afbe3ef35 -> bf85c7283
Fixed BLUR-144 Project: http://git-wip-us.apache.org/repos/asf/incubator-blur/repo Commit: http://git-wip-us.apache.org/repos/asf/incubator-blur/commit/bf85c728 Tree: http://git-wip-us.apache.org/repos/asf/incubator-blur/tree/bf85c728 Diff: http://git-wip-us.apache.org/repos/asf/incubator-blur/diff/bf85c728 Branch: refs/heads/master Commit: bf85c728367cb84af2e67393f344bfc9b2478d21 Parents: afbe3ef Author: Aaron McCurry <[email protected]> Authored: Wed Jun 19 14:05:48 2013 -0400 Committer: Aaron McCurry <[email protected]> Committed: Wed Jun 19 14:05:48 2013 -0400 ---------------------------------------------------------------------- .../main/java/org/apache/blur/analysis/BlurAnalyzer.java | 10 +++++++++- 1 file changed, 9 insertions(+), 1 deletion(-) ---------------------------------------------------------------------- http://git-wip-us.apache.org/repos/asf/incubator-blur/blob/bf85c728/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 cd7e233..f008f02 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 @@ -58,6 +58,7 @@ import org.apache.lucene.document.FieldType; import org.apache.lucene.document.FloatField; import org.apache.lucene.document.IntField; import org.apache.lucene.document.LongField; +import org.apache.lucene.document.StoredField; import org.apache.lucene.document.StringField; import org.apache.lucene.document.TextField; import org.apache.lucene.index.FieldInfo.IndexOptions; @@ -68,7 +69,7 @@ import org.apache.lucene.util.Version; public final class BlurAnalyzer extends AnalyzerWrapper { public enum TYPE { - LONG, DOUBLE, FLOAT, INTEGER, TEXT, STRING + LONG, DOUBLE, FLOAT, INTEGER, TEXT, STRING, STORED } @SuppressWarnings("serial") @@ -132,6 +133,8 @@ public final class BlurAnalyzer extends AnalyzerWrapper { TYPE type = _typeLookup.get(name); if (type == TYPE.STRING) { return _keywordAnalyzer; + } else if (type == TYPE.STORED) { + throw new RuntimeException("Stored fields should never call this method."); } return _analyzers.get(name); } @@ -255,6 +258,8 @@ public final class BlurAnalyzer extends AnalyzerWrapper { return new Field(fieldName, value, fieldType); } switch (type) { + case STORED: + return new StoredField(fieldName, value); case STRING: return new Field(fieldName, value, fieldType); case INTEGER: @@ -471,6 +476,9 @@ public final class BlurAnalyzer extends AnalyzerWrapper { FieldType fieldType; switch (t) { + case STORED: + fieldType = StoredField.TYPE; + break; case STRING: fieldType = new FieldType(StringField.TYPE_STORED); break;
