org.elasticsearch.common.lucene.search
Class Queries

java.lang.Object
  extended by org.elasticsearch.common.lucene.search.Queries

public class Queries
extends java.lang.Object


Field Summary
static org.apache.lucene.search.Filter MATCH_ALL_FILTER
          A match all docs filter.
static org.apache.lucene.search.Query MATCH_ALL_QUERY
           
 
Constructor Summary
Queries()
           
 
Method Summary
static java.util.List<org.apache.lucene.search.Query> disMaxClauses(org.apache.lucene.search.DisjunctionMaxQuery query)
           
static org.apache.lucene.search.Query fixNegativeQueryIfNeeded(org.apache.lucene.search.Query q)
           
static boolean isNegativeQuery(org.apache.lucene.search.Query q)
           
static org.apache.lucene.search.Query optimizeQuery(org.apache.lucene.search.Query q)
          Optimizes the given query and returns the optimized version of it.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

MATCH_ALL_QUERY

public static final org.apache.lucene.search.Query MATCH_ALL_QUERY

MATCH_ALL_FILTER

public static final org.apache.lucene.search.Filter MATCH_ALL_FILTER
A match all docs filter. Note, requires no caching!.

Constructor Detail

Queries

public Queries()
Method Detail

disMaxClauses

public static java.util.List<org.apache.lucene.search.Query> disMaxClauses(org.apache.lucene.search.DisjunctionMaxQuery query)

optimizeQuery

public static org.apache.lucene.search.Query optimizeQuery(org.apache.lucene.search.Query q)
Optimizes the given query and returns the optimized version of it.


isNegativeQuery

public static boolean isNegativeQuery(org.apache.lucene.search.Query q)

fixNegativeQueryIfNeeded

public static org.apache.lucene.search.Query fixNegativeQueryIfNeeded(org.apache.lucene.search.Query q)