Package org.apache.lucene.queryParser

Examples of org.apache.lucene.queryParser.MultiFieldQueryParserSettings.fields()


        if (query != null) {
            return query;
        }

        MapperQueryParser queryParser;
        if (qpSettings.fields() != null) {
            if (qpSettings.fields().size() == 1) {
                qpSettings.defaultField(qpSettings.fields().get(0));
                queryParser = parseContext.singleQueryParser(qpSettings);
            } else {
                qpSettings.defaultField(null); // reset defaultField when using multi query parser
View Full Code Here


            return query;
        }

        MapperQueryParser queryParser;
        if (qpSettings.fields() != null) {
            if (qpSettings.fields().size() == 1) {
                qpSettings.defaultField(qpSettings.fields().get(0));
                queryParser = parseContext.singleQueryParser(qpSettings);
            } else {
                qpSettings.defaultField(null); // reset defaultField when using multi query parser
                queryParser = parseContext.multiQueryParser(qpSettings);
View Full Code Here

        }

        MapperQueryParser queryParser;
        if (qpSettings.fields() != null) {
            if (qpSettings.fields().size() == 1) {
                qpSettings.defaultField(qpSettings.fields().get(0));
                queryParser = parseContext.singleQueryParser(qpSettings);
            } else {
                qpSettings.defaultField(null); // reset defaultField when using multi query parser
                queryParser = parseContext.multiQueryParser(qpSettings);
            }
View Full Code Here

                            }
                        }
                        if (fField == null) {
                            fField = parser.text();
                        }
                        if (qpSettings.fields() == null) {
                            qpSettings.fields(Lists.<String>newArrayList());
                        }

                        if (Regex.isSimpleMatchPattern(fField)) {
                            for (String field : parseContext.mapperService().simpleMatchToIndexNames(fField)) {
View Full Code Here

                        }
                        if (fField == null) {
                            fField = parser.text();
                        }
                        if (qpSettings.fields() == null) {
                            qpSettings.fields(Lists.<String>newArrayList());
                        }

                        if (Regex.isSimpleMatchPattern(fField)) {
                            for (String field : parseContext.mapperService().simpleMatchToIndexNames(fField)) {
                                qpSettings.fields().add(field);
View Full Code Here

                            qpSettings.fields(Lists.<String>newArrayList());
                        }

                        if (Regex.isSimpleMatchPattern(fField)) {
                            for (String field : parseContext.mapperService().simpleMatchToIndexNames(fField)) {
                                qpSettings.fields().add(field);
                                if (fBoost != -1) {
                                    if (qpSettings.boosts() == null) {
                                        qpSettings.boosts(new TObjectFloatHashMap<String>(Constants.DEFAULT_CAPACITY, Constants.DEFAULT_LOAD_FACTOR, 1.0f));
                                    }
                                    qpSettings.boosts().put(field, fBoost);
View Full Code Here

                                    }
                                    qpSettings.boosts().put(field, fBoost);
                                }
                            }
                        } else {
                            qpSettings.fields().add(fField);
                            if (fBoost != -1) {
                                if (qpSettings.boosts() == null) {
                                    qpSettings.boosts(new TObjectFloatHashMap<String>(Constants.DEFAULT_CAPACITY, Constants.DEFAULT_LOAD_FACTOR, 1.0f));
                                }
                                qpSettings.boosts().put(fField, fBoost);
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.