Class ExtendedQuery

java.lang.Object
de.cxp.ocs.elasticsearch.model.query.ExtendedQuery
All Implemented Interfaces:
AnalyzedQuery

public class ExtendedQuery extends Object implements AnalyzedQuery
A query that consists of an analyzed query extended by filters (and maybe more in the future).
Author:
Rudolf Batt
  • Field Details

  • Constructor Details

  • Method Details

    • isEmpty

      public boolean isEmpty()
    • getInputTerms

      public List<String> getInputTerms()
      Description copied from interface: AnalyzedQuery
      The original input terms that were used to create that query string.
      Specified by:
      getInputTerms in interface AnalyzedQuery
      Returns:
      list of unescaped terms
    • toQueryString

      public String toQueryString()
      Description copied from interface: AnalyzedQuery
      Transform into string according to the ElasticSearch Query String syntax. TODO: change into Visitor Pattern Style: A method that accepts a visitor that is passed trough all the terms of the query. Similar to org.apache.lucene.search.QueryVisitor. This can then be used to generate the required query (LuceneQuery, structured ElasticsearchQuery, SQL Query.. =)).
      Specified by:
      toQueryString in interface AnalyzedQuery
      Returns:
      term in query-string-query format.
    • accept

      public void accept(QueryTermVisitor visitor)
      Specified by:
      accept in interface AnalyzedQuery