From 1c93c8dfb817f0a60a0d556f8e4b4fa9b6771d17 Mon Sep 17 00:00:00 2001 From: Shay Banon Date: Sun, 30 Dec 2012 16:55:22 -0800 Subject: [PATCH] cleanup unused term factory --- .../elasticsearch/index/mapper/internal/TypeFieldMapper.java | 2 -- .../java/org/elasticsearch/index/query/TypeFilterParser.java | 2 +- 2 files changed, 1 insertion(+), 3 deletions(-) diff --git a/src/main/java/org/elasticsearch/index/mapper/internal/TypeFieldMapper.java b/src/main/java/org/elasticsearch/index/mapper/internal/TypeFieldMapper.java index 39f9e30dc6b..34fc2208606 100644 --- a/src/main/java/org/elasticsearch/index/mapper/internal/TypeFieldMapper.java +++ b/src/main/java/org/elasticsearch/index/mapper/internal/TypeFieldMapper.java @@ -50,8 +50,6 @@ public class TypeFieldMapper extends AbstractFieldMapper implements Inte public static final String NAME = "_type"; - public static final Term TERM_FACTORY = new Term(NAME, ""); - public static final String CONTENT_TYPE = "_type"; public static class Defaults extends AbstractFieldMapper.Defaults { diff --git a/src/main/java/org/elasticsearch/index/query/TypeFilterParser.java b/src/main/java/org/elasticsearch/index/query/TypeFilterParser.java index 754295562e6..1b10569f597 100644 --- a/src/main/java/org/elasticsearch/index/query/TypeFilterParser.java +++ b/src/main/java/org/elasticsearch/index/query/TypeFilterParser.java @@ -67,7 +67,7 @@ public class TypeFilterParser implements FilterParser { //LUCENE 4 UPGRADE document mapper should use bytesref aswell? DocumentMapper documentMapper = parseContext.mapperService().documentMapper(type.utf8ToString()); if (documentMapper == null) { - filter = new TermFilter(new Term(TypeFieldMapper.TERM_FACTORY.field(), type)); + filter = new TermFilter(new Term(TypeFieldMapper.NAME, type)); } else { filter = documentMapper.typeFilter(); }