Class TermvectorsRequest.Builder<TDocument>
java.lang.Object
co.elastic.clients.util.ObjectBuilderBase
co.elastic.clients.util.WithJsonObjectBuilderBase<BuilderT>
co.elastic.clients.elasticsearch._types.RequestBase.AbstractBuilder<TermvectorsRequest.Builder<TDocument>>
co.elastic.clients.elasticsearch.core.TermvectorsRequest.Builder<TDocument>
- All Implemented Interfaces:
- WithJson<TermvectorsRequest.Builder<TDocument>>,- ObjectBuilder<TermvectorsRequest<TDocument>>
- Enclosing class:
- TermvectorsRequest<TDocument>
public static class TermvectorsRequest.Builder<TDocument>
extends RequestBase.AbstractBuilder<TermvectorsRequest.Builder<TDocument>>
implements ObjectBuilder<TermvectorsRequest<TDocument>>
Builder for 
TermvectorsRequest.- 
Constructor SummaryConstructors
- 
Method SummaryModifier and TypeMethodDescriptionbuild()Builds aTermvectorsRequest.An artificial document (a document not present in the index) for which you want to retrieve term vectors.A list of fields to include in the statistics.A list of fields to include in the statistics.fieldStatistics(Boolean value) Iftrue, the response includes: The document count (how many documents contain this field). The sum of document frequencies (the sum of document frequencies for all terms in this field). The sum of total term frequencies (the sum of total term frequencies of each term in this field).Filter terms based on their tf-idf scores.Filter terms based on their tf-idf scores.A unique identifier for the document.Required - The name of the index that contains the document.Iftrue, the response includes term offsets.Iftrue, the response includes term payloads.perFieldAnalyzer(String key, String value) Override the default per-field analyzer.perFieldAnalyzer(Map<String, String> map) Override the default per-field analyzer.Iftrue, the response includes term positions.preference(String value) The node or shard the operation should be performed on.If true, the request is real-time as opposed to near-real-time.A custom value that is used to route operations to a specific shard.protected TermvectorsRequest.Builder<TDocument>self()Serializer for TDocument.termStatistics(Boolean value) Iftrue, the response includes: The total term frequency (how often a term occurs in all documents). The document frequency (the number of documents containing the current term).Iftrue, returns the document version as part of a hit.versionType(VersionType value) The version type.Methods inherited from class co.elastic.clients.util.WithJsonObjectBuilderBasewithJsonMethods inherited from class co.elastic.clients.util.ObjectBuilderBase_checkSingleUse, _listAdd, _listAddAll, _mapPut, _mapPutAll
- 
Constructor Details- 
Builderpublic Builder()
 
- 
- 
Method Details- 
docAn artificial document (a document not present in the index) for which you want to retrieve term vectors.API name: doc
- 
fieldStatisticsIftrue, the response includes:- The document count (how many documents contain this field).
- The sum of document frequencies (the sum of document frequencies for all terms in this field).
- The sum of total term frequencies (the sum of total term frequencies of each term in this field).
 API name: field_statistics
- 
fieldsA list of fields to include in the statistics. It is used as the default list unless a specific field list is provided in thecompletion_fieldsorfielddata_fieldsparameters.API name: fieldsAdds all elements of listtofields.
- 
fieldsA list of fields to include in the statistics. It is used as the default list unless a specific field list is provided in thecompletion_fieldsorfielddata_fieldsparameters.API name: fieldsAdds one or more values to fields.
- 
filterFilter terms based on their tf-idf scores. This could be useful in order find out a good characteristic vector of a document. This feature works in a similar manner to the second phase of the More Like This Query.API name: filter
- 
filterpublic final TermvectorsRequest.Builder<TDocument> filter(Function<Filter.Builder, ObjectBuilder<Filter>> fn) Filter terms based on their tf-idf scores. This could be useful in order find out a good characteristic vector of a document. This feature works in a similar manner to the second phase of the More Like This Query.API name: filter
- 
idA unique identifier for the document.API name: id
- 
indexRequired - The name of the index that contains the document.API name: index
- 
offsetsIftrue, the response includes term offsets.API name: offsets
- 
payloadsIftrue, the response includes term payloads.API name: payloads
- 
perFieldAnalyzerOverride the default per-field analyzer. This is useful in order to generate term vectors in any fashion, especially when using artificial documents. When providing an analyzer for a field that already stores term vectors, the term vectors will be regenerated.API name: per_field_analyzerAdds all entries of maptoperFieldAnalyzer.
- 
perFieldAnalyzerOverride the default per-field analyzer. This is useful in order to generate term vectors in any fashion, especially when using artificial documents. When providing an analyzer for a field that already stores term vectors, the term vectors will be regenerated.API name: per_field_analyzerAdds an entry to perFieldAnalyzer.
- 
positionsIftrue, the response includes term positions.API name: positions
- 
preferenceThe node or shard the operation should be performed on. It is random by default.API name: preference
- 
realtimeIf true, the request is real-time as opposed to near-real-time.API name: realtime
- 
routingA custom value that is used to route operations to a specific shard.API name: routing
- 
termStatisticsIftrue, the response includes:- The total term frequency (how often a term occurs in all documents).
- The document frequency (the number of documents containing the current term).
 By default these values are not returned since term statistics can have a serious performance impact. API name: term_statistics
- 
versionIftrue, returns the document version as part of a hit.API name: version
- 
versionTypeThe version type.API name: version_type
- 
tDocumentSerializerpublic final TermvectorsRequest.Builder<TDocument> tDocumentSerializer(@Nullable JsonpSerializer<TDocument> value) Serializer for TDocument. If not set, an attempt will be made to find a serializer from the JSON context.
- 
self- Specified by:
- selfin class- RequestBase.AbstractBuilder<TermvectorsRequest.Builder<TDocument>>
 
- 
buildBuilds aTermvectorsRequest.- Specified by:
- buildin interface- ObjectBuilder<TDocument>
- Throws:
- NullPointerException- if some of the required fields are null.
 
 
-