|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
java.lang.Object org.elasticsearch.action.support.broadcast.BroadcastOperationRequest org.elasticsearch.action.terms.TermsRequest
public class TermsRequest
Terms request represent a request to get terms in one or more indices of specific fields and their document frequencies (in how many document each term exists).
By default, the "_all" field will be used to extract terms and frequencies.
This is very handy to implement things like tag clouds and auto complete (using prefix(String)
or
regexp(String)
).
Nested Class Summary | |
---|---|
static class |
TermsRequest.SortType
The type of sorting for terms. |
Field Summary |
---|
Fields inherited from class org.elasticsearch.action.support.broadcast.BroadcastOperationRequest |
---|
indices, queryHint |
Constructor Summary | |
---|---|
TermsRequest(java.lang.String... indices)
Constructs a new terms requests with the provided indices. |
Method Summary | |
---|---|
boolean |
exact()
Should the doc frequencies be exact frequencies. |
TermsRequest |
exact(boolean exact)
Should the doc frequencies be exact frequencies. |
java.lang.String[] |
fields()
The fields within each document which terms will be iterated over and returned with the document frequencies. |
TermsRequest |
fields(java.lang.String... fields)
The fields within each document which terms will be iterated over and returned with the document frequencies. |
java.lang.String |
from()
The lower bound term from which the iteration will start. |
TermsRequest |
from(java.lang.Object from)
The lower bound term from which the iteration will start. |
boolean |
fromInclusive()
Should the first from (if set using from(Object) be inclusive or not. |
TermsRequest |
fromInclusive(boolean fromInclusive)
Should the first from (if set using from(Object) be inclusive or not. |
TermsRequest |
gt(java.lang.Object from)
Greater than (like setting from with fromIInclusive set to false). |
TermsRequest |
gte(java.lang.Object from)
Greater/equal than (like setting from with fromInclusive set to true). |
TermsRequest |
lt(java.lang.Object to)
Lower then (like setting to with toInclusive set to false) |
TermsRequest |
lte(java.lang.Object to)
Lower/equal then (like setting to with toInclusive set to false) |
int |
maxFreq()
An optional maximum document frequency to filter out terms. |
TermsRequest |
maxFreq(int maxFreq)
An optional maximum document frequency to filter out terms. |
int |
minFreq()
An optional minimum document frequency to filter out terms. |
TermsRequest |
minFreq(int minFreq)
An optional minimum document frequency to filter out terms. |
java.lang.String |
prefix()
An optional prefix from which the terms iteration will start (in lex order). |
TermsRequest |
prefix(java.lang.String prefix)
An optional prefix from which the terms iteration will start (in lex order). |
void |
readFrom(StreamInput in)
|
java.lang.String |
regexp()
An optional regular expression to filter out terms (only the ones that match the regexp will return). |
void |
regexp(java.lang.String regexp)
An optional regular expression to filter out terms (only the ones that match the regexp will return). |
int |
size()
The number of term / doc freq pairs to return per field. |
TermsRequest |
size(int size)
The number of term / doc freq pairs to return per field. |
TermsRequest.SortType |
sortType()
The type of sorting for term / doc freq. |
TermsRequest |
sortType(java.lang.String sortType)
Sets the string representation of the sort type. |
TermsRequest |
sortType(TermsRequest.SortType sortType)
The type of sorting for term / doc freq. |
java.lang.String |
to()
The upper bound term to which the iteration will end. |
TermsRequest |
to(java.lang.Object to)
The upper bound term to which the iteration will end. |
boolean |
toInclusive()
Should the last to (if set using to(Object) be inclusive or not. |
TermsRequest |
toInclusive(boolean toInclusive)
Should the last to (if set using to(Object) be inclusive or not. |
ActionRequestValidationException |
validate()
|
void |
writeTo(StreamOutput out)
|
Methods inherited from class org.elasticsearch.action.support.broadcast.BroadcastOperationRequest |
---|
beforeLocalFork, indices, indices, listenerThreaded, listenerThreaded, operationThreading, operationThreading, operationThreading, queryHint |
Methods inherited from class java.lang.Object |
---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
Constructor Detail |
---|
public TermsRequest(java.lang.String... indices)
Method Detail |
---|
public ActionRequestValidationException validate()
validate
in interface ActionRequest
validate
in class BroadcastOperationRequest
public java.lang.String[] fields()
public TermsRequest fields(java.lang.String... fields)
public java.lang.String from()
public TermsRequest from(java.lang.Object from)
public TermsRequest gt(java.lang.Object from)
public TermsRequest gte(java.lang.Object from)
public TermsRequest lt(java.lang.Object to)
public TermsRequest lte(java.lang.Object to)
public boolean fromInclusive()
from(Object)
be inclusive or not. Defaults
to false (not inclusive / exclusive).
public TermsRequest fromInclusive(boolean fromInclusive)
from(Object)
be inclusive or not. Defaults
to false (not inclusive / exclusive).
public java.lang.String to()
public TermsRequest to(java.lang.Object to)
public boolean toInclusive()
to(Object)
be inclusive or not. Defaults to
true.
public TermsRequest toInclusive(boolean toInclusive)
to(Object)
be inclusive or not. Defaults to
true.
public java.lang.String prefix()
public TermsRequest prefix(java.lang.String prefix)
public java.lang.String regexp()
public void regexp(java.lang.String regexp)
public int minFreq()
public TermsRequest minFreq(int minFreq)
public int maxFreq()
public TermsRequest maxFreq(int maxFreq)
public int size()
public TermsRequest size(int size)
public TermsRequest.SortType sortType()
TermsRequest.SortType.TERM
.
public TermsRequest sortType(TermsRequest.SortType sortType)
TermsRequest.SortType.TERM
.
public TermsRequest sortType(java.lang.String sortType)
public boolean exact()
public TermsRequest exact(boolean exact)
public void writeTo(StreamOutput out) throws java.io.IOException
writeTo
in interface Streamable
writeTo
in class BroadcastOperationRequest
java.io.IOException
public void readFrom(StreamInput in) throws java.io.IOException
readFrom
in interface Streamable
readFrom
in class BroadcastOperationRequest
java.io.IOException
|
|||||||||
PREV CLASS NEXT CLASS | FRAMES NO FRAMES | ||||||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |