simplify check if there is explicit type name and doc mapper in the field to be used
This commit is contained in:
parent
f6deb45970
commit
06da379f50
|
@ -131,7 +131,7 @@ public class MapperQueryParser extends QueryParser {
|
||||||
if (currentMapper != null) {
|
if (currentMapper != null) {
|
||||||
Query query = null;
|
Query query = null;
|
||||||
if (currentMapper.useFieldQueryWithQueryString()) {
|
if (currentMapper.useFieldQueryWithQueryString()) {
|
||||||
if (fieldMappers.hasDocMapper()) {
|
if (fieldMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
String[] previousTypes = QueryParseContext.setTypesWithPrevious(new String[]{fieldMappers.docMapper().type()});
|
String[] previousTypes = QueryParseContext.setTypesWithPrevious(new String[]{fieldMappers.docMapper().type()});
|
||||||
try {
|
try {
|
||||||
query = currentMapper.fieldQuery(queryText, parseContext);
|
query = currentMapper.fieldQuery(queryText, parseContext);
|
||||||
|
@ -202,7 +202,7 @@ public class MapperQueryParser extends QueryParser {
|
||||||
if (currentMapper != null) {
|
if (currentMapper != null) {
|
||||||
Query query = null;
|
Query query = null;
|
||||||
if (currentMapper.useFieldQueryWithQueryString()) {
|
if (currentMapper.useFieldQueryWithQueryString()) {
|
||||||
if (fieldMappers.hasDocMapper()) {
|
if (fieldMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
String[] previousTypes = QueryParseContext.setTypesWithPrevious(new String[]{fieldMappers.docMapper().type()});
|
String[] previousTypes = QueryParseContext.setTypesWithPrevious(new String[]{fieldMappers.docMapper().type()});
|
||||||
try {
|
try {
|
||||||
query = currentMapper.prefixQuery(termStr, multiTermRewriteMethod, parseContext);
|
query = currentMapper.prefixQuery(termStr, multiTermRewriteMethod, parseContext);
|
||||||
|
|
|
@ -742,6 +742,10 @@ public class MapperService extends AbstractIndexComponent implements Iterable<Do
|
||||||
return this.explicitTypeInName;
|
return this.explicitTypeInName;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
public boolean explicitTypeInNameWithDocMapper() {
|
||||||
|
return explicitTypeInName && docMapper != null;
|
||||||
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
* The best effort search analyzer associated with this field.
|
* The best effort search analyzer associated with this field.
|
||||||
*/
|
*/
|
||||||
|
|
|
@ -84,7 +84,7 @@ public class PrefixFilterParser implements FilterParser {
|
||||||
|
|
||||||
MapperService.SmartNameFieldMappers smartNameFieldMappers = parseContext.smartFieldMappers(fieldName);
|
MapperService.SmartNameFieldMappers smartNameFieldMappers = parseContext.smartFieldMappers(fieldName);
|
||||||
if (smartNameFieldMappers != null && smartNameFieldMappers.hasMapper()) {
|
if (smartNameFieldMappers != null && smartNameFieldMappers.hasMapper()) {
|
||||||
if (smartNameFieldMappers.hasDocMapper()) {
|
if (smartNameFieldMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
String[] previousTypes = QueryParseContext.setTypesWithPrevious(new String[]{smartNameFieldMappers.docMapper().type()});
|
String[] previousTypes = QueryParseContext.setTypesWithPrevious(new String[]{smartNameFieldMappers.docMapper().type()});
|
||||||
try {
|
try {
|
||||||
filter = smartNameFieldMappers.mapper().prefixFilter(value, parseContext);
|
filter = smartNameFieldMappers.mapper().prefixFilter(value, parseContext);
|
||||||
|
|
|
@ -96,7 +96,7 @@ public class PrefixQueryParser implements QueryParser {
|
||||||
Query query = null;
|
Query query = null;
|
||||||
MapperService.SmartNameFieldMappers smartNameFieldMappers = parseContext.smartFieldMappers(fieldName);
|
MapperService.SmartNameFieldMappers smartNameFieldMappers = parseContext.smartFieldMappers(fieldName);
|
||||||
if (smartNameFieldMappers != null && smartNameFieldMappers.hasMapper()) {
|
if (smartNameFieldMappers != null && smartNameFieldMappers.hasMapper()) {
|
||||||
if (smartNameFieldMappers.hasDocMapper()) {
|
if (smartNameFieldMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
String[] previousTypes = QueryParseContext.setTypesWithPrevious(new String[]{smartNameFieldMappers.docMapper().type()});
|
String[] previousTypes = QueryParseContext.setTypesWithPrevious(new String[]{smartNameFieldMappers.docMapper().type()});
|
||||||
try {
|
try {
|
||||||
query = smartNameFieldMappers.mapper().prefixQuery(value, method, parseContext);
|
query = smartNameFieldMappers.mapper().prefixQuery(value, method, parseContext);
|
||||||
|
|
|
@ -87,7 +87,7 @@ public class TermFilterParser implements FilterParser {
|
||||||
Filter filter = null;
|
Filter filter = null;
|
||||||
MapperService.SmartNameFieldMappers smartNameFieldMappers = parseContext.smartFieldMappers(fieldName);
|
MapperService.SmartNameFieldMappers smartNameFieldMappers = parseContext.smartFieldMappers(fieldName);
|
||||||
if (smartNameFieldMappers != null && smartNameFieldMappers.hasMapper()) {
|
if (smartNameFieldMappers != null && smartNameFieldMappers.hasMapper()) {
|
||||||
if (smartNameFieldMappers.hasDocMapper()) {
|
if (smartNameFieldMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
String[] previousTypes = QueryParseContext.setTypesWithPrevious(new String[]{smartNameFieldMappers.docMapper().type()});
|
String[] previousTypes = QueryParseContext.setTypesWithPrevious(new String[]{smartNameFieldMappers.docMapper().type()});
|
||||||
try {
|
try {
|
||||||
filter = smartNameFieldMappers.mapper().fieldFilter(value, parseContext);
|
filter = smartNameFieldMappers.mapper().fieldFilter(value, parseContext);
|
||||||
|
|
|
@ -90,7 +90,7 @@ public class TermQueryParser implements QueryParser {
|
||||||
Query query = null;
|
Query query = null;
|
||||||
MapperService.SmartNameFieldMappers smartNameFieldMappers = parseContext.smartFieldMappers(fieldName);
|
MapperService.SmartNameFieldMappers smartNameFieldMappers = parseContext.smartFieldMappers(fieldName);
|
||||||
if (smartNameFieldMappers != null && smartNameFieldMappers.hasMapper()) {
|
if (smartNameFieldMappers != null && smartNameFieldMappers.hasMapper()) {
|
||||||
if (smartNameFieldMappers.hasDocMapper()) {
|
if (smartNameFieldMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
String[] previousTypes = QueryParseContext.setTypesWithPrevious(new String[]{smartNameFieldMappers.docMapper().type()});
|
String[] previousTypes = QueryParseContext.setTypesWithPrevious(new String[]{smartNameFieldMappers.docMapper().type()});
|
||||||
try {
|
try {
|
||||||
query = smartNameFieldMappers.mapper().fieldQuery(value, parseContext);
|
query = smartNameFieldMappers.mapper().fieldQuery(value, parseContext);
|
||||||
|
|
|
@ -107,7 +107,7 @@ public class TermsFilterParser implements FilterParser {
|
||||||
fieldName = fieldMapper.names().indexName();
|
fieldName = fieldMapper.names().indexName();
|
||||||
}
|
}
|
||||||
// if we have a doc mapper, its explicit type, mark it
|
// if we have a doc mapper, its explicit type, mark it
|
||||||
if (smartNameFieldMappers.hasDocMapper()) {
|
if (smartNameFieldMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
previousTypes = QueryParseContext.setTypesWithPrevious(new String[]{smartNameFieldMappers.docMapper().type()});
|
previousTypes = QueryParseContext.setTypesWithPrevious(new String[]{smartNameFieldMappers.docMapper().type()});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -204,7 +204,7 @@ public class TermsFilterParser implements FilterParser {
|
||||||
}
|
}
|
||||||
return filter;
|
return filter;
|
||||||
} finally {
|
} finally {
|
||||||
if (smartNameFieldMappers != null && smartNameFieldMappers.hasDocMapper()) {
|
if (smartNameFieldMappers != null && smartNameFieldMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
QueryParseContext.setTypes(previousTypes);
|
QueryParseContext.setTypes(previousTypes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -100,7 +100,7 @@ public class TermsQueryParser implements QueryParser {
|
||||||
String[] previousTypes = null;
|
String[] previousTypes = null;
|
||||||
if (smartNameFieldMappers != null && smartNameFieldMappers.hasMapper()) {
|
if (smartNameFieldMappers != null && smartNameFieldMappers.hasMapper()) {
|
||||||
mapper = smartNameFieldMappers.mapper();
|
mapper = smartNameFieldMappers.mapper();
|
||||||
if (smartNameFieldMappers.hasDocMapper()) {
|
if (smartNameFieldMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
previousTypes = QueryParseContext.setTypesWithPrevious(new String[]{smartNameFieldMappers.docMapper().type()});
|
previousTypes = QueryParseContext.setTypesWithPrevious(new String[]{smartNameFieldMappers.docMapper().type()});
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
@ -120,7 +120,7 @@ public class TermsQueryParser implements QueryParser {
|
||||||
}
|
}
|
||||||
return wrapSmartNameQuery(optimizeQuery(fixNegativeQueryIfNeeded(query)), smartNameFieldMappers, parseContext);
|
return wrapSmartNameQuery(optimizeQuery(fixNegativeQueryIfNeeded(query)), smartNameFieldMappers, parseContext);
|
||||||
} finally {
|
} finally {
|
||||||
if (smartNameFieldMappers != null && smartNameFieldMappers.hasDocMapper()) {
|
if (smartNameFieldMappers != null && smartNameFieldMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
QueryParseContext.setTypes(previousTypes);
|
QueryParseContext.setTypes(previousTypes);
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
|
@ -83,7 +83,7 @@ public final class QueryParsers {
|
||||||
if (smartFieldMappers == null) {
|
if (smartFieldMappers == null) {
|
||||||
return query;
|
return query;
|
||||||
}
|
}
|
||||||
if (!smartFieldMappers.hasDocMapper() || !smartFieldMappers.explicitTypeInName()) {
|
if (!smartFieldMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
return query;
|
return query;
|
||||||
}
|
}
|
||||||
DocumentMapper docMapper = smartFieldMappers.docMapper();
|
DocumentMapper docMapper = smartFieldMappers.docMapper();
|
||||||
|
@ -95,7 +95,7 @@ public final class QueryParsers {
|
||||||
if (smartFieldMappers == null) {
|
if (smartFieldMappers == null) {
|
||||||
return filter;
|
return filter;
|
||||||
}
|
}
|
||||||
if (!smartFieldMappers.hasDocMapper() || !smartFieldMappers.explicitTypeInName()) {
|
if (!smartFieldMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
return filter;
|
return filter;
|
||||||
}
|
}
|
||||||
DocumentMapper docMapper = smartFieldMappers.docMapper();
|
DocumentMapper docMapper = smartFieldMappers.docMapper();
|
||||||
|
|
|
@ -112,7 +112,7 @@ public class TextQueryParser {
|
||||||
}
|
}
|
||||||
|
|
||||||
if (mapper != null && mapper.useFieldQueryWithQueryString()) {
|
if (mapper != null && mapper.useFieldQueryWithQueryString()) {
|
||||||
if (smartNameFieldMappers.hasDocMapper()) {
|
if (smartNameFieldMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
String[] previousTypes = QueryParseContext.setTypesWithPrevious(new String[]{smartNameFieldMappers.docMapper().type()});
|
String[] previousTypes = QueryParseContext.setTypesWithPrevious(new String[]{smartNameFieldMappers.docMapper().type()});
|
||||||
try {
|
try {
|
||||||
return wrapSmartNameQuery(mapper.fieldQuery(text, parseContext), smartNameFieldMappers, parseContext);
|
return wrapSmartNameQuery(mapper.fieldQuery(text, parseContext), smartNameFieldMappers, parseContext);
|
||||||
|
|
|
@ -64,7 +64,7 @@ public class CountDateHistogramFacetCollector extends AbstractFacetCollector {
|
||||||
}
|
}
|
||||||
|
|
||||||
// add type filter if there is exact doc mapper associated with it
|
// add type filter if there is exact doc mapper associated with it
|
||||||
if (smartMappers.hasDocMapper() && smartMappers.explicitTypeInName()) {
|
if (smartMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -66,7 +66,7 @@ public class ValueDateHistogramFacetCollector extends AbstractFacetCollector {
|
||||||
}
|
}
|
||||||
|
|
||||||
// add type filter if there is exact doc mapper associated with it
|
// add type filter if there is exact doc mapper associated with it
|
||||||
if (smartMappers.hasDocMapper() && smartMappers.explicitTypeInName()) {
|
if (smartMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -69,7 +69,7 @@ public class ValueScriptDateHistogramFacetCollector extends AbstractFacetCollect
|
||||||
}
|
}
|
||||||
|
|
||||||
// add type filter if there is exact doc mapper associated with it
|
// add type filter if there is exact doc mapper associated with it
|
||||||
if (smartMappers.hasDocMapper() && smartMappers.explicitTypeInName()) {
|
if (smartMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -78,7 +78,7 @@ public class GeoDistanceFacetCollector extends AbstractFacetCollector {
|
||||||
}
|
}
|
||||||
|
|
||||||
// add type filter if there is exact doc mapper associated with it
|
// add type filter if there is exact doc mapper associated with it
|
||||||
if (smartMappers.hasDocMapper() && smartMappers.explicitTypeInName()) {
|
if (smartMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ public class BoundedCountHistogramFacetCollector extends AbstractFacetCollector
|
||||||
}
|
}
|
||||||
|
|
||||||
// add type filter if there is exact doc mapper associated with it
|
// add type filter if there is exact doc mapper associated with it
|
||||||
if (smartMappers.hasDocMapper() && smartMappers.explicitTypeInName()) {
|
if (smartMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ public class BoundedValueHistogramFacetCollector extends AbstractFacetCollector
|
||||||
}
|
}
|
||||||
|
|
||||||
// add type filter if there is exact doc mapper associated with it
|
// add type filter if there is exact doc mapper associated with it
|
||||||
if (smartMappers.hasDocMapper() && smartMappers.explicitTypeInName()) {
|
if (smartMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -67,7 +67,7 @@ public class BoundedValueScriptHistogramFacetCollector extends AbstractFacetColl
|
||||||
}
|
}
|
||||||
|
|
||||||
// add type filter if there is exact doc mapper associated with it
|
// add type filter if there is exact doc mapper associated with it
|
||||||
if (smartMappers.hasDocMapper() && smartMappers.explicitTypeInName()) {
|
if (smartMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -38,8 +38,6 @@ import java.io.IOException;
|
||||||
/**
|
/**
|
||||||
* A histogram facet collector that uses the same field as the key as well as the
|
* A histogram facet collector that uses the same field as the key as well as the
|
||||||
* value.
|
* value.
|
||||||
*
|
|
||||||
*
|
|
||||||
*/
|
*/
|
||||||
public class CountHistogramFacetCollector extends AbstractFacetCollector {
|
public class CountHistogramFacetCollector extends AbstractFacetCollector {
|
||||||
|
|
||||||
|
@ -66,7 +64,7 @@ public class CountHistogramFacetCollector extends AbstractFacetCollector {
|
||||||
}
|
}
|
||||||
|
|
||||||
// add type filter if there is exact doc mapper associated with it
|
// add type filter if there is exact doc mapper associated with it
|
||||||
if (smartMappers.hasDocMapper() && smartMappers.explicitTypeInName()) {
|
if (smartMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -64,7 +64,7 @@ public class FullHistogramFacetCollector extends AbstractFacetCollector {
|
||||||
}
|
}
|
||||||
|
|
||||||
// add type filter if there is exact doc mapper associated with it
|
// add type filter if there is exact doc mapper associated with it
|
||||||
if (smartMappers.hasDocMapper() && smartMappers.explicitTypeInName()) {
|
if (smartMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -68,7 +68,7 @@ public class ValueHistogramFacetCollector extends AbstractFacetCollector {
|
||||||
}
|
}
|
||||||
|
|
||||||
// add type filter if there is exact doc mapper associated with it
|
// add type filter if there is exact doc mapper associated with it
|
||||||
if (smartMappers.hasDocMapper() && smartMappers.explicitTypeInName()) {
|
if (smartMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -69,7 +69,7 @@ public class ValueScriptHistogramFacetCollector extends AbstractFacetCollector {
|
||||||
}
|
}
|
||||||
|
|
||||||
// add type filter if there is exact doc mapper associated with it
|
// add type filter if there is exact doc mapper associated with it
|
||||||
if (smartMappers.hasDocMapper() && smartMappers.explicitTypeInName()) {
|
if (smartMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -62,7 +62,7 @@ public class KeyValueRangeFacetCollector extends AbstractFacetCollector {
|
||||||
}
|
}
|
||||||
|
|
||||||
// add type filter if there is exact doc mapper associated with it
|
// add type filter if there is exact doc mapper associated with it
|
||||||
if (smartMappers.hasDocMapper() && smartMappers.explicitTypeInName()) {
|
if (smartMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -59,7 +59,7 @@ public class RangeFacetCollector extends AbstractFacetCollector {
|
||||||
}
|
}
|
||||||
|
|
||||||
// add type filter if there is exact doc mapper associated with it
|
// add type filter if there is exact doc mapper associated with it
|
||||||
if (smartMappers.hasDocMapper() && smartMappers.explicitTypeInName()) {
|
if (smartMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -56,7 +56,7 @@ public class StatisticalFacetCollector extends AbstractFacetCollector {
|
||||||
}
|
}
|
||||||
|
|
||||||
// add type filter if there is exact doc mapper associated with it
|
// add type filter if there is exact doc mapper associated with it
|
||||||
if (smartMappers.hasDocMapper() && smartMappers.explicitTypeInName()) {
|
if (smartMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -83,7 +83,7 @@ public class TermsByteFacetCollector extends AbstractFacetCollector {
|
||||||
}
|
}
|
||||||
|
|
||||||
// add type filter if there is exact doc mapper associated with it
|
// add type filter if there is exact doc mapper associated with it
|
||||||
if (smartMappers.hasDocMapper() && smartMappers.explicitTypeInName()) {
|
if (smartMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -86,7 +86,7 @@ public class TermsByteOrdinalsFacetCollector extends AbstractFacetCollector {
|
||||||
}
|
}
|
||||||
|
|
||||||
// add type filter if there is exact doc mapper associated with it
|
// add type filter if there is exact doc mapper associated with it
|
||||||
if (smartMappers.hasDocMapper() && smartMappers.explicitTypeInName()) {
|
if (smartMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ public class TermsDoubleFacetCollector extends AbstractFacetCollector {
|
||||||
throw new ElasticSearchIllegalArgumentException("Field [" + fieldName + "] doesn't have a type, can't run terms double facet collector on it");
|
throw new ElasticSearchIllegalArgumentException("Field [" + fieldName + "] doesn't have a type, can't run terms double facet collector on it");
|
||||||
}
|
}
|
||||||
// add type filter if there is exact doc mapper associated with it
|
// add type filter if there is exact doc mapper associated with it
|
||||||
if (smartMappers.hasDocMapper() && smartMappers.explicitTypeInName()) {
|
if (smartMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@ public class TermsDoubleOrdinalsFacetCollector extends AbstractFacetCollector {
|
||||||
throw new ElasticSearchIllegalArgumentException("Field [" + fieldName + "] doesn't have a type, can't run terms double facet collector on it");
|
throw new ElasticSearchIllegalArgumentException("Field [" + fieldName + "] doesn't have a type, can't run terms double facet collector on it");
|
||||||
}
|
}
|
||||||
// add type filter if there is exact doc mapper associated with it
|
// add type filter if there is exact doc mapper associated with it
|
||||||
if (smartMappers.hasDocMapper() && smartMappers.explicitTypeInName()) {
|
if (smartMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ public class TermsFloatFacetCollector extends AbstractFacetCollector {
|
||||||
throw new ElasticSearchIllegalArgumentException("Field [" + fieldName + "] doesn't have a type, can't run terms float facet collector on it");
|
throw new ElasticSearchIllegalArgumentException("Field [" + fieldName + "] doesn't have a type, can't run terms float facet collector on it");
|
||||||
}
|
}
|
||||||
// add type filter if there is exact doc mapper associated with it
|
// add type filter if there is exact doc mapper associated with it
|
||||||
if (smartMappers.hasDocMapper() && smartMappers.explicitTypeInName()) {
|
if (smartMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@ public class TermsFloatOrdinalsFacetCollector extends AbstractFacetCollector {
|
||||||
throw new ElasticSearchIllegalArgumentException("Field [" + fieldName + "] doesn't have a type, can't run terms float facet collector on it");
|
throw new ElasticSearchIllegalArgumentException("Field [" + fieldName + "] doesn't have a type, can't run terms float facet collector on it");
|
||||||
}
|
}
|
||||||
// add type filter if there is exact doc mapper associated with it
|
// add type filter if there is exact doc mapper associated with it
|
||||||
if (smartMappers.hasDocMapper() && smartMappers.explicitTypeInName()) {
|
if (smartMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ public class TermsIntFacetCollector extends AbstractFacetCollector {
|
||||||
throw new ElasticSearchIllegalArgumentException("Field [" + fieldName + "] doesn't have a type, can't run terms int facet collector on it");
|
throw new ElasticSearchIllegalArgumentException("Field [" + fieldName + "] doesn't have a type, can't run terms int facet collector on it");
|
||||||
}
|
}
|
||||||
// add type filter if there is exact doc mapper associated with it
|
// add type filter if there is exact doc mapper associated with it
|
||||||
if (smartMappers.hasDocMapper() && smartMappers.explicitTypeInName()) {
|
if (smartMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@ public class TermsIntOrdinalsFacetCollector extends AbstractFacetCollector {
|
||||||
throw new ElasticSearchIllegalArgumentException("Field [" + fieldName + "] doesn't have a type, can't run terms int facet collector on it");
|
throw new ElasticSearchIllegalArgumentException("Field [" + fieldName + "] doesn't have a type, can't run terms int facet collector on it");
|
||||||
}
|
}
|
||||||
// add type filter if there is exact doc mapper associated with it
|
// add type filter if there is exact doc mapper associated with it
|
||||||
if (smartMappers.hasDocMapper() && smartMappers.explicitTypeInName()) {
|
if (smartMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -79,7 +79,7 @@ public class TermsIpFacetCollector extends AbstractFacetCollector {
|
||||||
throw new ElasticSearchIllegalArgumentException("Field [" + fieldName + "] doesn't have a type, can't run terms long facet collector on it");
|
throw new ElasticSearchIllegalArgumentException("Field [" + fieldName + "] doesn't have a type, can't run terms long facet collector on it");
|
||||||
}
|
}
|
||||||
// add type filter if there is exact doc mapper associated with it
|
// add type filter if there is exact doc mapper associated with it
|
||||||
if (smartMappers.hasDocMapper() && smartMappers.explicitTypeInName()) {
|
if (smartMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@ public class TermsIpOrdinalsFacetCollector extends AbstractFacetCollector {
|
||||||
throw new ElasticSearchIllegalArgumentException("Field [" + fieldName + "] doesn't have a type, can't run terms long facet collector on it");
|
throw new ElasticSearchIllegalArgumentException("Field [" + fieldName + "] doesn't have a type, can't run terms long facet collector on it");
|
||||||
}
|
}
|
||||||
// add type filter if there is exact doc mapper associated with it
|
// add type filter if there is exact doc mapper associated with it
|
||||||
if (smartMappers.hasDocMapper() && smartMappers.explicitTypeInName()) {
|
if (smartMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -89,7 +89,7 @@ public class TermsLongFacetCollector extends AbstractFacetCollector {
|
||||||
throw new ElasticSearchIllegalArgumentException("Field [" + fieldName + "] doesn't have a type, can't run terms long facet collector on it");
|
throw new ElasticSearchIllegalArgumentException("Field [" + fieldName + "] doesn't have a type, can't run terms long facet collector on it");
|
||||||
}
|
}
|
||||||
// add type filter if there is exact doc mapper associated with it
|
// add type filter if there is exact doc mapper associated with it
|
||||||
if (smartMappers.hasDocMapper() && smartMappers.explicitTypeInName()) {
|
if (smartMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@ public class TermsLongOrdinalsFacetCollector extends AbstractFacetCollector {
|
||||||
throw new ElasticSearchIllegalArgumentException("Field [" + fieldName + "] doesn't have a type, can't run terms long facet collector on it");
|
throw new ElasticSearchIllegalArgumentException("Field [" + fieldName + "] doesn't have a type, can't run terms long facet collector on it");
|
||||||
}
|
}
|
||||||
// add type filter if there is exact doc mapper associated with it
|
// add type filter if there is exact doc mapper associated with it
|
||||||
if (smartMappers.hasDocMapper() && smartMappers.explicitTypeInName()) {
|
if (smartMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -82,7 +82,7 @@ public class TermsShortFacetCollector extends AbstractFacetCollector {
|
||||||
throw new ElasticSearchIllegalArgumentException("Field [" + fieldName + "] doesn't have a type, can't run terms short facet collector on it");
|
throw new ElasticSearchIllegalArgumentException("Field [" + fieldName + "] doesn't have a type, can't run terms short facet collector on it");
|
||||||
}
|
}
|
||||||
// add type filter if there is exact doc mapper associated with it
|
// add type filter if there is exact doc mapper associated with it
|
||||||
if (smartMappers.hasDocMapper() && smartMappers.explicitTypeInName()) {
|
if (smartMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -85,7 +85,7 @@ public class TermsShortOrdinalsFacetCollector extends AbstractFacetCollector {
|
||||||
throw new ElasticSearchIllegalArgumentException("Field [" + fieldName + "] doesn't have a type, can't run terms short facet collector on it");
|
throw new ElasticSearchIllegalArgumentException("Field [" + fieldName + "] doesn't have a type, can't run terms short facet collector on it");
|
||||||
}
|
}
|
||||||
// add type filter if there is exact doc mapper associated with it
|
// add type filter if there is exact doc mapper associated with it
|
||||||
if (smartMappers.hasDocMapper() && smartMappers.explicitTypeInName()) {
|
if (smartMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -88,7 +88,7 @@ public class TermsStringOrdinalsFacetCollector extends AbstractFacetCollector {
|
||||||
throw new ElasticSearchIllegalArgumentException("Field [" + fieldName + "] doesn't have a type, can't run terms long facet collector on it");
|
throw new ElasticSearchIllegalArgumentException("Field [" + fieldName + "] doesn't have a type, can't run terms long facet collector on it");
|
||||||
}
|
}
|
||||||
// add type filter if there is exact doc mapper associated with it
|
// add type filter if there is exact doc mapper associated with it
|
||||||
if (smartMappers.hasDocMapper() && smartMappers.explicitTypeInName()) {
|
if (smartMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -80,7 +80,7 @@ public class TermsStatsDoubleFacetCollector extends AbstractFacetCollector {
|
||||||
this.keyFieldDataType = FieldDataType.DefaultTypes.STRING;
|
this.keyFieldDataType = FieldDataType.DefaultTypes.STRING;
|
||||||
} else {
|
} else {
|
||||||
// add type filter if there is exact doc mapper associated with it
|
// add type filter if there is exact doc mapper associated with it
|
||||||
if (smartMappers.hasDocMapper() && smartMappers.explicitTypeInName()) {
|
if (smartMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,7 @@ public class TermsStatsLongFacetCollector extends AbstractFacetCollector {
|
||||||
this.keyFieldDataType = FieldDataType.DefaultTypes.STRING;
|
this.keyFieldDataType = FieldDataType.DefaultTypes.STRING;
|
||||||
} else {
|
} else {
|
||||||
// add type filter if there is exact doc mapper associated with it
|
// add type filter if there is exact doc mapper associated with it
|
||||||
if (smartMappers.hasDocMapper() && smartMappers.explicitTypeInName()) {
|
if (smartMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
|
@ -81,7 +81,7 @@ public class TermsStatsStringFacetCollector extends AbstractFacetCollector {
|
||||||
this.keyFieldDataType = FieldDataType.DefaultTypes.STRING;
|
this.keyFieldDataType = FieldDataType.DefaultTypes.STRING;
|
||||||
} else {
|
} else {
|
||||||
// add type filter if there is exact doc mapper associated with it
|
// add type filter if there is exact doc mapper associated with it
|
||||||
if (smartMappers.hasDocMapper() && smartMappers.explicitTypeInName()) {
|
if (smartMappers.explicitTypeInNameWithDocMapper()) {
|
||||||
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
setFilter(context.filterCache().cache(smartMappers.docMapper().typeFilter()));
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue