Examples of minimumShouldMatch()


Examples of org.apache.lucene.queryparser.classic.QueryParserSettings.minimumShouldMatch()

                } else if ("analyze_wildcard".equals(currentFieldName) || "analyzeWildcard".equals(currentFieldName)) {
                    qpSettings.analyzeWildcard(parser.booleanValue());
                } else if ("rewrite".equals(currentFieldName)) {
                    qpSettings.rewriteMethod(QueryParsers.parseRewriteMethod(parser.textOrNull()));
                } else if ("minimum_should_match".equals(currentFieldName) || "minimumShouldMatch".equals(currentFieldName)) {
                    qpSettings.minimumShouldMatch(parser.textOrNull());
                } else if ("quote_field_suffix".equals(currentFieldName) || "quoteFieldSuffix".equals(currentFieldName)) {
                    qpSettings.quoteFieldSuffix(parser.textOrNull());
                } else if ("lenient".equalsIgnoreCase(currentFieldName)) {
                    qpSettings.lenient(parser.booleanValue());
                } else if ("locale".equals(currentFieldName)) {
View Full Code Here

Examples of org.apache.lucene.queryparser.classic.QueryParserSettings.minimumShouldMatch()

            if (qpSettings.boost() != QueryParserSettings.DEFAULT_BOOST) {
                query.setBoost(query.getBoost() * qpSettings.boost());
            }
            query = fixNegativeQueryIfNeeded(query);
            if (query instanceof BooleanQuery) {
                Queries.applyMinimumShouldMatch((BooleanQuery) query, qpSettings.minimumShouldMatch());
            }
            parseContext.queryParserCache().put(qpSettings, query);
            if (queryName != null) {
                parseContext.addNamedQuery(queryName, query);
            }
View Full Code Here

Examples of org.elasticsearch.action.mlt.MoreLikeThisRequest.minimumShouldMatch()

        mltRequest.listenerThreaded(false);
        //TODO the ParseField class that encapsulates the supported names used for an attribute
        //needs some work if it is to be used in a REST context like this too
        // See the MoreLikeThisQueryParser constants that hold the valid syntax
        mltRequest.fields(request.paramAsStringArray("mlt_fields", null));
        mltRequest.minimumShouldMatch(request.param("minimum_should_match", "0"));
        mltRequest.minTermFreq(request.paramAsInt("min_term_freq", -1));
        mltRequest.maxQueryTerms(request.paramAsInt("max_query_terms", -1));
        mltRequest.stopWords(request.paramAsStringArray("stop_words", null));
        mltRequest.minDocFreq(request.paramAsInt("min_doc_freq", -1));
        mltRequest.maxDocFreq(request.paramAsInt("max_doc_freq", -1));
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.