org.elasticsearch.action.admin.indices.analyze
Class AnalyzeRequestBuilder

java.lang.Object
  extended by org.elasticsearch.action.admin.indices.support.BaseIndicesRequestBuilder<AnalyzeRequest,AnalyzeResponse>
      extended by org.elasticsearch.action.admin.indices.analyze.AnalyzeRequestBuilder
All Implemented Interfaces:
ActionRequestBuilder<AnalyzeRequest,AnalyzeResponse>

public class AnalyzeRequestBuilder
extends BaseIndicesRequestBuilder<AnalyzeRequest,AnalyzeResponse>


Field Summary
 
Fields inherited from class org.elasticsearch.action.admin.indices.support.BaseIndicesRequestBuilder
client, request
 
Constructor Summary
AnalyzeRequestBuilder(IndicesAdminClient indicesClient)
           
AnalyzeRequestBuilder(IndicesAdminClient indicesClient, String index, String text)
           
 
Method Summary
protected  void doExecute(ActionListener<AnalyzeResponse> listener)
           
 AnalyzeRequestBuilder setAnalyzer(String analyzer)
          Sets the analyzer name to use in order to analyze the text.
 AnalyzeRequestBuilder setField(String field)
          Sets the field that its analyzer will be used to analyze the text.
 AnalyzeRequestBuilder setIndex(String index)
          Sets the index to use to analyzer the text (for example, if it holds specific analyzers registered).
 AnalyzeRequestBuilder setPreferLocal(boolean preferLocal)
          if this operation hits a node with a local relevant shard, should it be preferred to be executed on, or just do plain round robin.
 AnalyzeRequestBuilder setTokenFilters(String... tokenFilters)
          Sets token filters that will be used on top of a tokenizer provided.
 AnalyzeRequestBuilder setTokenizer(String tokenizer)
          Instead of setting the analyzer, sets the tokenizer that will be used as part of a custom analyzer.
 
Methods inherited from class org.elasticsearch.action.admin.indices.support.BaseIndicesRequestBuilder
execute, execute, request
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

AnalyzeRequestBuilder

public AnalyzeRequestBuilder(IndicesAdminClient indicesClient)

AnalyzeRequestBuilder

public AnalyzeRequestBuilder(IndicesAdminClient indicesClient,
                             String index,
                             String text)
Method Detail

setIndex

public AnalyzeRequestBuilder setIndex(String index)
Sets the index to use to analyzer the text (for example, if it holds specific analyzers registered).


setAnalyzer

public AnalyzeRequestBuilder setAnalyzer(String analyzer)
Sets the analyzer name to use in order to analyze the text.

Parameters:
analyzer - The analyzer name.

setField

public AnalyzeRequestBuilder setField(String field)
Sets the field that its analyzer will be used to analyze the text. Note, requires an index to be set.


setTokenizer

public AnalyzeRequestBuilder setTokenizer(String tokenizer)
Instead of setting the analyzer, sets the tokenizer that will be used as part of a custom analyzer.


setTokenFilters

public AnalyzeRequestBuilder setTokenFilters(String... tokenFilters)
Sets token filters that will be used on top of a tokenizer provided.


setPreferLocal

public AnalyzeRequestBuilder setPreferLocal(boolean preferLocal)
if this operation hits a node with a local relevant shard, should it be preferred to be executed on, or just do plain round robin. Defaults to true


doExecute

protected void doExecute(ActionListener<AnalyzeResponse> listener)
Specified by:
doExecute in class BaseIndicesRequestBuilder<AnalyzeRequest,AnalyzeResponse>


Copyright © 2009-2012. All Rights Reserved.