Class WildcardQueryBuilder

java.lang.Object
org.elasticsearch.index.query.AbstractQueryBuilder<WildcardQueryBuilder>
org.elasticsearch.index.query.WildcardQueryBuilder
All Implemented Interfaces:
NamedWriteable, Writeable, org.elasticsearch.common.xcontent.ToXContent, org.elasticsearch.common.xcontent.ToXContentObject, MultiTermQueryBuilder, QueryBuilder, Rewriteable<QueryBuilder>

public class WildcardQueryBuilder
extends AbstractQueryBuilder<WildcardQueryBuilder>
implements MultiTermQueryBuilder
Implements the wildcard search query. Supported wildcards are *, which matches any character sequence (including the empty one), and ?, which matches any single character. Note this query can be slow, as it needs to iterate over many terms. In order to prevent extremely slow WildcardQueries, a Wildcard term should not start with one of the wildcards * or ?.
  • Field Details

  • Constructor Details

    • WildcardQueryBuilder

      public WildcardQueryBuilder​(java.lang.String fieldName, java.lang.String value)
      Implements the wildcard search query. Supported wildcards are *, which matches any character sequence (including the empty one), and ?, which matches any single character. Note this query can be slow, as it needs to iterate over many terms. In order to prevent extremely slow WildcardQueries, a Wildcard term should not start with one of the wildcards * or ?.
      Parameters:
      fieldName - The field name
      value - The wildcard query string
    • WildcardQueryBuilder

      public WildcardQueryBuilder​(StreamInput in) throws java.io.IOException
      Read from a stream.
      Throws:
      java.io.IOException
  • Method Details