org.elasticsearch.index.query
Class PrefixQueryBuilder
java.lang.Object
org.elasticsearch.index.query.BaseQueryBuilder
org.elasticsearch.index.query.PrefixQueryBuilder
- All Implemented Interfaces:
- ToXContent, QueryBuilder
public class PrefixQueryBuilder
- extends BaseQueryBuilder
A Query that matches documents containing terms with a specified prefix.
Constructor Summary |
PrefixQueryBuilder(java.lang.String name,
java.lang.String prefix)
A Query that matches documents containing terms with a specified prefix. |
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait |
PrefixQueryBuilder
public PrefixQueryBuilder(java.lang.String name,
java.lang.String prefix)
- A Query that matches documents containing terms with a specified prefix.
- Parameters:
name
- The name of the fieldprefix
- The prefix query
boost
public PrefixQueryBuilder 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.
rewrite
public PrefixQueryBuilder rewrite(java.lang.String rewrite)
doXContent
public void doXContent(XContentBuilder builder,
ToXContent.Params params)
throws java.io.IOException
- Specified by:
doXContent
in class BaseQueryBuilder
- Throws:
java.io.IOException