Package org.elasticsearch.index.search.child

Examples of org.elasticsearch.index.search.child.CustomQueryWrappingFilter


            return null;
        }

        query.setBoost(boost);
        if (queryName != null) {
            parseContext.addNamedFilter(queryName, new CustomQueryWrappingFilter(query));
        }
        return query;
    }
View Full Code Here


    // and potentially miss a forbidden API usage!
    private static final class QueryWrapperFilterFactory {

        public Filter wrap(Query query, QueryParseContext context) {
            if (context.requireCustomQueryWrappingFilter() || CustomQueryWrappingFilter.shouldUseCustomQueryWrappingFilter(query)) {
                return new CustomQueryWrappingFilter(query);
            } else {
                return new QueryWrapperFilter(query);
            }
        }
View Full Code Here

        Query parentQuery = createParentQuery(innerQuery, parentType, false, parseContext);
        if (parentQuery == null) {
            return null;
        }
        if (filterName != null) {
            parseContext.addNamedFilter(filterName, new CustomQueryWrappingFilter(parentQuery));
        }
        return new CustomQueryWrappingFilter(parentQuery);
    }
View Full Code Here

        // wrap the query with type query
        innerQuery = new FilteredQuery(innerQuery, parseContext.cacheFilter(childDocMapper.typeFilter(), null));
        ParentChildIndexFieldData parentChildIndexFieldData = parseContext.getForField(parentFieldMapper);
        TopChildrenQuery query = new TopChildrenQuery(parentChildIndexFieldData, innerQuery, childType, parentType, scoreType, factor, incrementalFactor, nonNestedDocsFilter);
        if (queryName != null) {
            parseContext.addNamedFilter(queryName, new CustomQueryWrappingFilter(query));
        }
        return query;
    }
View Full Code Here

        } else {
            childrenQuery = new ChildrenConstantScoreQuery(parentChildIndexFieldData, query, parentType, childType, parentFilter,
                    shortCircuitParentDocSet, nonNestedDocsFilter);
        }
        if (filterName != null) {
            parseContext.addNamedFilter(filterName, new CustomQueryWrappingFilter(childrenQuery));
        }
        return new CustomQueryWrappingFilter(childrenQuery);
    }
View Full Code Here

        } else {
            query = new ChildrenConstantScoreQuery(parentChildIndexFieldData, innerQuery, parentType, childType, parentFilter,
                    shortCircuitParentDocSet, nonNestedDocsFilter);
        }
        if (queryName != null) {
            parseContext.addNamedFilter(queryName, new CustomQueryWrappingFilter(query));
        }
        query.setBoost(boost);
        return query;
    }
View Full Code Here

TOP

Related Classes of org.elasticsearch.index.search.child.CustomQueryWrappingFilter

Copyright © 2018 www.massapicom. 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.