Search in sources :

Example 36 with TermQueryBuilder

use of org.elasticsearch.index.query.TermQueryBuilder in project fess by codelibs.

the class EsAbstractConditionQuery method regTermQ.

protected TermQueryBuilder regTermQ(String name, Object value) {
    checkEsInvalidQuery(name, value);
    TermQueryBuilder termQuery = QueryBuilders.termQuery(name, value);
    regQ(termQuery);
    return termQuery;
}
Also used : SpanTermQueryBuilder(org.elasticsearch.index.query.SpanTermQueryBuilder) TermQueryBuilder(org.elasticsearch.index.query.TermQueryBuilder)

Example 37 with TermQueryBuilder

use of org.elasticsearch.index.query.TermQueryBuilder in project fess by codelibs.

the class EsAbstractConditionQuery method regTermQ.

protected TermQueryBuilder regTermQ(String name, Object value) {
    checkEsInvalidQuery(name, value);
    TermQueryBuilder termQuery = QueryBuilders.termQuery(name, value);
    regQ(termQuery);
    return termQuery;
}
Also used : SpanTermQueryBuilder(org.elasticsearch.index.query.SpanTermQueryBuilder) TermQueryBuilder(org.elasticsearch.index.query.TermQueryBuilder)

Example 38 with TermQueryBuilder

use of org.elasticsearch.index.query.TermQueryBuilder in project fess by codelibs.

the class EsAbstractConditionQuery method regTermQ.

protected TermQueryBuilder regTermQ(String name, Object value) {
    checkEsInvalidQuery(name, value);
    TermQueryBuilder termQuery = QueryBuilders.termQuery(name, value);
    regQ(termQuery);
    return termQuery;
}
Also used : SpanTermQueryBuilder(org.elasticsearch.index.query.SpanTermQueryBuilder) TermQueryBuilder(org.elasticsearch.index.query.TermQueryBuilder)

Aggregations

TermQueryBuilder (org.elasticsearch.index.query.TermQueryBuilder)38 SearchResponse (org.elasticsearch.action.search.SearchResponse)20 ElasticsearchAssertions.assertSearchResponse (org.elasticsearch.test.hamcrest.ElasticsearchAssertions.assertSearchResponse)20 SignificantTerms (org.elasticsearch.search.aggregations.bucket.significant.SignificantTerms)14 BytesReference (org.elasticsearch.common.bytes.BytesReference)7 MatchAllQueryBuilder (org.elasticsearch.index.query.MatchAllQueryBuilder)6 Sampler (org.elasticsearch.search.aggregations.bucket.sampler.Sampler)6 Terms (org.elasticsearch.search.aggregations.bucket.terms.Terms)6 AtomicBoolean (java.util.concurrent.atomic.AtomicBoolean)5 DirectoryReader (org.apache.lucene.index.DirectoryReader)5 IndexWriter (org.apache.lucene.index.IndexWriter)5 Directory (org.apache.lucene.store.Directory)5 ElasticsearchDirectoryReader (org.elasticsearch.common.lucene.index.ElasticsearchDirectoryReader)5 ShardRequestCache (org.elasticsearch.index.cache.request.ShardRequestCache)5 QueryBuilder (org.elasticsearch.index.query.QueryBuilder)5 WrapperQueryBuilder (org.elasticsearch.index.query.WrapperQueryBuilder)5 ShardId (org.elasticsearch.index.shard.ShardId)5 Matchers.containsString (org.hamcrest.Matchers.containsString)5 Term (org.apache.lucene.index.Term)4 Bucket (org.elasticsearch.search.aggregations.bucket.significant.SignificantTerms.Bucket)4