Examples of termQuery()


Examples of org.elasticsearch.index.mapper.FieldMapper.termQuery()

            if (smartNameFieldMappers.explicitTypeInNameWithDocMapper()) {
                String[] previousTypes = QueryParseContext.setTypesWithPrevious(
                        new String[]{smartNameFieldMappers.docMapper().type()});
                try {
                    return wrapSmartNameQuery(
                            mapper.termQuery(queryString, null),
                            smartNameFieldMappers,
                            indexCache
                    );
                } catch (RuntimeException e) {
                    return null;
View Full Code Here

Examples of org.elasticsearch.index.mapper.FieldMapper.termQuery()

                    QueryParseContext.setTypes(previousTypes);
                }
            } else {
                try {
                    return wrapSmartNameQuery(
                            mapper.termQuery(queryString, null),
                            smartNameFieldMappers,
                            indexCache
                    );
                } catch (RuntimeException e) {
                    return null;
View Full Code Here

Examples of org.elasticsearch.index.mapper.FieldMapper.termQuery()

        if (mapper != null && mapper.useTermQueryWithQueryString() && !forceAnalyzeQueryString()) {
            if (smartNameFieldMappers.explicitTypeInNameWithDocMapper()) {
                String[] previousTypes = QueryParseContext.setTypesWithPrevious(new String[]{smartNameFieldMappers.docMapper().type()});
                try {
                    return wrapSmartNameQuery(mapper.termQuery(value, parseContext), smartNameFieldMappers, parseContext);
                } catch (RuntimeException e) {
                    if (lenient) {
                        return null;
                    }
                    throw e;
View Full Code Here

Examples of org.elasticsearch.index.mapper.FieldMapper.termQuery()

                } finally {
                    QueryParseContext.setTypes(previousTypes);
                }
            } else {
                try {
                    return wrapSmartNameQuery(mapper.termQuery(value, parseContext), smartNameFieldMappers, parseContext);
                } catch (RuntimeException e) {
                    if (lenient) {
                        return null;
                    }
                    throw e;
View Full Code Here

Examples of org.elasticsearch.index.mapper.FieldMapper.termQuery()

        try {
            BooleanQuery booleanQuery = new BooleanQuery(disableCoord);
            for (Object value : values) {
                if (mapper != null) {
                    booleanQuery.add(new BooleanClause(mapper.termQuery(value, parseContext), BooleanClause.Occur.SHOULD));
                } else {
                    booleanQuery.add(new TermQuery(new Term(fieldName, BytesRefs.toString(value))), BooleanClause.Occur.SHOULD);
                }
            }
            booleanQuery.setBoost(boost);
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.