Interface QueryBuilder

    • Method Detail

      • toQuery

        Query toQuery​(QueryShardContext context)
               throws IOException
        Converts this QueryBuilder to a lucene Query. Returns null if this query should be ignored in the context of parent queries.
        Parameters:
        context - additional information needed to construct the queries
        Returns:
        the Query or null if this query should be ignored upstream
        Throws:
        IOException
      • queryName

        QueryBuilder queryName​(String queryName)
        Sets the arbitrary name to be assigned to the query (see named queries). Implementers should return the concrete type of the QueryBuilder so that calls can be chained. This is done automatically when extending AbstractQueryBuilder.
      • queryName

        String queryName()
        Returns the arbitrary name assigned to the query (see named queries).
      • boost

        float boost()
        Returns the boost for this query.
      • boost

        QueryBuilder boost​(float boost)
        Sets the boost for this query. Documents matching this query will (in addition to the normal weightings) have their score multiplied by the boost provided. Implementers should return the concrete type of the QueryBuilder so that calls can be chained. This is done automatically when extending AbstractQueryBuilder.
      • getName

        String getName()
        Returns the name that identifies uniquely the query