Package org.elasticsearch.common.lucene.all

Examples of org.elasticsearch.common.lucene.all.AllTermQuery


    public boolean enabled() {
        return this.enabled;
    }

    @Override public Query queryStringTermQuery(Term term) {
        return new AllTermQuery(term);
    }
View Full Code Here


    @Override public Query queryStringTermQuery(Term term) {
        return new AllTermQuery(term);
    }

    @Override public Query fieldQuery(String value, QueryParseContext context) {
        return new AllTermQuery(termFactory.createTerm(value));
    }
View Full Code Here

    public Query queryStringTermQuery(Term term) {
        if (!autoBoost) {
            return new TermQuery(term);
        }
        if (fieldType.indexOptions().compareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) >= 0) {
            return new AllTermQuery(term);
        }
        return new TermQuery(term);
    }
View Full Code Here

        }

        Term term = new Term("foo", "bar");
        Query query = builtDocMapper.allFieldMapper().queryStringTermQuery(term);
        if (autoBoost) {
            assertThat(query, equalTo((Query)new AllTermQuery(term)));
        } else {
            assertThat(query, equalTo((Query)new TermQuery(term)));
        }
        if (similarity == null || similarity.equals("TF/IDF")) {
            assertThat(builtDocMapper.allFieldMapper().similarity(), nullValue());
View Full Code Here

TOP

Related Classes of org.elasticsearch.common.lucene.all.AllTermQuery

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.