com.yelp.nrtsearch.server.grpc.SearchRequest Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of clientlib Show documentation
Show all versions of clientlib Show documentation
GRPC Clientlib for nrtSearch
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: yelp/nrtsearch/search.proto
// Protobuf Java Version: 3.25.3
package com.yelp.nrtsearch.server.grpc;
/**
* Protobuf type {@code luceneserver.SearchRequest}
*/
public final class SearchRequest extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:luceneserver.SearchRequest)
SearchRequestOrBuilder {
private static final long serialVersionUID = 0L;
// Use SearchRequest.newBuilder() to construct.
private SearchRequest(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private SearchRequest() {
indexName_ = "";
retrieveFields_ =
com.google.protobuf.LazyStringArrayList.emptyList();
queryText_ = "";
virtualFields_ = java.util.Collections.emptyList();
facets_ = java.util.Collections.emptyList();
fetchTasks_ = java.util.Collections.emptyList();
queryNestedPath_ = "";
rescorers_ = java.util.Collections.emptyList();
responseCompression_ = "";
runtimeFields_ = java.util.Collections.emptyList();
knn_ = java.util.Collections.emptyList();
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new SearchRequest();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_SearchRequest_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 21:
return internalGetCollectors();
case 26:
return internalGetInnerHits();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_SearchRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.yelp.nrtsearch.server.grpc.SearchRequest.class, com.yelp.nrtsearch.server.grpc.SearchRequest.Builder.class);
}
private int bitField0_;
private int searcherCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object searcher_;
public enum SearcherCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
INDEXGEN(10),
VERSION(11),
SNAPSHOT(12),
SEARCHER_NOT_SET(0);
private final int value;
private SearcherCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static SearcherCase valueOf(int value) {
return forNumber(value);
}
public static SearcherCase forNumber(int value) {
switch (value) {
case 10: return INDEXGEN;
case 11: return VERSION;
case 12: return SNAPSHOT;
case 0: return SEARCHER_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public SearcherCase
getSearcherCase() {
return SearcherCase.forNumber(
searcherCase_);
}
public static final int INDEXNAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object indexName_ = "";
/**
*
*index to search against
*
*
* string indexName = 1;
* @return The indexName.
*/
@java.lang.Override
public java.lang.String getIndexName() {
java.lang.Object ref = indexName_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
indexName_ = s;
return s;
}
}
/**
*
*index to search against
*
*
* string indexName = 1;
* @return The bytes for indexName.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getIndexNameBytes() {
java.lang.Object ref = indexName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
indexName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int STARTHIT_FIELD_NUMBER = 2;
private int startHit_ = 0;
/**
*
* Which hit to start from (for pagination); default: 0
*
*
* int32 startHit = 2;
* @return The startHit.
*/
@java.lang.Override
public int getStartHit() {
return startHit_;
}
public static final int TOPHITS_FIELD_NUMBER = 3;
private int topHits_ = 0;
/**
*
* How many top hits to retrieve; default: 10. It limits the hits returned, starting from index 0. For pagination: set it to startHit + window_size.
*
*
* int32 topHits = 3;
* @return The topHits.
*/
@java.lang.Override
public int getTopHits() {
return topHits_;
}
public static final int TIMEOUTSEC_FIELD_NUMBER = 4;
private double timeoutSec_ = 0D;
/**
*
* Maximum number of seconds spent on each collection phase; note that for
* multi-pass searches (e.g. query-time grouping), this timeout applies to each phase.
*
*
* double timeoutSec = 4;
* @return The timeoutSec.
*/
@java.lang.Override
public double getTimeoutSec() {
return timeoutSec_;
}
public static final int RETRIEVEFIELDS_FIELD_NUMBER = 5;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList retrieveFields_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
*Which fields to highlight or retrieve.
*
*
* repeated string retrieveFields = 5;
* @return A list containing the retrieveFields.
*/
public com.google.protobuf.ProtocolStringList
getRetrieveFieldsList() {
return retrieveFields_;
}
/**
*
*Which fields to highlight or retrieve.
*
*
* repeated string retrieveFields = 5;
* @return The count of retrieveFields.
*/
public int getRetrieveFieldsCount() {
return retrieveFields_.size();
}
/**
*
*Which fields to highlight or retrieve.
*
*
* repeated string retrieveFields = 5;
* @param index The index of the element to return.
* @return The retrieveFields at the given index.
*/
public java.lang.String getRetrieveFields(int index) {
return retrieveFields_.get(index);
}
/**
*
*Which fields to highlight or retrieve.
*
*
* repeated string retrieveFields = 5;
* @param index The index of the value to return.
* @return The bytes of the retrieveFields at the given index.
*/
public com.google.protobuf.ByteString
getRetrieveFieldsBytes(int index) {
return retrieveFields_.getByteString(index);
}
public static final int QUERYTEXT_FIELD_NUMBER = 6;
@SuppressWarnings("serial")
private volatile java.lang.Object queryText_ = "";
/**
*
*Query text to parse using the specified QueryParser.
*
*
* string queryText = 6;
* @return The queryText.
*/
@java.lang.Override
public java.lang.String getQueryText() {
java.lang.Object ref = queryText_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
queryText_ = s;
return s;
}
}
/**
*
*Query text to parse using the specified QueryParser.
*
*
* string queryText = 6;
* @return The bytes for queryText.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getQueryTextBytes() {
java.lang.Object ref = queryText_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
queryText_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int VIRTUALFIELDS_FIELD_NUMBER = 7;
@SuppressWarnings("serial")
private java.util.List virtualFields_;
/**
*
*Defines virtual fields (name'd dynamic expressions) for this query.
*
*
* repeated .luceneserver.VirtualField virtualFields = 7;
*/
@java.lang.Override
public java.util.List getVirtualFieldsList() {
return virtualFields_;
}
/**
*
*Defines virtual fields (name'd dynamic expressions) for this query.
*
*
* repeated .luceneserver.VirtualField virtualFields = 7;
*/
@java.lang.Override
public java.util.List extends com.yelp.nrtsearch.server.grpc.VirtualFieldOrBuilder>
getVirtualFieldsOrBuilderList() {
return virtualFields_;
}
/**
*
*Defines virtual fields (name'd dynamic expressions) for this query.
*
*
* repeated .luceneserver.VirtualField virtualFields = 7;
*/
@java.lang.Override
public int getVirtualFieldsCount() {
return virtualFields_.size();
}
/**
*
*Defines virtual fields (name'd dynamic expressions) for this query.
*
*
* repeated .luceneserver.VirtualField virtualFields = 7;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.VirtualField getVirtualFields(int index) {
return virtualFields_.get(index);
}
/**
*
*Defines virtual fields (name'd dynamic expressions) for this query.
*
*
* repeated .luceneserver.VirtualField virtualFields = 7;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.VirtualFieldOrBuilder getVirtualFieldsOrBuilder(
int index) {
return virtualFields_.get(index);
}
public static final int QUERY_FIELD_NUMBER = 8;
private com.yelp.nrtsearch.server.grpc.Query query_;
/**
*
* Full query to execute using QueryNodes
*
*
* .luceneserver.Query query = 8;
* @return Whether the query field is set.
*/
@java.lang.Override
public boolean hasQuery() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Full query to execute using QueryNodes
*
*
* .luceneserver.Query query = 8;
* @return The query.
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.Query getQuery() {
return query_ == null ? com.yelp.nrtsearch.server.grpc.Query.getDefaultInstance() : query_;
}
/**
*
* Full query to execute using QueryNodes
*
*
* .luceneserver.Query query = 8;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.QueryOrBuilder getQueryOrBuilder() {
return query_ == null ? com.yelp.nrtsearch.server.grpc.Query.getDefaultInstance() : query_;
}
public static final int QUERYSORT_FIELD_NUMBER = 9;
private com.yelp.nrtsearch.server.grpc.QuerySortField querySort_;
/**
*
*Sort hits by field (default is by relevance).
*
*
* .luceneserver.QuerySortField querySort = 9;
* @return Whether the querySort field is set.
*/
@java.lang.Override
public boolean hasQuerySort() {
return ((bitField0_ & 0x00000002) != 0);
}
/**
*
*Sort hits by field (default is by relevance).
*
*
* .luceneserver.QuerySortField querySort = 9;
* @return The querySort.
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.QuerySortField getQuerySort() {
return querySort_ == null ? com.yelp.nrtsearch.server.grpc.QuerySortField.getDefaultInstance() : querySort_;
}
/**
*
*Sort hits by field (default is by relevance).
*
*
* .luceneserver.QuerySortField querySort = 9;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.QuerySortFieldOrBuilder getQuerySortOrBuilder() {
return querySort_ == null ? com.yelp.nrtsearch.server.grpc.QuerySortField.getDefaultInstance() : querySort_;
}
public static final int INDEXGEN_FIELD_NUMBER = 10;
/**
*
*Search a generation previously returned by an indexing operation such as #addDocument. Use this to search a non-committed (near-real-time) view of the index.
*
*
* int64 indexGen = 10;
* @return Whether the indexGen field is set.
*/
@java.lang.Override
public boolean hasIndexGen() {
return searcherCase_ == 10;
}
/**
*
*Search a generation previously returned by an indexing operation such as #addDocument. Use this to search a non-committed (near-real-time) view of the index.
*
*
* int64 indexGen = 10;
* @return The indexGen.
*/
@java.lang.Override
public long getIndexGen() {
if (searcherCase_ == 10) {
return (java.lang.Long) searcher_;
}
return 0L;
}
public static final int VERSION_FIELD_NUMBER = 11;
/**
*
*Search a specific searcher version. This is typically used by follow-on searches (e.g., user clicks next page, drills down, or changes sort, etc.) to get the same searcher used by the original search.
*
*
* int64 version = 11;
* @return Whether the version field is set.
*/
@java.lang.Override
public boolean hasVersion() {
return searcherCase_ == 11;
}
/**
*
*Search a specific searcher version. This is typically used by follow-on searches (e.g., user clicks next page, drills down, or changes sort, etc.) to get the same searcher used by the original search.
*
*
* int64 version = 11;
* @return The version.
*/
@java.lang.Override
public long getVersion() {
if (searcherCase_ == 11) {
return (java.lang.Long) searcher_;
}
return 0L;
}
public static final int SNAPSHOT_FIELD_NUMBER = 12;
/**
*
*Search a snapshot previously created with #createSnapshot
*
*
* string snapshot = 12;
* @return Whether the snapshot field is set.
*/
public boolean hasSnapshot() {
return searcherCase_ == 12;
}
/**
*
*Search a snapshot previously created with #createSnapshot
*
*
* string snapshot = 12;
* @return The snapshot.
*/
public java.lang.String getSnapshot() {
java.lang.Object ref = "";
if (searcherCase_ == 12) {
ref = searcher_;
}
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (searcherCase_ == 12) {
searcher_ = s;
}
return s;
}
}
/**
*
*Search a snapshot previously created with #createSnapshot
*
*
* string snapshot = 12;
* @return The bytes for snapshot.
*/
public com.google.protobuf.ByteString
getSnapshotBytes() {
java.lang.Object ref = "";
if (searcherCase_ == 12) {
ref = searcher_;
}
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (searcherCase_ == 12) {
searcher_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int TOTALHITSTHRESHOLD_FIELD_NUMBER = 13;
private int totalHitsThreshold_ = 0;
/**
*
*By default we count hits accurately up to 1000. This makes sure that we don't spend most time on computing hit counts
*
*
* int32 totalHitsThreshold = 13;
* @return The totalHitsThreshold.
*/
@java.lang.Override
public int getTotalHitsThreshold() {
return totalHitsThreshold_;
}
public static final int FACETS_FIELD_NUMBER = 14;
@SuppressWarnings("serial")
private java.util.List facets_;
/**
*
* Which facets to retrieve
*
*
* repeated .luceneserver.Facet facets = 14;
*/
@java.lang.Override
public java.util.List getFacetsList() {
return facets_;
}
/**
*
* Which facets to retrieve
*
*
* repeated .luceneserver.Facet facets = 14;
*/
@java.lang.Override
public java.util.List extends com.yelp.nrtsearch.server.grpc.FacetOrBuilder>
getFacetsOrBuilderList() {
return facets_;
}
/**
*
* Which facets to retrieve
*
*
* repeated .luceneserver.Facet facets = 14;
*/
@java.lang.Override
public int getFacetsCount() {
return facets_.size();
}
/**
*
* Which facets to retrieve
*
*
* repeated .luceneserver.Facet facets = 14;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.Facet getFacets(int index) {
return facets_.get(index);
}
/**
*
* Which facets to retrieve
*
*
* repeated .luceneserver.Facet facets = 14;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.FacetOrBuilder getFacetsOrBuilder(
int index) {
return facets_.get(index);
}
public static final int FETCHTASKS_FIELD_NUMBER = 15;
@SuppressWarnings("serial")
private java.util.List fetchTasks_;
/**
*
*Any custom tasks that should be performed on top documents after ranking
*
*
* repeated .luceneserver.FetchTask fetchTasks = 15;
*/
@java.lang.Override
public java.util.List getFetchTasksList() {
return fetchTasks_;
}
/**
*
*Any custom tasks that should be performed on top documents after ranking
*
*
* repeated .luceneserver.FetchTask fetchTasks = 15;
*/
@java.lang.Override
public java.util.List extends com.yelp.nrtsearch.server.grpc.FetchTaskOrBuilder>
getFetchTasksOrBuilderList() {
return fetchTasks_;
}
/**
*
*Any custom tasks that should be performed on top documents after ranking
*
*
* repeated .luceneserver.FetchTask fetchTasks = 15;
*/
@java.lang.Override
public int getFetchTasksCount() {
return fetchTasks_.size();
}
/**
*
*Any custom tasks that should be performed on top documents after ranking
*
*
* repeated .luceneserver.FetchTask fetchTasks = 15;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.FetchTask getFetchTasks(int index) {
return fetchTasks_.get(index);
}
/**
*
*Any custom tasks that should be performed on top documents after ranking
*
*
* repeated .luceneserver.FetchTask fetchTasks = 15;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.FetchTaskOrBuilder getFetchTasksOrBuilder(
int index) {
return fetchTasks_.get(index);
}
public static final int DISALLOWPARTIALRESULTS_FIELD_NUMBER = 16;
private boolean disallowPartialResults_ = false;
/**
*
*Should partial result be a failure condition. Applies when a search request times out. If false, the top documents ranking at the point of timeout are used and the request continues. Also, hitTimeout is set to true in the response.
*
*
* bool disallowPartialResults = 16;
* @return The disallowPartialResults.
*/
@java.lang.Override
public boolean getDisallowPartialResults() {
return disallowPartialResults_;
}
public static final int QUERYNESTEDPATH_FIELD_NUMBER = 17;
@SuppressWarnings("serial")
private volatile java.lang.Object queryNestedPath_ = "";
/**
*
*nested path we want to query by if we want to query child documents.
*
*
* string queryNestedPath = 17;
* @return The queryNestedPath.
*/
@java.lang.Override
public java.lang.String getQueryNestedPath() {
java.lang.Object ref = queryNestedPath_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
queryNestedPath_ = s;
return s;
}
}
/**
*
*nested path we want to query by if we want to query child documents.
*
*
* string queryNestedPath = 17;
* @return The bytes for queryNestedPath.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getQueryNestedPathBytes() {
java.lang.Object ref = queryNestedPath_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
queryNestedPath_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int RESCORERS_FIELD_NUMBER = 18;
@SuppressWarnings("serial")
private java.util.List rescorers_;
/**
*
* Rescorers which are executed in-order after the first pass
*
*
* repeated .luceneserver.Rescorer rescorers = 18;
*/
@java.lang.Override
public java.util.List getRescorersList() {
return rescorers_;
}
/**
*
* Rescorers which are executed in-order after the first pass
*
*
* repeated .luceneserver.Rescorer rescorers = 18;
*/
@java.lang.Override
public java.util.List extends com.yelp.nrtsearch.server.grpc.RescorerOrBuilder>
getRescorersOrBuilderList() {
return rescorers_;
}
/**
*
* Rescorers which are executed in-order after the first pass
*
*
* repeated .luceneserver.Rescorer rescorers = 18;
*/
@java.lang.Override
public int getRescorersCount() {
return rescorers_.size();
}
/**
*
* Rescorers which are executed in-order after the first pass
*
*
* repeated .luceneserver.Rescorer rescorers = 18;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.Rescorer getRescorers(int index) {
return rescorers_.get(index);
}
/**
*
* Rescorers which are executed in-order after the first pass
*
*
* repeated .luceneserver.Rescorer rescorers = 18;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.RescorerOrBuilder getRescorersOrBuilder(
int index) {
return rescorers_.get(index);
}
public static final int PROFILE_FIELD_NUMBER = 19;
private boolean profile_ = false;
/**
*
*If detailed request execution profiling should be included in the response
*
*
* bool profile = 19;
* @return The profile.
*/
@java.lang.Override
public boolean getProfile() {
return profile_;
}
public static final int TIMEOUTCHECKEVERY_FIELD_NUMBER = 20;
private int timeoutCheckEvery_ = 0;
/**
*
*Check the search timeout condition after each collection of n documents in a segment. If 0, timeout is only checked on the segment boundary.
*
*
* int32 timeoutCheckEvery = 20;
* @return The timeoutCheckEvery.
*/
@java.lang.Override
public int getTimeoutCheckEvery() {
return timeoutCheckEvery_;
}
public static final int COLLECTORS_FIELD_NUMBER = 21;
private static final class CollectorsDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, com.yelp.nrtsearch.server.grpc.Collector> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_SearchRequest_CollectorsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.MESSAGE,
com.yelp.nrtsearch.server.grpc.Collector.getDefaultInstance());
}
@SuppressWarnings("serial")
private com.google.protobuf.MapField<
java.lang.String, com.yelp.nrtsearch.server.grpc.Collector> collectors_;
private com.google.protobuf.MapField
internalGetCollectors() {
if (collectors_ == null) {
return com.google.protobuf.MapField.emptyMapField(
CollectorsDefaultEntryHolder.defaultEntry);
}
return collectors_;
}
public int getCollectorsCount() {
return internalGetCollectors().getMap().size();
}
/**
*
*Additional document collectors. Provides support for operations such as aggregation.
*
*
* map<string, .luceneserver.Collector> collectors = 21;
*/
@java.lang.Override
public boolean containsCollectors(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetCollectors().getMap().containsKey(key);
}
/**
* Use {@link #getCollectorsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getCollectors() {
return getCollectorsMap();
}
/**
*
*Additional document collectors. Provides support for operations such as aggregation.
*
*
* map<string, .luceneserver.Collector> collectors = 21;
*/
@java.lang.Override
public java.util.Map getCollectorsMap() {
return internalGetCollectors().getMap();
}
/**
*
*Additional document collectors. Provides support for operations such as aggregation.
*
*
* map<string, .luceneserver.Collector> collectors = 21;
*/
@java.lang.Override
public /* nullable */
com.yelp.nrtsearch.server.grpc.Collector getCollectorsOrDefault(
java.lang.String key,
/* nullable */
com.yelp.nrtsearch.server.grpc.Collector defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetCollectors().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
*Additional document collectors. Provides support for operations such as aggregation.
*
*
* map<string, .luceneserver.Collector> collectors = 21;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.Collector getCollectorsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetCollectors().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int TERMINATEAFTER_FIELD_NUMBER = 22;
private int terminateAfter_ = 0;
/**
*
*Stop document collection in search phase after this many documents, 0 for unlimited.
*
*
* int32 terminateAfter = 22;
* @return The terminateAfter.
*/
@java.lang.Override
public int getTerminateAfter() {
return terminateAfter_;
}
public static final int RESPONSECOMPRESSION_FIELD_NUMBER = 23;
@SuppressWarnings("serial")
private volatile java.lang.Object responseCompression_ = "";
/**
*
*Set gRPC compression codec to use for response message. If value is unset or invalid, falls back to uncompressed. Valid codecs: identity, gzip, lz4
*
*
* string responseCompression = 23;
* @return The responseCompression.
*/
@java.lang.Override
public java.lang.String getResponseCompression() {
java.lang.Object ref = responseCompression_;
if (ref instanceof java.lang.String) {
return (java.lang.String) ref;
} else {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
responseCompression_ = s;
return s;
}
}
/**
*
*Set gRPC compression codec to use for response message. If value is unset or invalid, falls back to uncompressed. Valid codecs: identity, gzip, lz4
*
*
* string responseCompression = 23;
* @return The bytes for responseCompression.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getResponseCompressionBytes() {
java.lang.Object ref = responseCompression_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
responseCompression_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int HIGHLIGHT_FIELD_NUMBER = 24;
private com.yelp.nrtsearch.server.grpc.Highlight highlight_;
/**
*
* Specify how to highlight matched text
*
*
* .luceneserver.Highlight highlight = 24;
* @return Whether the highlight field is set.
*/
@java.lang.Override
public boolean hasHighlight() {
return ((bitField0_ & 0x00000004) != 0);
}
/**
*
* Specify how to highlight matched text
*
*
* .luceneserver.Highlight highlight = 24;
* @return The highlight.
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.Highlight getHighlight() {
return highlight_ == null ? com.yelp.nrtsearch.server.grpc.Highlight.getDefaultInstance() : highlight_;
}
/**
*
* Specify how to highlight matched text
*
*
* .luceneserver.Highlight highlight = 24;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.HighlightOrBuilder getHighlightOrBuilder() {
return highlight_ == null ? com.yelp.nrtsearch.server.grpc.Highlight.getDefaultInstance() : highlight_;
}
public static final int EXPLAIN_FIELD_NUMBER = 25;
private boolean explain_ = false;
/**
*
* If Lucene explanation should be included in the response
*
*
* bool explain = 25;
* @return The explain.
*/
@java.lang.Override
public boolean getExplain() {
return explain_;
}
public static final int INNER_HITS_FIELD_NUMBER = 26;
private static final class InnerHitsDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, com.yelp.nrtsearch.server.grpc.InnerHit> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_SearchRequest_InnerHitsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.MESSAGE,
com.yelp.nrtsearch.server.grpc.InnerHit.getDefaultInstance());
}
@SuppressWarnings("serial")
private com.google.protobuf.MapField<
java.lang.String, com.yelp.nrtsearch.server.grpc.InnerHit> innerHits_;
private com.google.protobuf.MapField
internalGetInnerHits() {
if (innerHits_ == null) {
return com.google.protobuf.MapField.emptyMapField(
InnerHitsDefaultEntryHolder.defaultEntry);
}
return innerHits_;
}
public int getInnerHitsCount() {
return internalGetInnerHits().getMap().size();
}
/**
*
* Search nested object fields for each hit
*
*
* map<string, .luceneserver.InnerHit> inner_hits = 26;
*/
@java.lang.Override
public boolean containsInnerHits(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetInnerHits().getMap().containsKey(key);
}
/**
* Use {@link #getInnerHitsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getInnerHits() {
return getInnerHitsMap();
}
/**
*
* Search nested object fields for each hit
*
*
* map<string, .luceneserver.InnerHit> inner_hits = 26;
*/
@java.lang.Override
public java.util.Map getInnerHitsMap() {
return internalGetInnerHits().getMap();
}
/**
*
* Search nested object fields for each hit
*
*
* map<string, .luceneserver.InnerHit> inner_hits = 26;
*/
@java.lang.Override
public /* nullable */
com.yelp.nrtsearch.server.grpc.InnerHit getInnerHitsOrDefault(
java.lang.String key,
/* nullable */
com.yelp.nrtsearch.server.grpc.InnerHit defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetInnerHits().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* Search nested object fields for each hit
*
*
* map<string, .luceneserver.InnerHit> inner_hits = 26;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.InnerHit getInnerHitsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetInnerHits().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int RUNTIMEFIELDS_FIELD_NUMBER = 27;
@SuppressWarnings("serial")
private java.util.List runtimeFields_;
/**
*
* Defines runtime fields for this query
*
*
* repeated .luceneserver.RuntimeField runtimeFields = 27;
*/
@java.lang.Override
public java.util.List getRuntimeFieldsList() {
return runtimeFields_;
}
/**
*
* Defines runtime fields for this query
*
*
* repeated .luceneserver.RuntimeField runtimeFields = 27;
*/
@java.lang.Override
public java.util.List extends com.yelp.nrtsearch.server.grpc.RuntimeFieldOrBuilder>
getRuntimeFieldsOrBuilderList() {
return runtimeFields_;
}
/**
*
* Defines runtime fields for this query
*
*
* repeated .luceneserver.RuntimeField runtimeFields = 27;
*/
@java.lang.Override
public int getRuntimeFieldsCount() {
return runtimeFields_.size();
}
/**
*
* Defines runtime fields for this query
*
*
* repeated .luceneserver.RuntimeField runtimeFields = 27;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.RuntimeField getRuntimeFields(int index) {
return runtimeFields_.get(index);
}
/**
*
* Defines runtime fields for this query
*
*
* repeated .luceneserver.RuntimeField runtimeFields = 27;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.RuntimeFieldOrBuilder getRuntimeFieldsOrBuilder(
int index) {
return runtimeFields_.get(index);
}
public static final int TERMINATEAFTERMAXRECALLCOUNT_FIELD_NUMBER = 28;
private int terminateAfterMaxRecallCount_ = 0;
/**
*
*Stop document collection in search phase after this many recalled documents, after terminateAfter docs will be counted but not scored upto terminateAfterMaxRecallCount.
*
*
* int32 terminateAfterMaxRecallCount = 28;
* @return The terminateAfterMaxRecallCount.
*/
@java.lang.Override
public int getTerminateAfterMaxRecallCount() {
return terminateAfterMaxRecallCount_;
}
public static final int LOGGINGHITS_FIELD_NUMBER = 29;
private com.yelp.nrtsearch.server.grpc.LoggingHits loggingHits_;
/**
*
* Any custom logging that should log hits after ranking
*
*
* .luceneserver.LoggingHits loggingHits = 29;
* @return Whether the loggingHits field is set.
*/
@java.lang.Override
public boolean hasLoggingHits() {
return ((bitField0_ & 0x00000008) != 0);
}
/**
*
* Any custom logging that should log hits after ranking
*
*
* .luceneserver.LoggingHits loggingHits = 29;
* @return The loggingHits.
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.LoggingHits getLoggingHits() {
return loggingHits_ == null ? com.yelp.nrtsearch.server.grpc.LoggingHits.getDefaultInstance() : loggingHits_;
}
/**
*
* Any custom logging that should log hits after ranking
*
*
* .luceneserver.LoggingHits loggingHits = 29;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.LoggingHitsOrBuilder getLoggingHitsOrBuilder() {
return loggingHits_ == null ? com.yelp.nrtsearch.server.grpc.LoggingHits.getDefaultInstance() : loggingHits_;
}
public static final int SEARCHAFTER_FIELD_NUMBER = 30;
private com.yelp.nrtsearch.server.grpc.LastHitInfo searchAfter_;
/**
*
* Keeps tracks of last hit for search after
*
*
* .luceneserver.LastHitInfo searchAfter = 30;
* @return Whether the searchAfter field is set.
*/
@java.lang.Override
public boolean hasSearchAfter() {
return ((bitField0_ & 0x00000010) != 0);
}
/**
*
* Keeps tracks of last hit for search after
*
*
* .luceneserver.LastHitInfo searchAfter = 30;
* @return The searchAfter.
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.LastHitInfo getSearchAfter() {
return searchAfter_ == null ? com.yelp.nrtsearch.server.grpc.LastHitInfo.getDefaultInstance() : searchAfter_;
}
/**
*
* Keeps tracks of last hit for search after
*
*
* .luceneserver.LastHitInfo searchAfter = 30;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.LastHitInfoOrBuilder getSearchAfterOrBuilder() {
return searchAfter_ == null ? com.yelp.nrtsearch.server.grpc.LastHitInfo.getDefaultInstance() : searchAfter_;
}
public static final int KNN_FIELD_NUMBER = 31;
@SuppressWarnings("serial")
private java.util.List knn_;
/**
*
* Request kNN vector search queries, results will be combined with the standard query (if provided) using the boolean query SHOULD logic
*
*
* repeated .luceneserver.KnnQuery knn = 31;
*/
@java.lang.Override
public java.util.List getKnnList() {
return knn_;
}
/**
*
* Request kNN vector search queries, results will be combined with the standard query (if provided) using the boolean query SHOULD logic
*
*
* repeated .luceneserver.KnnQuery knn = 31;
*/
@java.lang.Override
public java.util.List extends com.yelp.nrtsearch.server.grpc.KnnQueryOrBuilder>
getKnnOrBuilderList() {
return knn_;
}
/**
*
* Request kNN vector search queries, results will be combined with the standard query (if provided) using the boolean query SHOULD logic
*
*
* repeated .luceneserver.KnnQuery knn = 31;
*/
@java.lang.Override
public int getKnnCount() {
return knn_.size();
}
/**
*
* Request kNN vector search queries, results will be combined with the standard query (if provided) using the boolean query SHOULD logic
*
*
* repeated .luceneserver.KnnQuery knn = 31;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.KnnQuery getKnn(int index) {
return knn_.get(index);
}
/**
*
* Request kNN vector search queries, results will be combined with the standard query (if provided) using the boolean query SHOULD logic
*
*
* repeated .luceneserver.KnnQuery knn = 31;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.KnnQueryOrBuilder getKnnOrBuilder(
int index) {
return knn_.get(index);
}
private byte memoizedIsInitialized = -1;
@java.lang.Override
public final boolean isInitialized() {
byte isInitialized = memoizedIsInitialized;
if (isInitialized == 1) return true;
if (isInitialized == 0) return false;
memoizedIsInitialized = 1;
return true;
}
@java.lang.Override
public void writeTo(com.google.protobuf.CodedOutputStream output)
throws java.io.IOException {
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(indexName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, indexName_);
}
if (startHit_ != 0) {
output.writeInt32(2, startHit_);
}
if (topHits_ != 0) {
output.writeInt32(3, topHits_);
}
if (java.lang.Double.doubleToRawLongBits(timeoutSec_) != 0) {
output.writeDouble(4, timeoutSec_);
}
for (int i = 0; i < retrieveFields_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, retrieveFields_.getRaw(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queryText_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 6, queryText_);
}
for (int i = 0; i < virtualFields_.size(); i++) {
output.writeMessage(7, virtualFields_.get(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(8, getQuery());
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(9, getQuerySort());
}
if (searcherCase_ == 10) {
output.writeInt64(
10, (long)((java.lang.Long) searcher_));
}
if (searcherCase_ == 11) {
output.writeInt64(
11, (long)((java.lang.Long) searcher_));
}
if (searcherCase_ == 12) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 12, searcher_);
}
if (totalHitsThreshold_ != 0) {
output.writeInt32(13, totalHitsThreshold_);
}
for (int i = 0; i < facets_.size(); i++) {
output.writeMessage(14, facets_.get(i));
}
for (int i = 0; i < fetchTasks_.size(); i++) {
output.writeMessage(15, fetchTasks_.get(i));
}
if (disallowPartialResults_ != false) {
output.writeBool(16, disallowPartialResults_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queryNestedPath_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 17, queryNestedPath_);
}
for (int i = 0; i < rescorers_.size(); i++) {
output.writeMessage(18, rescorers_.get(i));
}
if (profile_ != false) {
output.writeBool(19, profile_);
}
if (timeoutCheckEvery_ != 0) {
output.writeInt32(20, timeoutCheckEvery_);
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetCollectors(),
CollectorsDefaultEntryHolder.defaultEntry,
21);
if (terminateAfter_ != 0) {
output.writeInt32(22, terminateAfter_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(responseCompression_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 23, responseCompression_);
}
if (((bitField0_ & 0x00000004) != 0)) {
output.writeMessage(24, getHighlight());
}
if (explain_ != false) {
output.writeBool(25, explain_);
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetInnerHits(),
InnerHitsDefaultEntryHolder.defaultEntry,
26);
for (int i = 0; i < runtimeFields_.size(); i++) {
output.writeMessage(27, runtimeFields_.get(i));
}
if (terminateAfterMaxRecallCount_ != 0) {
output.writeInt32(28, terminateAfterMaxRecallCount_);
}
if (((bitField0_ & 0x00000008) != 0)) {
output.writeMessage(29, getLoggingHits());
}
if (((bitField0_ & 0x00000010) != 0)) {
output.writeMessage(30, getSearchAfter());
}
for (int i = 0; i < knn_.size(); i++) {
output.writeMessage(31, knn_.get(i));
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(indexName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, indexName_);
}
if (startHit_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(2, startHit_);
}
if (topHits_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(3, topHits_);
}
if (java.lang.Double.doubleToRawLongBits(timeoutSec_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeDoubleSize(4, timeoutSec_);
}
{
int dataSize = 0;
for (int i = 0; i < retrieveFields_.size(); i++) {
dataSize += computeStringSizeNoTag(retrieveFields_.getRaw(i));
}
size += dataSize;
size += 1 * getRetrieveFieldsList().size();
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queryText_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(6, queryText_);
}
for (int i = 0; i < virtualFields_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, virtualFields_.get(i));
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(8, getQuery());
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(9, getQuerySort());
}
if (searcherCase_ == 10) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(
10, (long)((java.lang.Long) searcher_));
}
if (searcherCase_ == 11) {
size += com.google.protobuf.CodedOutputStream
.computeInt64Size(
11, (long)((java.lang.Long) searcher_));
}
if (searcherCase_ == 12) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(12, searcher_);
}
if (totalHitsThreshold_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(13, totalHitsThreshold_);
}
for (int i = 0; i < facets_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(14, facets_.get(i));
}
for (int i = 0; i < fetchTasks_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(15, fetchTasks_.get(i));
}
if (disallowPartialResults_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(16, disallowPartialResults_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queryNestedPath_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(17, queryNestedPath_);
}
for (int i = 0; i < rescorers_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(18, rescorers_.get(i));
}
if (profile_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(19, profile_);
}
if (timeoutCheckEvery_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(20, timeoutCheckEvery_);
}
for (java.util.Map.Entry entry
: internalGetCollectors().getMap().entrySet()) {
com.google.protobuf.MapEntry
collectors__ = CollectorsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(21, collectors__);
}
if (terminateAfter_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(22, terminateAfter_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(responseCompression_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(23, responseCompression_);
}
if (((bitField0_ & 0x00000004) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(24, getHighlight());
}
if (explain_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(25, explain_);
}
for (java.util.Map.Entry entry
: internalGetInnerHits().getMap().entrySet()) {
com.google.protobuf.MapEntry
innerHits__ = InnerHitsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(26, innerHits__);
}
for (int i = 0; i < runtimeFields_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(27, runtimeFields_.get(i));
}
if (terminateAfterMaxRecallCount_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(28, terminateAfterMaxRecallCount_);
}
if (((bitField0_ & 0x00000008) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(29, getLoggingHits());
}
if (((bitField0_ & 0x00000010) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(30, getSearchAfter());
}
for (int i = 0; i < knn_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(31, knn_.get(i));
}
size += getUnknownFields().getSerializedSize();
memoizedSize = size;
return size;
}
@java.lang.Override
public boolean equals(final java.lang.Object obj) {
if (obj == this) {
return true;
}
if (!(obj instanceof com.yelp.nrtsearch.server.grpc.SearchRequest)) {
return super.equals(obj);
}
com.yelp.nrtsearch.server.grpc.SearchRequest other = (com.yelp.nrtsearch.server.grpc.SearchRequest) obj;
if (!getIndexName()
.equals(other.getIndexName())) return false;
if (getStartHit()
!= other.getStartHit()) return false;
if (getTopHits()
!= other.getTopHits()) return false;
if (java.lang.Double.doubleToLongBits(getTimeoutSec())
!= java.lang.Double.doubleToLongBits(
other.getTimeoutSec())) return false;
if (!getRetrieveFieldsList()
.equals(other.getRetrieveFieldsList())) return false;
if (!getQueryText()
.equals(other.getQueryText())) return false;
if (!getVirtualFieldsList()
.equals(other.getVirtualFieldsList())) return false;
if (hasQuery() != other.hasQuery()) return false;
if (hasQuery()) {
if (!getQuery()
.equals(other.getQuery())) return false;
}
if (hasQuerySort() != other.hasQuerySort()) return false;
if (hasQuerySort()) {
if (!getQuerySort()
.equals(other.getQuerySort())) return false;
}
if (getTotalHitsThreshold()
!= other.getTotalHitsThreshold()) return false;
if (!getFacetsList()
.equals(other.getFacetsList())) return false;
if (!getFetchTasksList()
.equals(other.getFetchTasksList())) return false;
if (getDisallowPartialResults()
!= other.getDisallowPartialResults()) return false;
if (!getQueryNestedPath()
.equals(other.getQueryNestedPath())) return false;
if (!getRescorersList()
.equals(other.getRescorersList())) return false;
if (getProfile()
!= other.getProfile()) return false;
if (getTimeoutCheckEvery()
!= other.getTimeoutCheckEvery()) return false;
if (!internalGetCollectors().equals(
other.internalGetCollectors())) return false;
if (getTerminateAfter()
!= other.getTerminateAfter()) return false;
if (!getResponseCompression()
.equals(other.getResponseCompression())) return false;
if (hasHighlight() != other.hasHighlight()) return false;
if (hasHighlight()) {
if (!getHighlight()
.equals(other.getHighlight())) return false;
}
if (getExplain()
!= other.getExplain()) return false;
if (!internalGetInnerHits().equals(
other.internalGetInnerHits())) return false;
if (!getRuntimeFieldsList()
.equals(other.getRuntimeFieldsList())) return false;
if (getTerminateAfterMaxRecallCount()
!= other.getTerminateAfterMaxRecallCount()) return false;
if (hasLoggingHits() != other.hasLoggingHits()) return false;
if (hasLoggingHits()) {
if (!getLoggingHits()
.equals(other.getLoggingHits())) return false;
}
if (hasSearchAfter() != other.hasSearchAfter()) return false;
if (hasSearchAfter()) {
if (!getSearchAfter()
.equals(other.getSearchAfter())) return false;
}
if (!getKnnList()
.equals(other.getKnnList())) return false;
if (!getSearcherCase().equals(other.getSearcherCase())) return false;
switch (searcherCase_) {
case 10:
if (getIndexGen()
!= other.getIndexGen()) return false;
break;
case 11:
if (getVersion()
!= other.getVersion()) return false;
break;
case 12:
if (!getSnapshot()
.equals(other.getSnapshot())) return false;
break;
case 0:
default:
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + INDEXNAME_FIELD_NUMBER;
hash = (53 * hash) + getIndexName().hashCode();
hash = (37 * hash) + STARTHIT_FIELD_NUMBER;
hash = (53 * hash) + getStartHit();
hash = (37 * hash) + TOPHITS_FIELD_NUMBER;
hash = (53 * hash) + getTopHits();
hash = (37 * hash) + TIMEOUTSEC_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
java.lang.Double.doubleToLongBits(getTimeoutSec()));
if (getRetrieveFieldsCount() > 0) {
hash = (37 * hash) + RETRIEVEFIELDS_FIELD_NUMBER;
hash = (53 * hash) + getRetrieveFieldsList().hashCode();
}
hash = (37 * hash) + QUERYTEXT_FIELD_NUMBER;
hash = (53 * hash) + getQueryText().hashCode();
if (getVirtualFieldsCount() > 0) {
hash = (37 * hash) + VIRTUALFIELDS_FIELD_NUMBER;
hash = (53 * hash) + getVirtualFieldsList().hashCode();
}
if (hasQuery()) {
hash = (37 * hash) + QUERY_FIELD_NUMBER;
hash = (53 * hash) + getQuery().hashCode();
}
if (hasQuerySort()) {
hash = (37 * hash) + QUERYSORT_FIELD_NUMBER;
hash = (53 * hash) + getQuerySort().hashCode();
}
hash = (37 * hash) + TOTALHITSTHRESHOLD_FIELD_NUMBER;
hash = (53 * hash) + getTotalHitsThreshold();
if (getFacetsCount() > 0) {
hash = (37 * hash) + FACETS_FIELD_NUMBER;
hash = (53 * hash) + getFacetsList().hashCode();
}
if (getFetchTasksCount() > 0) {
hash = (37 * hash) + FETCHTASKS_FIELD_NUMBER;
hash = (53 * hash) + getFetchTasksList().hashCode();
}
hash = (37 * hash) + DISALLOWPARTIALRESULTS_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getDisallowPartialResults());
hash = (37 * hash) + QUERYNESTEDPATH_FIELD_NUMBER;
hash = (53 * hash) + getQueryNestedPath().hashCode();
if (getRescorersCount() > 0) {
hash = (37 * hash) + RESCORERS_FIELD_NUMBER;
hash = (53 * hash) + getRescorersList().hashCode();
}
hash = (37 * hash) + PROFILE_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getProfile());
hash = (37 * hash) + TIMEOUTCHECKEVERY_FIELD_NUMBER;
hash = (53 * hash) + getTimeoutCheckEvery();
if (!internalGetCollectors().getMap().isEmpty()) {
hash = (37 * hash) + COLLECTORS_FIELD_NUMBER;
hash = (53 * hash) + internalGetCollectors().hashCode();
}
hash = (37 * hash) + TERMINATEAFTER_FIELD_NUMBER;
hash = (53 * hash) + getTerminateAfter();
hash = (37 * hash) + RESPONSECOMPRESSION_FIELD_NUMBER;
hash = (53 * hash) + getResponseCompression().hashCode();
if (hasHighlight()) {
hash = (37 * hash) + HIGHLIGHT_FIELD_NUMBER;
hash = (53 * hash) + getHighlight().hashCode();
}
hash = (37 * hash) + EXPLAIN_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getExplain());
if (!internalGetInnerHits().getMap().isEmpty()) {
hash = (37 * hash) + INNER_HITS_FIELD_NUMBER;
hash = (53 * hash) + internalGetInnerHits().hashCode();
}
if (getRuntimeFieldsCount() > 0) {
hash = (37 * hash) + RUNTIMEFIELDS_FIELD_NUMBER;
hash = (53 * hash) + getRuntimeFieldsList().hashCode();
}
hash = (37 * hash) + TERMINATEAFTERMAXRECALLCOUNT_FIELD_NUMBER;
hash = (53 * hash) + getTerminateAfterMaxRecallCount();
if (hasLoggingHits()) {
hash = (37 * hash) + LOGGINGHITS_FIELD_NUMBER;
hash = (53 * hash) + getLoggingHits().hashCode();
}
if (hasSearchAfter()) {
hash = (37 * hash) + SEARCHAFTER_FIELD_NUMBER;
hash = (53 * hash) + getSearchAfter().hashCode();
}
if (getKnnCount() > 0) {
hash = (37 * hash) + KNN_FIELD_NUMBER;
hash = (53 * hash) + getKnnList().hashCode();
}
switch (searcherCase_) {
case 10:
hash = (37 * hash) + INDEXGEN_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getIndexGen());
break;
case 11:
hash = (37 * hash) + VERSION_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashLong(
getVersion());
break;
case 12:
hash = (37 * hash) + SNAPSHOT_FIELD_NUMBER;
hash = (53 * hash) + getSnapshot().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.yelp.nrtsearch.server.grpc.SearchRequest parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.SearchRequest parseFrom(
java.nio.ByteBuffer data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.yelp.nrtsearch.server.grpc.SearchRequest parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.SearchRequest parseFrom(
com.google.protobuf.ByteString data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.yelp.nrtsearch.server.grpc.SearchRequest parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.SearchRequest parseFrom(
byte[] data,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data, extensionRegistry);
}
public static com.yelp.nrtsearch.server.grpc.SearchRequest parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.yelp.nrtsearch.server.grpc.SearchRequest parseFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
public static com.yelp.nrtsearch.server.grpc.SearchRequest parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.yelp.nrtsearch.server.grpc.SearchRequest parseDelimitedFrom(
java.io.InputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input, extensionRegistry);
}
public static com.yelp.nrtsearch.server.grpc.SearchRequest parseFrom(
com.google.protobuf.CodedInputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.yelp.nrtsearch.server.grpc.SearchRequest parseFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input, extensionRegistry);
}
@java.lang.Override
public Builder newBuilderForType() { return newBuilder(); }
public static Builder newBuilder() {
return DEFAULT_INSTANCE.toBuilder();
}
public static Builder newBuilder(com.yelp.nrtsearch.server.grpc.SearchRequest prototype) {
return DEFAULT_INSTANCE.toBuilder().mergeFrom(prototype);
}
@java.lang.Override
public Builder toBuilder() {
return this == DEFAULT_INSTANCE
? new Builder() : new Builder().mergeFrom(this);
}
@java.lang.Override
protected Builder newBuilderForType(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
Builder builder = new Builder(parent);
return builder;
}
/**
* Protobuf type {@code luceneserver.SearchRequest}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:luceneserver.SearchRequest)
com.yelp.nrtsearch.server.grpc.SearchRequestOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_SearchRequest_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 21:
return internalGetCollectors();
case 26:
return internalGetInnerHits();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
int number) {
switch (number) {
case 21:
return internalGetMutableCollectors();
case 26:
return internalGetMutableInnerHits();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_SearchRequest_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.yelp.nrtsearch.server.grpc.SearchRequest.class, com.yelp.nrtsearch.server.grpc.SearchRequest.Builder.class);
}
// Construct using com.yelp.nrtsearch.server.grpc.SearchRequest.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getVirtualFieldsFieldBuilder();
getQueryFieldBuilder();
getQuerySortFieldBuilder();
getFacetsFieldBuilder();
getFetchTasksFieldBuilder();
getRescorersFieldBuilder();
getHighlightFieldBuilder();
getRuntimeFieldsFieldBuilder();
getLoggingHitsFieldBuilder();
getSearchAfterFieldBuilder();
getKnnFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
indexName_ = "";
startHit_ = 0;
topHits_ = 0;
timeoutSec_ = 0D;
retrieveFields_ =
com.google.protobuf.LazyStringArrayList.emptyList();
queryText_ = "";
if (virtualFieldsBuilder_ == null) {
virtualFields_ = java.util.Collections.emptyList();
} else {
virtualFields_ = null;
virtualFieldsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000040);
query_ = null;
if (queryBuilder_ != null) {
queryBuilder_.dispose();
queryBuilder_ = null;
}
querySort_ = null;
if (querySortBuilder_ != null) {
querySortBuilder_.dispose();
querySortBuilder_ = null;
}
totalHitsThreshold_ = 0;
if (facetsBuilder_ == null) {
facets_ = java.util.Collections.emptyList();
} else {
facets_ = null;
facetsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00002000);
if (fetchTasksBuilder_ == null) {
fetchTasks_ = java.util.Collections.emptyList();
} else {
fetchTasks_ = null;
fetchTasksBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00004000);
disallowPartialResults_ = false;
queryNestedPath_ = "";
if (rescorersBuilder_ == null) {
rescorers_ = java.util.Collections.emptyList();
} else {
rescorers_ = null;
rescorersBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00020000);
profile_ = false;
timeoutCheckEvery_ = 0;
internalGetMutableCollectors().clear();
terminateAfter_ = 0;
responseCompression_ = "";
highlight_ = null;
if (highlightBuilder_ != null) {
highlightBuilder_.dispose();
highlightBuilder_ = null;
}
explain_ = false;
internalGetMutableInnerHits().clear();
if (runtimeFieldsBuilder_ == null) {
runtimeFields_ = java.util.Collections.emptyList();
} else {
runtimeFields_ = null;
runtimeFieldsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x04000000);
terminateAfterMaxRecallCount_ = 0;
loggingHits_ = null;
if (loggingHitsBuilder_ != null) {
loggingHitsBuilder_.dispose();
loggingHitsBuilder_ = null;
}
searchAfter_ = null;
if (searchAfterBuilder_ != null) {
searchAfterBuilder_.dispose();
searchAfterBuilder_ = null;
}
if (knnBuilder_ == null) {
knn_ = java.util.Collections.emptyList();
} else {
knn_ = null;
knnBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x40000000);
searcherCase_ = 0;
searcher_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_SearchRequest_descriptor;
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.SearchRequest getDefaultInstanceForType() {
return com.yelp.nrtsearch.server.grpc.SearchRequest.getDefaultInstance();
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.SearchRequest build() {
com.yelp.nrtsearch.server.grpc.SearchRequest result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.SearchRequest buildPartial() {
com.yelp.nrtsearch.server.grpc.SearchRequest result = new com.yelp.nrtsearch.server.grpc.SearchRequest(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.yelp.nrtsearch.server.grpc.SearchRequest result) {
if (virtualFieldsBuilder_ == null) {
if (((bitField0_ & 0x00000040) != 0)) {
virtualFields_ = java.util.Collections.unmodifiableList(virtualFields_);
bitField0_ = (bitField0_ & ~0x00000040);
}
result.virtualFields_ = virtualFields_;
} else {
result.virtualFields_ = virtualFieldsBuilder_.build();
}
if (facetsBuilder_ == null) {
if (((bitField0_ & 0x00002000) != 0)) {
facets_ = java.util.Collections.unmodifiableList(facets_);
bitField0_ = (bitField0_ & ~0x00002000);
}
result.facets_ = facets_;
} else {
result.facets_ = facetsBuilder_.build();
}
if (fetchTasksBuilder_ == null) {
if (((bitField0_ & 0x00004000) != 0)) {
fetchTasks_ = java.util.Collections.unmodifiableList(fetchTasks_);
bitField0_ = (bitField0_ & ~0x00004000);
}
result.fetchTasks_ = fetchTasks_;
} else {
result.fetchTasks_ = fetchTasksBuilder_.build();
}
if (rescorersBuilder_ == null) {
if (((bitField0_ & 0x00020000) != 0)) {
rescorers_ = java.util.Collections.unmodifiableList(rescorers_);
bitField0_ = (bitField0_ & ~0x00020000);
}
result.rescorers_ = rescorers_;
} else {
result.rescorers_ = rescorersBuilder_.build();
}
if (runtimeFieldsBuilder_ == null) {
if (((bitField0_ & 0x04000000) != 0)) {
runtimeFields_ = java.util.Collections.unmodifiableList(runtimeFields_);
bitField0_ = (bitField0_ & ~0x04000000);
}
result.runtimeFields_ = runtimeFields_;
} else {
result.runtimeFields_ = runtimeFieldsBuilder_.build();
}
if (knnBuilder_ == null) {
if (((bitField0_ & 0x40000000) != 0)) {
knn_ = java.util.Collections.unmodifiableList(knn_);
bitField0_ = (bitField0_ & ~0x40000000);
}
result.knn_ = knn_;
} else {
result.knn_ = knnBuilder_.build();
}
}
private void buildPartial0(com.yelp.nrtsearch.server.grpc.SearchRequest result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.indexName_ = indexName_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.startHit_ = startHit_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.topHits_ = topHits_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.timeoutSec_ = timeoutSec_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
retrieveFields_.makeImmutable();
result.retrieveFields_ = retrieveFields_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.queryText_ = queryText_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000080) != 0)) {
result.query_ = queryBuilder_ == null
? query_
: queryBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000100) != 0)) {
result.querySort_ = querySortBuilder_ == null
? querySort_
: querySortBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00001000) != 0)) {
result.totalHitsThreshold_ = totalHitsThreshold_;
}
if (((from_bitField0_ & 0x00008000) != 0)) {
result.disallowPartialResults_ = disallowPartialResults_;
}
if (((from_bitField0_ & 0x00010000) != 0)) {
result.queryNestedPath_ = queryNestedPath_;
}
if (((from_bitField0_ & 0x00040000) != 0)) {
result.profile_ = profile_;
}
if (((from_bitField0_ & 0x00080000) != 0)) {
result.timeoutCheckEvery_ = timeoutCheckEvery_;
}
if (((from_bitField0_ & 0x00100000) != 0)) {
result.collectors_ = internalGetCollectors().build(CollectorsDefaultEntryHolder.defaultEntry);
}
if (((from_bitField0_ & 0x00200000) != 0)) {
result.terminateAfter_ = terminateAfter_;
}
if (((from_bitField0_ & 0x00400000) != 0)) {
result.responseCompression_ = responseCompression_;
}
if (((from_bitField0_ & 0x00800000) != 0)) {
result.highlight_ = highlightBuilder_ == null
? highlight_
: highlightBuilder_.build();
to_bitField0_ |= 0x00000004;
}
if (((from_bitField0_ & 0x01000000) != 0)) {
result.explain_ = explain_;
}
if (((from_bitField0_ & 0x02000000) != 0)) {
result.innerHits_ = internalGetInnerHits().build(InnerHitsDefaultEntryHolder.defaultEntry);
}
if (((from_bitField0_ & 0x08000000) != 0)) {
result.terminateAfterMaxRecallCount_ = terminateAfterMaxRecallCount_;
}
if (((from_bitField0_ & 0x10000000) != 0)) {
result.loggingHits_ = loggingHitsBuilder_ == null
? loggingHits_
: loggingHitsBuilder_.build();
to_bitField0_ |= 0x00000008;
}
if (((from_bitField0_ & 0x20000000) != 0)) {
result.searchAfter_ = searchAfterBuilder_ == null
? searchAfter_
: searchAfterBuilder_.build();
to_bitField0_ |= 0x00000010;
}
result.bitField0_ |= to_bitField0_;
}
private void buildPartialOneofs(com.yelp.nrtsearch.server.grpc.SearchRequest result) {
result.searcherCase_ = searcherCase_;
result.searcher_ = this.searcher_;
}
@java.lang.Override
public Builder clone() {
return super.clone();
}
@java.lang.Override
public Builder setField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.setField(field, value);
}
@java.lang.Override
public Builder clearField(
com.google.protobuf.Descriptors.FieldDescriptor field) {
return super.clearField(field);
}
@java.lang.Override
public Builder clearOneof(
com.google.protobuf.Descriptors.OneofDescriptor oneof) {
return super.clearOneof(oneof);
}
@java.lang.Override
public Builder setRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
int index, java.lang.Object value) {
return super.setRepeatedField(field, index, value);
}
@java.lang.Override
public Builder addRepeatedField(
com.google.protobuf.Descriptors.FieldDescriptor field,
java.lang.Object value) {
return super.addRepeatedField(field, value);
}
@java.lang.Override
public Builder mergeFrom(com.google.protobuf.Message other) {
if (other instanceof com.yelp.nrtsearch.server.grpc.SearchRequest) {
return mergeFrom((com.yelp.nrtsearch.server.grpc.SearchRequest)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.yelp.nrtsearch.server.grpc.SearchRequest other) {
if (other == com.yelp.nrtsearch.server.grpc.SearchRequest.getDefaultInstance()) return this;
if (!other.getIndexName().isEmpty()) {
indexName_ = other.indexName_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.getStartHit() != 0) {
setStartHit(other.getStartHit());
}
if (other.getTopHits() != 0) {
setTopHits(other.getTopHits());
}
if (other.getTimeoutSec() != 0D) {
setTimeoutSec(other.getTimeoutSec());
}
if (!other.retrieveFields_.isEmpty()) {
if (retrieveFields_.isEmpty()) {
retrieveFields_ = other.retrieveFields_;
bitField0_ |= 0x00000010;
} else {
ensureRetrieveFieldsIsMutable();
retrieveFields_.addAll(other.retrieveFields_);
}
onChanged();
}
if (!other.getQueryText().isEmpty()) {
queryText_ = other.queryText_;
bitField0_ |= 0x00000020;
onChanged();
}
if (virtualFieldsBuilder_ == null) {
if (!other.virtualFields_.isEmpty()) {
if (virtualFields_.isEmpty()) {
virtualFields_ = other.virtualFields_;
bitField0_ = (bitField0_ & ~0x00000040);
} else {
ensureVirtualFieldsIsMutable();
virtualFields_.addAll(other.virtualFields_);
}
onChanged();
}
} else {
if (!other.virtualFields_.isEmpty()) {
if (virtualFieldsBuilder_.isEmpty()) {
virtualFieldsBuilder_.dispose();
virtualFieldsBuilder_ = null;
virtualFields_ = other.virtualFields_;
bitField0_ = (bitField0_ & ~0x00000040);
virtualFieldsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getVirtualFieldsFieldBuilder() : null;
} else {
virtualFieldsBuilder_.addAllMessages(other.virtualFields_);
}
}
}
if (other.hasQuery()) {
mergeQuery(other.getQuery());
}
if (other.hasQuerySort()) {
mergeQuerySort(other.getQuerySort());
}
if (other.getTotalHitsThreshold() != 0) {
setTotalHitsThreshold(other.getTotalHitsThreshold());
}
if (facetsBuilder_ == null) {
if (!other.facets_.isEmpty()) {
if (facets_.isEmpty()) {
facets_ = other.facets_;
bitField0_ = (bitField0_ & ~0x00002000);
} else {
ensureFacetsIsMutable();
facets_.addAll(other.facets_);
}
onChanged();
}
} else {
if (!other.facets_.isEmpty()) {
if (facetsBuilder_.isEmpty()) {
facetsBuilder_.dispose();
facetsBuilder_ = null;
facets_ = other.facets_;
bitField0_ = (bitField0_ & ~0x00002000);
facetsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getFacetsFieldBuilder() : null;
} else {
facetsBuilder_.addAllMessages(other.facets_);
}
}
}
if (fetchTasksBuilder_ == null) {
if (!other.fetchTasks_.isEmpty()) {
if (fetchTasks_.isEmpty()) {
fetchTasks_ = other.fetchTasks_;
bitField0_ = (bitField0_ & ~0x00004000);
} else {
ensureFetchTasksIsMutable();
fetchTasks_.addAll(other.fetchTasks_);
}
onChanged();
}
} else {
if (!other.fetchTasks_.isEmpty()) {
if (fetchTasksBuilder_.isEmpty()) {
fetchTasksBuilder_.dispose();
fetchTasksBuilder_ = null;
fetchTasks_ = other.fetchTasks_;
bitField0_ = (bitField0_ & ~0x00004000);
fetchTasksBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getFetchTasksFieldBuilder() : null;
} else {
fetchTasksBuilder_.addAllMessages(other.fetchTasks_);
}
}
}
if (other.getDisallowPartialResults() != false) {
setDisallowPartialResults(other.getDisallowPartialResults());
}
if (!other.getQueryNestedPath().isEmpty()) {
queryNestedPath_ = other.queryNestedPath_;
bitField0_ |= 0x00010000;
onChanged();
}
if (rescorersBuilder_ == null) {
if (!other.rescorers_.isEmpty()) {
if (rescorers_.isEmpty()) {
rescorers_ = other.rescorers_;
bitField0_ = (bitField0_ & ~0x00020000);
} else {
ensureRescorersIsMutable();
rescorers_.addAll(other.rescorers_);
}
onChanged();
}
} else {
if (!other.rescorers_.isEmpty()) {
if (rescorersBuilder_.isEmpty()) {
rescorersBuilder_.dispose();
rescorersBuilder_ = null;
rescorers_ = other.rescorers_;
bitField0_ = (bitField0_ & ~0x00020000);
rescorersBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getRescorersFieldBuilder() : null;
} else {
rescorersBuilder_.addAllMessages(other.rescorers_);
}
}
}
if (other.getProfile() != false) {
setProfile(other.getProfile());
}
if (other.getTimeoutCheckEvery() != 0) {
setTimeoutCheckEvery(other.getTimeoutCheckEvery());
}
internalGetMutableCollectors().mergeFrom(
other.internalGetCollectors());
bitField0_ |= 0x00100000;
if (other.getTerminateAfter() != 0) {
setTerminateAfter(other.getTerminateAfter());
}
if (!other.getResponseCompression().isEmpty()) {
responseCompression_ = other.responseCompression_;
bitField0_ |= 0x00400000;
onChanged();
}
if (other.hasHighlight()) {
mergeHighlight(other.getHighlight());
}
if (other.getExplain() != false) {
setExplain(other.getExplain());
}
internalGetMutableInnerHits().mergeFrom(
other.internalGetInnerHits());
bitField0_ |= 0x02000000;
if (runtimeFieldsBuilder_ == null) {
if (!other.runtimeFields_.isEmpty()) {
if (runtimeFields_.isEmpty()) {
runtimeFields_ = other.runtimeFields_;
bitField0_ = (bitField0_ & ~0x04000000);
} else {
ensureRuntimeFieldsIsMutable();
runtimeFields_.addAll(other.runtimeFields_);
}
onChanged();
}
} else {
if (!other.runtimeFields_.isEmpty()) {
if (runtimeFieldsBuilder_.isEmpty()) {
runtimeFieldsBuilder_.dispose();
runtimeFieldsBuilder_ = null;
runtimeFields_ = other.runtimeFields_;
bitField0_ = (bitField0_ & ~0x04000000);
runtimeFieldsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getRuntimeFieldsFieldBuilder() : null;
} else {
runtimeFieldsBuilder_.addAllMessages(other.runtimeFields_);
}
}
}
if (other.getTerminateAfterMaxRecallCount() != 0) {
setTerminateAfterMaxRecallCount(other.getTerminateAfterMaxRecallCount());
}
if (other.hasLoggingHits()) {
mergeLoggingHits(other.getLoggingHits());
}
if (other.hasSearchAfter()) {
mergeSearchAfter(other.getSearchAfter());
}
if (knnBuilder_ == null) {
if (!other.knn_.isEmpty()) {
if (knn_.isEmpty()) {
knn_ = other.knn_;
bitField0_ = (bitField0_ & ~0x40000000);
} else {
ensureKnnIsMutable();
knn_.addAll(other.knn_);
}
onChanged();
}
} else {
if (!other.knn_.isEmpty()) {
if (knnBuilder_.isEmpty()) {
knnBuilder_.dispose();
knnBuilder_ = null;
knn_ = other.knn_;
bitField0_ = (bitField0_ & ~0x40000000);
knnBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getKnnFieldBuilder() : null;
} else {
knnBuilder_.addAllMessages(other.knn_);
}
}
}
switch (other.getSearcherCase()) {
case INDEXGEN: {
setIndexGen(other.getIndexGen());
break;
}
case VERSION: {
setVersion(other.getVersion());
break;
}
case SNAPSHOT: {
searcherCase_ = 12;
searcher_ = other.searcher_;
onChanged();
break;
}
case SEARCHER_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
indexName_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 16: {
startHit_ = input.readInt32();
bitField0_ |= 0x00000002;
break;
} // case 16
case 24: {
topHits_ = input.readInt32();
bitField0_ |= 0x00000004;
break;
} // case 24
case 33: {
timeoutSec_ = input.readDouble();
bitField0_ |= 0x00000008;
break;
} // case 33
case 42: {
java.lang.String s = input.readStringRequireUtf8();
ensureRetrieveFieldsIsMutable();
retrieveFields_.add(s);
break;
} // case 42
case 50: {
queryText_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000020;
break;
} // case 50
case 58: {
com.yelp.nrtsearch.server.grpc.VirtualField m =
input.readMessage(
com.yelp.nrtsearch.server.grpc.VirtualField.parser(),
extensionRegistry);
if (virtualFieldsBuilder_ == null) {
ensureVirtualFieldsIsMutable();
virtualFields_.add(m);
} else {
virtualFieldsBuilder_.addMessage(m);
}
break;
} // case 58
case 66: {
input.readMessage(
getQueryFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000080;
break;
} // case 66
case 74: {
input.readMessage(
getQuerySortFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000100;
break;
} // case 74
case 80: {
searcher_ = input.readInt64();
searcherCase_ = 10;
break;
} // case 80
case 88: {
searcher_ = input.readInt64();
searcherCase_ = 11;
break;
} // case 88
case 98: {
java.lang.String s = input.readStringRequireUtf8();
searcherCase_ = 12;
searcher_ = s;
break;
} // case 98
case 104: {
totalHitsThreshold_ = input.readInt32();
bitField0_ |= 0x00001000;
break;
} // case 104
case 114: {
com.yelp.nrtsearch.server.grpc.Facet m =
input.readMessage(
com.yelp.nrtsearch.server.grpc.Facet.parser(),
extensionRegistry);
if (facetsBuilder_ == null) {
ensureFacetsIsMutable();
facets_.add(m);
} else {
facetsBuilder_.addMessage(m);
}
break;
} // case 114
case 122: {
com.yelp.nrtsearch.server.grpc.FetchTask m =
input.readMessage(
com.yelp.nrtsearch.server.grpc.FetchTask.parser(),
extensionRegistry);
if (fetchTasksBuilder_ == null) {
ensureFetchTasksIsMutable();
fetchTasks_.add(m);
} else {
fetchTasksBuilder_.addMessage(m);
}
break;
} // case 122
case 128: {
disallowPartialResults_ = input.readBool();
bitField0_ |= 0x00008000;
break;
} // case 128
case 138: {
queryNestedPath_ = input.readStringRequireUtf8();
bitField0_ |= 0x00010000;
break;
} // case 138
case 146: {
com.yelp.nrtsearch.server.grpc.Rescorer m =
input.readMessage(
com.yelp.nrtsearch.server.grpc.Rescorer.parser(),
extensionRegistry);
if (rescorersBuilder_ == null) {
ensureRescorersIsMutable();
rescorers_.add(m);
} else {
rescorersBuilder_.addMessage(m);
}
break;
} // case 146
case 152: {
profile_ = input.readBool();
bitField0_ |= 0x00040000;
break;
} // case 152
case 160: {
timeoutCheckEvery_ = input.readInt32();
bitField0_ |= 0x00080000;
break;
} // case 160
case 170: {
com.google.protobuf.MapEntry
collectors__ = input.readMessage(
CollectorsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
internalGetMutableCollectors().ensureBuilderMap().put(
collectors__.getKey(), collectors__.getValue());
bitField0_ |= 0x00100000;
break;
} // case 170
case 176: {
terminateAfter_ = input.readInt32();
bitField0_ |= 0x00200000;
break;
} // case 176
case 186: {
responseCompression_ = input.readStringRequireUtf8();
bitField0_ |= 0x00400000;
break;
} // case 186
case 194: {
input.readMessage(
getHighlightFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00800000;
break;
} // case 194
case 200: {
explain_ = input.readBool();
bitField0_ |= 0x01000000;
break;
} // case 200
case 210: {
com.google.protobuf.MapEntry
innerHits__ = input.readMessage(
InnerHitsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
internalGetMutableInnerHits().ensureBuilderMap().put(
innerHits__.getKey(), innerHits__.getValue());
bitField0_ |= 0x02000000;
break;
} // case 210
case 218: {
com.yelp.nrtsearch.server.grpc.RuntimeField m =
input.readMessage(
com.yelp.nrtsearch.server.grpc.RuntimeField.parser(),
extensionRegistry);
if (runtimeFieldsBuilder_ == null) {
ensureRuntimeFieldsIsMutable();
runtimeFields_.add(m);
} else {
runtimeFieldsBuilder_.addMessage(m);
}
break;
} // case 218
case 224: {
terminateAfterMaxRecallCount_ = input.readInt32();
bitField0_ |= 0x08000000;
break;
} // case 224
case 234: {
input.readMessage(
getLoggingHitsFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x10000000;
break;
} // case 234
case 242: {
input.readMessage(
getSearchAfterFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x20000000;
break;
} // case 242
case 250: {
com.yelp.nrtsearch.server.grpc.KnnQuery m =
input.readMessage(
com.yelp.nrtsearch.server.grpc.KnnQuery.parser(),
extensionRegistry);
if (knnBuilder_ == null) {
ensureKnnIsMutable();
knn_.add(m);
} else {
knnBuilder_.addMessage(m);
}
break;
} // case 250
default: {
if (!super.parseUnknownField(input, extensionRegistry, tag)) {
done = true; // was an endgroup tag
}
break;
} // default:
} // switch (tag)
} // while (!done)
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.unwrapIOException();
} finally {
onChanged();
} // finally
return this;
}
private int searcherCase_ = 0;
private java.lang.Object searcher_;
public SearcherCase
getSearcherCase() {
return SearcherCase.forNumber(
searcherCase_);
}
public Builder clearSearcher() {
searcherCase_ = 0;
searcher_ = null;
onChanged();
return this;
}
private int bitField0_;
private java.lang.Object indexName_ = "";
/**
*
*index to search against
*
*
* string indexName = 1;
* @return The indexName.
*/
public java.lang.String getIndexName() {
java.lang.Object ref = indexName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
indexName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*index to search against
*
*
* string indexName = 1;
* @return The bytes for indexName.
*/
public com.google.protobuf.ByteString
getIndexNameBytes() {
java.lang.Object ref = indexName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
indexName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*index to search against
*
*
* string indexName = 1;
* @param value The indexName to set.
* @return This builder for chaining.
*/
public Builder setIndexName(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
indexName_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*index to search against
*
*
* string indexName = 1;
* @return This builder for chaining.
*/
public Builder clearIndexName() {
indexName_ = getDefaultInstance().getIndexName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*index to search against
*
*
* string indexName = 1;
* @param value The bytes for indexName to set.
* @return This builder for chaining.
*/
public Builder setIndexNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
indexName_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private int startHit_ ;
/**
*
* Which hit to start from (for pagination); default: 0
*
*
* int32 startHit = 2;
* @return The startHit.
*/
@java.lang.Override
public int getStartHit() {
return startHit_;
}
/**
*
* Which hit to start from (for pagination); default: 0
*
*
* int32 startHit = 2;
* @param value The startHit to set.
* @return This builder for chaining.
*/
public Builder setStartHit(int value) {
startHit_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Which hit to start from (for pagination); default: 0
*
*
* int32 startHit = 2;
* @return This builder for chaining.
*/
public Builder clearStartHit() {
bitField0_ = (bitField0_ & ~0x00000002);
startHit_ = 0;
onChanged();
return this;
}
private int topHits_ ;
/**
*
* How many top hits to retrieve; default: 10. It limits the hits returned, starting from index 0. For pagination: set it to startHit + window_size.
*
*
* int32 topHits = 3;
* @return The topHits.
*/
@java.lang.Override
public int getTopHits() {
return topHits_;
}
/**
*
* How many top hits to retrieve; default: 10. It limits the hits returned, starting from index 0. For pagination: set it to startHit + window_size.
*
*
* int32 topHits = 3;
* @param value The topHits to set.
* @return This builder for chaining.
*/
public Builder setTopHits(int value) {
topHits_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* How many top hits to retrieve; default: 10. It limits the hits returned, starting from index 0. For pagination: set it to startHit + window_size.
*
*
* int32 topHits = 3;
* @return This builder for chaining.
*/
public Builder clearTopHits() {
bitField0_ = (bitField0_ & ~0x00000004);
topHits_ = 0;
onChanged();
return this;
}
private double timeoutSec_ ;
/**
*
* Maximum number of seconds spent on each collection phase; note that for
* multi-pass searches (e.g. query-time grouping), this timeout applies to each phase.
*
*
* double timeoutSec = 4;
* @return The timeoutSec.
*/
@java.lang.Override
public double getTimeoutSec() {
return timeoutSec_;
}
/**
*
* Maximum number of seconds spent on each collection phase; note that for
* multi-pass searches (e.g. query-time grouping), this timeout applies to each phase.
*
*
* double timeoutSec = 4;
* @param value The timeoutSec to set.
* @return This builder for chaining.
*/
public Builder setTimeoutSec(double value) {
timeoutSec_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* Maximum number of seconds spent on each collection phase; note that for
* multi-pass searches (e.g. query-time grouping), this timeout applies to each phase.
*
*
* double timeoutSec = 4;
* @return This builder for chaining.
*/
public Builder clearTimeoutSec() {
bitField0_ = (bitField0_ & ~0x00000008);
timeoutSec_ = 0D;
onChanged();
return this;
}
private com.google.protobuf.LazyStringArrayList retrieveFields_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureRetrieveFieldsIsMutable() {
if (!retrieveFields_.isModifiable()) {
retrieveFields_ = new com.google.protobuf.LazyStringArrayList(retrieveFields_);
}
bitField0_ |= 0x00000010;
}
/**
*
*Which fields to highlight or retrieve.
*
*
* repeated string retrieveFields = 5;
* @return A list containing the retrieveFields.
*/
public com.google.protobuf.ProtocolStringList
getRetrieveFieldsList() {
retrieveFields_.makeImmutable();
return retrieveFields_;
}
/**
*
*Which fields to highlight or retrieve.
*
*
* repeated string retrieveFields = 5;
* @return The count of retrieveFields.
*/
public int getRetrieveFieldsCount() {
return retrieveFields_.size();
}
/**
*
*Which fields to highlight or retrieve.
*
*
* repeated string retrieveFields = 5;
* @param index The index of the element to return.
* @return The retrieveFields at the given index.
*/
public java.lang.String getRetrieveFields(int index) {
return retrieveFields_.get(index);
}
/**
*
*Which fields to highlight or retrieve.
*
*
* repeated string retrieveFields = 5;
* @param index The index of the value to return.
* @return The bytes of the retrieveFields at the given index.
*/
public com.google.protobuf.ByteString
getRetrieveFieldsBytes(int index) {
return retrieveFields_.getByteString(index);
}
/**
*
*Which fields to highlight or retrieve.
*
*
* repeated string retrieveFields = 5;
* @param index The index to set the value at.
* @param value The retrieveFields to set.
* @return This builder for chaining.
*/
public Builder setRetrieveFields(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureRetrieveFieldsIsMutable();
retrieveFields_.set(index, value);
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*Which fields to highlight or retrieve.
*
*
* repeated string retrieveFields = 5;
* @param value The retrieveFields to add.
* @return This builder for chaining.
*/
public Builder addRetrieveFields(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureRetrieveFieldsIsMutable();
retrieveFields_.add(value);
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*Which fields to highlight or retrieve.
*
*
* repeated string retrieveFields = 5;
* @param values The retrieveFields to add.
* @return This builder for chaining.
*/
public Builder addAllRetrieveFields(
java.lang.Iterable values) {
ensureRetrieveFieldsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, retrieveFields_);
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*Which fields to highlight or retrieve.
*
*
* repeated string retrieveFields = 5;
* @return This builder for chaining.
*/
public Builder clearRetrieveFields() {
retrieveFields_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000010);;
onChanged();
return this;
}
/**
*
*Which fields to highlight or retrieve.
*
*
* repeated string retrieveFields = 5;
* @param value The bytes of the retrieveFields to add.
* @return This builder for chaining.
*/
public Builder addRetrieveFieldsBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
ensureRetrieveFieldsIsMutable();
retrieveFields_.add(value);
bitField0_ |= 0x00000010;
onChanged();
return this;
}
private java.lang.Object queryText_ = "";
/**
*
*Query text to parse using the specified QueryParser.
*
*
* string queryText = 6;
* @return The queryText.
*/
public java.lang.String getQueryText() {
java.lang.Object ref = queryText_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
queryText_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*Query text to parse using the specified QueryParser.
*
*
* string queryText = 6;
* @return The bytes for queryText.
*/
public com.google.protobuf.ByteString
getQueryTextBytes() {
java.lang.Object ref = queryText_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
queryText_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*Query text to parse using the specified QueryParser.
*
*
* string queryText = 6;
* @param value The queryText to set.
* @return This builder for chaining.
*/
public Builder setQueryText(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
queryText_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*Query text to parse using the specified QueryParser.
*
*
* string queryText = 6;
* @return This builder for chaining.
*/
public Builder clearQueryText() {
queryText_ = getDefaultInstance().getQueryText();
bitField0_ = (bitField0_ & ~0x00000020);
onChanged();
return this;
}
/**
*
*Query text to parse using the specified QueryParser.
*
*
* string queryText = 6;
* @param value The bytes for queryText to set.
* @return This builder for chaining.
*/
public Builder setQueryTextBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
queryText_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
private java.util.List virtualFields_ =
java.util.Collections.emptyList();
private void ensureVirtualFieldsIsMutable() {
if (!((bitField0_ & 0x00000040) != 0)) {
virtualFields_ = new java.util.ArrayList(virtualFields_);
bitField0_ |= 0x00000040;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.VirtualField, com.yelp.nrtsearch.server.grpc.VirtualField.Builder, com.yelp.nrtsearch.server.grpc.VirtualFieldOrBuilder> virtualFieldsBuilder_;
/**
*
*Defines virtual fields (name'd dynamic expressions) for this query.
*
*
* repeated .luceneserver.VirtualField virtualFields = 7;
*/
public java.util.List getVirtualFieldsList() {
if (virtualFieldsBuilder_ == null) {
return java.util.Collections.unmodifiableList(virtualFields_);
} else {
return virtualFieldsBuilder_.getMessageList();
}
}
/**
*
*Defines virtual fields (name'd dynamic expressions) for this query.
*
*
* repeated .luceneserver.VirtualField virtualFields = 7;
*/
public int getVirtualFieldsCount() {
if (virtualFieldsBuilder_ == null) {
return virtualFields_.size();
} else {
return virtualFieldsBuilder_.getCount();
}
}
/**
*
*Defines virtual fields (name'd dynamic expressions) for this query.
*
*
* repeated .luceneserver.VirtualField virtualFields = 7;
*/
public com.yelp.nrtsearch.server.grpc.VirtualField getVirtualFields(int index) {
if (virtualFieldsBuilder_ == null) {
return virtualFields_.get(index);
} else {
return virtualFieldsBuilder_.getMessage(index);
}
}
/**
*
*Defines virtual fields (name'd dynamic expressions) for this query.
*
*
* repeated .luceneserver.VirtualField virtualFields = 7;
*/
public Builder setVirtualFields(
int index, com.yelp.nrtsearch.server.grpc.VirtualField value) {
if (virtualFieldsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureVirtualFieldsIsMutable();
virtualFields_.set(index, value);
onChanged();
} else {
virtualFieldsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*Defines virtual fields (name'd dynamic expressions) for this query.
*
*
* repeated .luceneserver.VirtualField virtualFields = 7;
*/
public Builder setVirtualFields(
int index, com.yelp.nrtsearch.server.grpc.VirtualField.Builder builderForValue) {
if (virtualFieldsBuilder_ == null) {
ensureVirtualFieldsIsMutable();
virtualFields_.set(index, builderForValue.build());
onChanged();
} else {
virtualFieldsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*Defines virtual fields (name'd dynamic expressions) for this query.
*
*
* repeated .luceneserver.VirtualField virtualFields = 7;
*/
public Builder addVirtualFields(com.yelp.nrtsearch.server.grpc.VirtualField value) {
if (virtualFieldsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureVirtualFieldsIsMutable();
virtualFields_.add(value);
onChanged();
} else {
virtualFieldsBuilder_.addMessage(value);
}
return this;
}
/**
*
*Defines virtual fields (name'd dynamic expressions) for this query.
*
*
* repeated .luceneserver.VirtualField virtualFields = 7;
*/
public Builder addVirtualFields(
int index, com.yelp.nrtsearch.server.grpc.VirtualField value) {
if (virtualFieldsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureVirtualFieldsIsMutable();
virtualFields_.add(index, value);
onChanged();
} else {
virtualFieldsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*Defines virtual fields (name'd dynamic expressions) for this query.
*
*
* repeated .luceneserver.VirtualField virtualFields = 7;
*/
public Builder addVirtualFields(
com.yelp.nrtsearch.server.grpc.VirtualField.Builder builderForValue) {
if (virtualFieldsBuilder_ == null) {
ensureVirtualFieldsIsMutable();
virtualFields_.add(builderForValue.build());
onChanged();
} else {
virtualFieldsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*Defines virtual fields (name'd dynamic expressions) for this query.
*
*
* repeated .luceneserver.VirtualField virtualFields = 7;
*/
public Builder addVirtualFields(
int index, com.yelp.nrtsearch.server.grpc.VirtualField.Builder builderForValue) {
if (virtualFieldsBuilder_ == null) {
ensureVirtualFieldsIsMutable();
virtualFields_.add(index, builderForValue.build());
onChanged();
} else {
virtualFieldsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*Defines virtual fields (name'd dynamic expressions) for this query.
*
*
* repeated .luceneserver.VirtualField virtualFields = 7;
*/
public Builder addAllVirtualFields(
java.lang.Iterable extends com.yelp.nrtsearch.server.grpc.VirtualField> values) {
if (virtualFieldsBuilder_ == null) {
ensureVirtualFieldsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, virtualFields_);
onChanged();
} else {
virtualFieldsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*Defines virtual fields (name'd dynamic expressions) for this query.
*
*
* repeated .luceneserver.VirtualField virtualFields = 7;
*/
public Builder clearVirtualFields() {
if (virtualFieldsBuilder_ == null) {
virtualFields_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000040);
onChanged();
} else {
virtualFieldsBuilder_.clear();
}
return this;
}
/**
*
*Defines virtual fields (name'd dynamic expressions) for this query.
*
*
* repeated .luceneserver.VirtualField virtualFields = 7;
*/
public Builder removeVirtualFields(int index) {
if (virtualFieldsBuilder_ == null) {
ensureVirtualFieldsIsMutable();
virtualFields_.remove(index);
onChanged();
} else {
virtualFieldsBuilder_.remove(index);
}
return this;
}
/**
*
*Defines virtual fields (name'd dynamic expressions) for this query.
*
*
* repeated .luceneserver.VirtualField virtualFields = 7;
*/
public com.yelp.nrtsearch.server.grpc.VirtualField.Builder getVirtualFieldsBuilder(
int index) {
return getVirtualFieldsFieldBuilder().getBuilder(index);
}
/**
*
*Defines virtual fields (name'd dynamic expressions) for this query.
*
*
* repeated .luceneserver.VirtualField virtualFields = 7;
*/
public com.yelp.nrtsearch.server.grpc.VirtualFieldOrBuilder getVirtualFieldsOrBuilder(
int index) {
if (virtualFieldsBuilder_ == null) {
return virtualFields_.get(index); } else {
return virtualFieldsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*Defines virtual fields (name'd dynamic expressions) for this query.
*
*
* repeated .luceneserver.VirtualField virtualFields = 7;
*/
public java.util.List extends com.yelp.nrtsearch.server.grpc.VirtualFieldOrBuilder>
getVirtualFieldsOrBuilderList() {
if (virtualFieldsBuilder_ != null) {
return virtualFieldsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(virtualFields_);
}
}
/**
*
*Defines virtual fields (name'd dynamic expressions) for this query.
*
*
* repeated .luceneserver.VirtualField virtualFields = 7;
*/
public com.yelp.nrtsearch.server.grpc.VirtualField.Builder addVirtualFieldsBuilder() {
return getVirtualFieldsFieldBuilder().addBuilder(
com.yelp.nrtsearch.server.grpc.VirtualField.getDefaultInstance());
}
/**
*
*Defines virtual fields (name'd dynamic expressions) for this query.
*
*
* repeated .luceneserver.VirtualField virtualFields = 7;
*/
public com.yelp.nrtsearch.server.grpc.VirtualField.Builder addVirtualFieldsBuilder(
int index) {
return getVirtualFieldsFieldBuilder().addBuilder(
index, com.yelp.nrtsearch.server.grpc.VirtualField.getDefaultInstance());
}
/**
*
*Defines virtual fields (name'd dynamic expressions) for this query.
*
*
* repeated .luceneserver.VirtualField virtualFields = 7;
*/
public java.util.List
getVirtualFieldsBuilderList() {
return getVirtualFieldsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.VirtualField, com.yelp.nrtsearch.server.grpc.VirtualField.Builder, com.yelp.nrtsearch.server.grpc.VirtualFieldOrBuilder>
getVirtualFieldsFieldBuilder() {
if (virtualFieldsBuilder_ == null) {
virtualFieldsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.VirtualField, com.yelp.nrtsearch.server.grpc.VirtualField.Builder, com.yelp.nrtsearch.server.grpc.VirtualFieldOrBuilder>(
virtualFields_,
((bitField0_ & 0x00000040) != 0),
getParentForChildren(),
isClean());
virtualFields_ = null;
}
return virtualFieldsBuilder_;
}
private com.yelp.nrtsearch.server.grpc.Query query_;
private com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.Query, com.yelp.nrtsearch.server.grpc.Query.Builder, com.yelp.nrtsearch.server.grpc.QueryOrBuilder> queryBuilder_;
/**
*
* Full query to execute using QueryNodes
*
*
* .luceneserver.Query query = 8;
* @return Whether the query field is set.
*/
public boolean hasQuery() {
return ((bitField0_ & 0x00000080) != 0);
}
/**
*
* Full query to execute using QueryNodes
*
*
* .luceneserver.Query query = 8;
* @return The query.
*/
public com.yelp.nrtsearch.server.grpc.Query getQuery() {
if (queryBuilder_ == null) {
return query_ == null ? com.yelp.nrtsearch.server.grpc.Query.getDefaultInstance() : query_;
} else {
return queryBuilder_.getMessage();
}
}
/**
*
* Full query to execute using QueryNodes
*
*
* .luceneserver.Query query = 8;
*/
public Builder setQuery(com.yelp.nrtsearch.server.grpc.Query value) {
if (queryBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
query_ = value;
} else {
queryBuilder_.setMessage(value);
}
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
* Full query to execute using QueryNodes
*
*
* .luceneserver.Query query = 8;
*/
public Builder setQuery(
com.yelp.nrtsearch.server.grpc.Query.Builder builderForValue) {
if (queryBuilder_ == null) {
query_ = builderForValue.build();
} else {
queryBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
* Full query to execute using QueryNodes
*
*
* .luceneserver.Query query = 8;
*/
public Builder mergeQuery(com.yelp.nrtsearch.server.grpc.Query value) {
if (queryBuilder_ == null) {
if (((bitField0_ & 0x00000080) != 0) &&
query_ != null &&
query_ != com.yelp.nrtsearch.server.grpc.Query.getDefaultInstance()) {
getQueryBuilder().mergeFrom(value);
} else {
query_ = value;
}
} else {
queryBuilder_.mergeFrom(value);
}
if (query_ != null) {
bitField0_ |= 0x00000080;
onChanged();
}
return this;
}
/**
*
* Full query to execute using QueryNodes
*
*
* .luceneserver.Query query = 8;
*/
public Builder clearQuery() {
bitField0_ = (bitField0_ & ~0x00000080);
query_ = null;
if (queryBuilder_ != null) {
queryBuilder_.dispose();
queryBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Full query to execute using QueryNodes
*
*
* .luceneserver.Query query = 8;
*/
public com.yelp.nrtsearch.server.grpc.Query.Builder getQueryBuilder() {
bitField0_ |= 0x00000080;
onChanged();
return getQueryFieldBuilder().getBuilder();
}
/**
*
* Full query to execute using QueryNodes
*
*
* .luceneserver.Query query = 8;
*/
public com.yelp.nrtsearch.server.grpc.QueryOrBuilder getQueryOrBuilder() {
if (queryBuilder_ != null) {
return queryBuilder_.getMessageOrBuilder();
} else {
return query_ == null ?
com.yelp.nrtsearch.server.grpc.Query.getDefaultInstance() : query_;
}
}
/**
*
* Full query to execute using QueryNodes
*
*
* .luceneserver.Query query = 8;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.Query, com.yelp.nrtsearch.server.grpc.Query.Builder, com.yelp.nrtsearch.server.grpc.QueryOrBuilder>
getQueryFieldBuilder() {
if (queryBuilder_ == null) {
queryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.Query, com.yelp.nrtsearch.server.grpc.Query.Builder, com.yelp.nrtsearch.server.grpc.QueryOrBuilder>(
getQuery(),
getParentForChildren(),
isClean());
query_ = null;
}
return queryBuilder_;
}
private com.yelp.nrtsearch.server.grpc.QuerySortField querySort_;
private com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.QuerySortField, com.yelp.nrtsearch.server.grpc.QuerySortField.Builder, com.yelp.nrtsearch.server.grpc.QuerySortFieldOrBuilder> querySortBuilder_;
/**
*
*Sort hits by field (default is by relevance).
*
*
* .luceneserver.QuerySortField querySort = 9;
* @return Whether the querySort field is set.
*/
public boolean hasQuerySort() {
return ((bitField0_ & 0x00000100) != 0);
}
/**
*
*Sort hits by field (default is by relevance).
*
*
* .luceneserver.QuerySortField querySort = 9;
* @return The querySort.
*/
public com.yelp.nrtsearch.server.grpc.QuerySortField getQuerySort() {
if (querySortBuilder_ == null) {
return querySort_ == null ? com.yelp.nrtsearch.server.grpc.QuerySortField.getDefaultInstance() : querySort_;
} else {
return querySortBuilder_.getMessage();
}
}
/**
*
*Sort hits by field (default is by relevance).
*
*
* .luceneserver.QuerySortField querySort = 9;
*/
public Builder setQuerySort(com.yelp.nrtsearch.server.grpc.QuerySortField value) {
if (querySortBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
querySort_ = value;
} else {
querySortBuilder_.setMessage(value);
}
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
*Sort hits by field (default is by relevance).
*
*
* .luceneserver.QuerySortField querySort = 9;
*/
public Builder setQuerySort(
com.yelp.nrtsearch.server.grpc.QuerySortField.Builder builderForValue) {
if (querySortBuilder_ == null) {
querySort_ = builderForValue.build();
} else {
querySortBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
*Sort hits by field (default is by relevance).
*
*
* .luceneserver.QuerySortField querySort = 9;
*/
public Builder mergeQuerySort(com.yelp.nrtsearch.server.grpc.QuerySortField value) {
if (querySortBuilder_ == null) {
if (((bitField0_ & 0x00000100) != 0) &&
querySort_ != null &&
querySort_ != com.yelp.nrtsearch.server.grpc.QuerySortField.getDefaultInstance()) {
getQuerySortBuilder().mergeFrom(value);
} else {
querySort_ = value;
}
} else {
querySortBuilder_.mergeFrom(value);
}
if (querySort_ != null) {
bitField0_ |= 0x00000100;
onChanged();
}
return this;
}
/**
*
*Sort hits by field (default is by relevance).
*
*
* .luceneserver.QuerySortField querySort = 9;
*/
public Builder clearQuerySort() {
bitField0_ = (bitField0_ & ~0x00000100);
querySort_ = null;
if (querySortBuilder_ != null) {
querySortBuilder_.dispose();
querySortBuilder_ = null;
}
onChanged();
return this;
}
/**
*
*Sort hits by field (default is by relevance).
*
*
* .luceneserver.QuerySortField querySort = 9;
*/
public com.yelp.nrtsearch.server.grpc.QuerySortField.Builder getQuerySortBuilder() {
bitField0_ |= 0x00000100;
onChanged();
return getQuerySortFieldBuilder().getBuilder();
}
/**
*
*Sort hits by field (default is by relevance).
*
*
* .luceneserver.QuerySortField querySort = 9;
*/
public com.yelp.nrtsearch.server.grpc.QuerySortFieldOrBuilder getQuerySortOrBuilder() {
if (querySortBuilder_ != null) {
return querySortBuilder_.getMessageOrBuilder();
} else {
return querySort_ == null ?
com.yelp.nrtsearch.server.grpc.QuerySortField.getDefaultInstance() : querySort_;
}
}
/**
*
*Sort hits by field (default is by relevance).
*
*
* .luceneserver.QuerySortField querySort = 9;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.QuerySortField, com.yelp.nrtsearch.server.grpc.QuerySortField.Builder, com.yelp.nrtsearch.server.grpc.QuerySortFieldOrBuilder>
getQuerySortFieldBuilder() {
if (querySortBuilder_ == null) {
querySortBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.QuerySortField, com.yelp.nrtsearch.server.grpc.QuerySortField.Builder, com.yelp.nrtsearch.server.grpc.QuerySortFieldOrBuilder>(
getQuerySort(),
getParentForChildren(),
isClean());
querySort_ = null;
}
return querySortBuilder_;
}
/**
*
*Search a generation previously returned by an indexing operation such as #addDocument. Use this to search a non-committed (near-real-time) view of the index.
*
*
* int64 indexGen = 10;
* @return Whether the indexGen field is set.
*/
public boolean hasIndexGen() {
return searcherCase_ == 10;
}
/**
*
*Search a generation previously returned by an indexing operation such as #addDocument. Use this to search a non-committed (near-real-time) view of the index.
*
*
* int64 indexGen = 10;
* @return The indexGen.
*/
public long getIndexGen() {
if (searcherCase_ == 10) {
return (java.lang.Long) searcher_;
}
return 0L;
}
/**
*
*Search a generation previously returned by an indexing operation such as #addDocument. Use this to search a non-committed (near-real-time) view of the index.
*
*
* int64 indexGen = 10;
* @param value The indexGen to set.
* @return This builder for chaining.
*/
public Builder setIndexGen(long value) {
searcherCase_ = 10;
searcher_ = value;
onChanged();
return this;
}
/**
*
*Search a generation previously returned by an indexing operation such as #addDocument. Use this to search a non-committed (near-real-time) view of the index.
*
*
* int64 indexGen = 10;
* @return This builder for chaining.
*/
public Builder clearIndexGen() {
if (searcherCase_ == 10) {
searcherCase_ = 0;
searcher_ = null;
onChanged();
}
return this;
}
/**
*
*Search a specific searcher version. This is typically used by follow-on searches (e.g., user clicks next page, drills down, or changes sort, etc.) to get the same searcher used by the original search.
*
*
* int64 version = 11;
* @return Whether the version field is set.
*/
public boolean hasVersion() {
return searcherCase_ == 11;
}
/**
*
*Search a specific searcher version. This is typically used by follow-on searches (e.g., user clicks next page, drills down, or changes sort, etc.) to get the same searcher used by the original search.
*
*
* int64 version = 11;
* @return The version.
*/
public long getVersion() {
if (searcherCase_ == 11) {
return (java.lang.Long) searcher_;
}
return 0L;
}
/**
*
*Search a specific searcher version. This is typically used by follow-on searches (e.g., user clicks next page, drills down, or changes sort, etc.) to get the same searcher used by the original search.
*
*
* int64 version = 11;
* @param value The version to set.
* @return This builder for chaining.
*/
public Builder setVersion(long value) {
searcherCase_ = 11;
searcher_ = value;
onChanged();
return this;
}
/**
*
*Search a specific searcher version. This is typically used by follow-on searches (e.g., user clicks next page, drills down, or changes sort, etc.) to get the same searcher used by the original search.
*
*
* int64 version = 11;
* @return This builder for chaining.
*/
public Builder clearVersion() {
if (searcherCase_ == 11) {
searcherCase_ = 0;
searcher_ = null;
onChanged();
}
return this;
}
/**
*
*Search a snapshot previously created with #createSnapshot
*
*
* string snapshot = 12;
* @return Whether the snapshot field is set.
*/
@java.lang.Override
public boolean hasSnapshot() {
return searcherCase_ == 12;
}
/**
*
*Search a snapshot previously created with #createSnapshot
*
*
* string snapshot = 12;
* @return The snapshot.
*/
@java.lang.Override
public java.lang.String getSnapshot() {
java.lang.Object ref = "";
if (searcherCase_ == 12) {
ref = searcher_;
}
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
if (searcherCase_ == 12) {
searcher_ = s;
}
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*Search a snapshot previously created with #createSnapshot
*
*
* string snapshot = 12;
* @return The bytes for snapshot.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getSnapshotBytes() {
java.lang.Object ref = "";
if (searcherCase_ == 12) {
ref = searcher_;
}
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
if (searcherCase_ == 12) {
searcher_ = b;
}
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*Search a snapshot previously created with #createSnapshot
*
*
* string snapshot = 12;
* @param value The snapshot to set.
* @return This builder for chaining.
*/
public Builder setSnapshot(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
searcherCase_ = 12;
searcher_ = value;
onChanged();
return this;
}
/**
*
*Search a snapshot previously created with #createSnapshot
*
*
* string snapshot = 12;
* @return This builder for chaining.
*/
public Builder clearSnapshot() {
if (searcherCase_ == 12) {
searcherCase_ = 0;
searcher_ = null;
onChanged();
}
return this;
}
/**
*
*Search a snapshot previously created with #createSnapshot
*
*
* string snapshot = 12;
* @param value The bytes for snapshot to set.
* @return This builder for chaining.
*/
public Builder setSnapshotBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
searcherCase_ = 12;
searcher_ = value;
onChanged();
return this;
}
private int totalHitsThreshold_ ;
/**
*
*By default we count hits accurately up to 1000. This makes sure that we don't spend most time on computing hit counts
*
*
* int32 totalHitsThreshold = 13;
* @return The totalHitsThreshold.
*/
@java.lang.Override
public int getTotalHitsThreshold() {
return totalHitsThreshold_;
}
/**
*
*By default we count hits accurately up to 1000. This makes sure that we don't spend most time on computing hit counts
*
*
* int32 totalHitsThreshold = 13;
* @param value The totalHitsThreshold to set.
* @return This builder for chaining.
*/
public Builder setTotalHitsThreshold(int value) {
totalHitsThreshold_ = value;
bitField0_ |= 0x00001000;
onChanged();
return this;
}
/**
*
*By default we count hits accurately up to 1000. This makes sure that we don't spend most time on computing hit counts
*
*
* int32 totalHitsThreshold = 13;
* @return This builder for chaining.
*/
public Builder clearTotalHitsThreshold() {
bitField0_ = (bitField0_ & ~0x00001000);
totalHitsThreshold_ = 0;
onChanged();
return this;
}
private java.util.List facets_ =
java.util.Collections.emptyList();
private void ensureFacetsIsMutable() {
if (!((bitField0_ & 0x00002000) != 0)) {
facets_ = new java.util.ArrayList(facets_);
bitField0_ |= 0x00002000;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.Facet, com.yelp.nrtsearch.server.grpc.Facet.Builder, com.yelp.nrtsearch.server.grpc.FacetOrBuilder> facetsBuilder_;
/**
*
* Which facets to retrieve
*
*
* repeated .luceneserver.Facet facets = 14;
*/
public java.util.List getFacetsList() {
if (facetsBuilder_ == null) {
return java.util.Collections.unmodifiableList(facets_);
} else {
return facetsBuilder_.getMessageList();
}
}
/**
*
* Which facets to retrieve
*
*
* repeated .luceneserver.Facet facets = 14;
*/
public int getFacetsCount() {
if (facetsBuilder_ == null) {
return facets_.size();
} else {
return facetsBuilder_.getCount();
}
}
/**
*
* Which facets to retrieve
*
*
* repeated .luceneserver.Facet facets = 14;
*/
public com.yelp.nrtsearch.server.grpc.Facet getFacets(int index) {
if (facetsBuilder_ == null) {
return facets_.get(index);
} else {
return facetsBuilder_.getMessage(index);
}
}
/**
*
* Which facets to retrieve
*
*
* repeated .luceneserver.Facet facets = 14;
*/
public Builder setFacets(
int index, com.yelp.nrtsearch.server.grpc.Facet value) {
if (facetsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFacetsIsMutable();
facets_.set(index, value);
onChanged();
} else {
facetsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Which facets to retrieve
*
*
* repeated .luceneserver.Facet facets = 14;
*/
public Builder setFacets(
int index, com.yelp.nrtsearch.server.grpc.Facet.Builder builderForValue) {
if (facetsBuilder_ == null) {
ensureFacetsIsMutable();
facets_.set(index, builderForValue.build());
onChanged();
} else {
facetsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Which facets to retrieve
*
*
* repeated .luceneserver.Facet facets = 14;
*/
public Builder addFacets(com.yelp.nrtsearch.server.grpc.Facet value) {
if (facetsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFacetsIsMutable();
facets_.add(value);
onChanged();
} else {
facetsBuilder_.addMessage(value);
}
return this;
}
/**
*
* Which facets to retrieve
*
*
* repeated .luceneserver.Facet facets = 14;
*/
public Builder addFacets(
int index, com.yelp.nrtsearch.server.grpc.Facet value) {
if (facetsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFacetsIsMutable();
facets_.add(index, value);
onChanged();
} else {
facetsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Which facets to retrieve
*
*
* repeated .luceneserver.Facet facets = 14;
*/
public Builder addFacets(
com.yelp.nrtsearch.server.grpc.Facet.Builder builderForValue) {
if (facetsBuilder_ == null) {
ensureFacetsIsMutable();
facets_.add(builderForValue.build());
onChanged();
} else {
facetsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Which facets to retrieve
*
*
* repeated .luceneserver.Facet facets = 14;
*/
public Builder addFacets(
int index, com.yelp.nrtsearch.server.grpc.Facet.Builder builderForValue) {
if (facetsBuilder_ == null) {
ensureFacetsIsMutable();
facets_.add(index, builderForValue.build());
onChanged();
} else {
facetsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Which facets to retrieve
*
*
* repeated .luceneserver.Facet facets = 14;
*/
public Builder addAllFacets(
java.lang.Iterable extends com.yelp.nrtsearch.server.grpc.Facet> values) {
if (facetsBuilder_ == null) {
ensureFacetsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, facets_);
onChanged();
} else {
facetsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Which facets to retrieve
*
*
* repeated .luceneserver.Facet facets = 14;
*/
public Builder clearFacets() {
if (facetsBuilder_ == null) {
facets_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00002000);
onChanged();
} else {
facetsBuilder_.clear();
}
return this;
}
/**
*
* Which facets to retrieve
*
*
* repeated .luceneserver.Facet facets = 14;
*/
public Builder removeFacets(int index) {
if (facetsBuilder_ == null) {
ensureFacetsIsMutable();
facets_.remove(index);
onChanged();
} else {
facetsBuilder_.remove(index);
}
return this;
}
/**
*
* Which facets to retrieve
*
*
* repeated .luceneserver.Facet facets = 14;
*/
public com.yelp.nrtsearch.server.grpc.Facet.Builder getFacetsBuilder(
int index) {
return getFacetsFieldBuilder().getBuilder(index);
}
/**
*
* Which facets to retrieve
*
*
* repeated .luceneserver.Facet facets = 14;
*/
public com.yelp.nrtsearch.server.grpc.FacetOrBuilder getFacetsOrBuilder(
int index) {
if (facetsBuilder_ == null) {
return facets_.get(index); } else {
return facetsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Which facets to retrieve
*
*
* repeated .luceneserver.Facet facets = 14;
*/
public java.util.List extends com.yelp.nrtsearch.server.grpc.FacetOrBuilder>
getFacetsOrBuilderList() {
if (facetsBuilder_ != null) {
return facetsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(facets_);
}
}
/**
*
* Which facets to retrieve
*
*
* repeated .luceneserver.Facet facets = 14;
*/
public com.yelp.nrtsearch.server.grpc.Facet.Builder addFacetsBuilder() {
return getFacetsFieldBuilder().addBuilder(
com.yelp.nrtsearch.server.grpc.Facet.getDefaultInstance());
}
/**
*
* Which facets to retrieve
*
*
* repeated .luceneserver.Facet facets = 14;
*/
public com.yelp.nrtsearch.server.grpc.Facet.Builder addFacetsBuilder(
int index) {
return getFacetsFieldBuilder().addBuilder(
index, com.yelp.nrtsearch.server.grpc.Facet.getDefaultInstance());
}
/**
*
* Which facets to retrieve
*
*
* repeated .luceneserver.Facet facets = 14;
*/
public java.util.List
getFacetsBuilderList() {
return getFacetsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.Facet, com.yelp.nrtsearch.server.grpc.Facet.Builder, com.yelp.nrtsearch.server.grpc.FacetOrBuilder>
getFacetsFieldBuilder() {
if (facetsBuilder_ == null) {
facetsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.Facet, com.yelp.nrtsearch.server.grpc.Facet.Builder, com.yelp.nrtsearch.server.grpc.FacetOrBuilder>(
facets_,
((bitField0_ & 0x00002000) != 0),
getParentForChildren(),
isClean());
facets_ = null;
}
return facetsBuilder_;
}
private java.util.List fetchTasks_ =
java.util.Collections.emptyList();
private void ensureFetchTasksIsMutable() {
if (!((bitField0_ & 0x00004000) != 0)) {
fetchTasks_ = new java.util.ArrayList(fetchTasks_);
bitField0_ |= 0x00004000;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.FetchTask, com.yelp.nrtsearch.server.grpc.FetchTask.Builder, com.yelp.nrtsearch.server.grpc.FetchTaskOrBuilder> fetchTasksBuilder_;
/**
*
*Any custom tasks that should be performed on top documents after ranking
*
*
* repeated .luceneserver.FetchTask fetchTasks = 15;
*/
public java.util.List getFetchTasksList() {
if (fetchTasksBuilder_ == null) {
return java.util.Collections.unmodifiableList(fetchTasks_);
} else {
return fetchTasksBuilder_.getMessageList();
}
}
/**
*
*Any custom tasks that should be performed on top documents after ranking
*
*
* repeated .luceneserver.FetchTask fetchTasks = 15;
*/
public int getFetchTasksCount() {
if (fetchTasksBuilder_ == null) {
return fetchTasks_.size();
} else {
return fetchTasksBuilder_.getCount();
}
}
/**
*
*Any custom tasks that should be performed on top documents after ranking
*
*
* repeated .luceneserver.FetchTask fetchTasks = 15;
*/
public com.yelp.nrtsearch.server.grpc.FetchTask getFetchTasks(int index) {
if (fetchTasksBuilder_ == null) {
return fetchTasks_.get(index);
} else {
return fetchTasksBuilder_.getMessage(index);
}
}
/**
*
*Any custom tasks that should be performed on top documents after ranking
*
*
* repeated .luceneserver.FetchTask fetchTasks = 15;
*/
public Builder setFetchTasks(
int index, com.yelp.nrtsearch.server.grpc.FetchTask value) {
if (fetchTasksBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFetchTasksIsMutable();
fetchTasks_.set(index, value);
onChanged();
} else {
fetchTasksBuilder_.setMessage(index, value);
}
return this;
}
/**
*
*Any custom tasks that should be performed on top documents after ranking
*
*
* repeated .luceneserver.FetchTask fetchTasks = 15;
*/
public Builder setFetchTasks(
int index, com.yelp.nrtsearch.server.grpc.FetchTask.Builder builderForValue) {
if (fetchTasksBuilder_ == null) {
ensureFetchTasksIsMutable();
fetchTasks_.set(index, builderForValue.build());
onChanged();
} else {
fetchTasksBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
*Any custom tasks that should be performed on top documents after ranking
*
*
* repeated .luceneserver.FetchTask fetchTasks = 15;
*/
public Builder addFetchTasks(com.yelp.nrtsearch.server.grpc.FetchTask value) {
if (fetchTasksBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFetchTasksIsMutable();
fetchTasks_.add(value);
onChanged();
} else {
fetchTasksBuilder_.addMessage(value);
}
return this;
}
/**
*
*Any custom tasks that should be performed on top documents after ranking
*
*
* repeated .luceneserver.FetchTask fetchTasks = 15;
*/
public Builder addFetchTasks(
int index, com.yelp.nrtsearch.server.grpc.FetchTask value) {
if (fetchTasksBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFetchTasksIsMutable();
fetchTasks_.add(index, value);
onChanged();
} else {
fetchTasksBuilder_.addMessage(index, value);
}
return this;
}
/**
*
*Any custom tasks that should be performed on top documents after ranking
*
*
* repeated .luceneserver.FetchTask fetchTasks = 15;
*/
public Builder addFetchTasks(
com.yelp.nrtsearch.server.grpc.FetchTask.Builder builderForValue) {
if (fetchTasksBuilder_ == null) {
ensureFetchTasksIsMutable();
fetchTasks_.add(builderForValue.build());
onChanged();
} else {
fetchTasksBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
*Any custom tasks that should be performed on top documents after ranking
*
*
* repeated .luceneserver.FetchTask fetchTasks = 15;
*/
public Builder addFetchTasks(
int index, com.yelp.nrtsearch.server.grpc.FetchTask.Builder builderForValue) {
if (fetchTasksBuilder_ == null) {
ensureFetchTasksIsMutable();
fetchTasks_.add(index, builderForValue.build());
onChanged();
} else {
fetchTasksBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
*Any custom tasks that should be performed on top documents after ranking
*
*
* repeated .luceneserver.FetchTask fetchTasks = 15;
*/
public Builder addAllFetchTasks(
java.lang.Iterable extends com.yelp.nrtsearch.server.grpc.FetchTask> values) {
if (fetchTasksBuilder_ == null) {
ensureFetchTasksIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, fetchTasks_);
onChanged();
} else {
fetchTasksBuilder_.addAllMessages(values);
}
return this;
}
/**
*
*Any custom tasks that should be performed on top documents after ranking
*
*
* repeated .luceneserver.FetchTask fetchTasks = 15;
*/
public Builder clearFetchTasks() {
if (fetchTasksBuilder_ == null) {
fetchTasks_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00004000);
onChanged();
} else {
fetchTasksBuilder_.clear();
}
return this;
}
/**
*
*Any custom tasks that should be performed on top documents after ranking
*
*
* repeated .luceneserver.FetchTask fetchTasks = 15;
*/
public Builder removeFetchTasks(int index) {
if (fetchTasksBuilder_ == null) {
ensureFetchTasksIsMutable();
fetchTasks_.remove(index);
onChanged();
} else {
fetchTasksBuilder_.remove(index);
}
return this;
}
/**
*
*Any custom tasks that should be performed on top documents after ranking
*
*
* repeated .luceneserver.FetchTask fetchTasks = 15;
*/
public com.yelp.nrtsearch.server.grpc.FetchTask.Builder getFetchTasksBuilder(
int index) {
return getFetchTasksFieldBuilder().getBuilder(index);
}
/**
*
*Any custom tasks that should be performed on top documents after ranking
*
*
* repeated .luceneserver.FetchTask fetchTasks = 15;
*/
public com.yelp.nrtsearch.server.grpc.FetchTaskOrBuilder getFetchTasksOrBuilder(
int index) {
if (fetchTasksBuilder_ == null) {
return fetchTasks_.get(index); } else {
return fetchTasksBuilder_.getMessageOrBuilder(index);
}
}
/**
*
*Any custom tasks that should be performed on top documents after ranking
*
*
* repeated .luceneserver.FetchTask fetchTasks = 15;
*/
public java.util.List extends com.yelp.nrtsearch.server.grpc.FetchTaskOrBuilder>
getFetchTasksOrBuilderList() {
if (fetchTasksBuilder_ != null) {
return fetchTasksBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(fetchTasks_);
}
}
/**
*
*Any custom tasks that should be performed on top documents after ranking
*
*
* repeated .luceneserver.FetchTask fetchTasks = 15;
*/
public com.yelp.nrtsearch.server.grpc.FetchTask.Builder addFetchTasksBuilder() {
return getFetchTasksFieldBuilder().addBuilder(
com.yelp.nrtsearch.server.grpc.FetchTask.getDefaultInstance());
}
/**
*
*Any custom tasks that should be performed on top documents after ranking
*
*
* repeated .luceneserver.FetchTask fetchTasks = 15;
*/
public com.yelp.nrtsearch.server.grpc.FetchTask.Builder addFetchTasksBuilder(
int index) {
return getFetchTasksFieldBuilder().addBuilder(
index, com.yelp.nrtsearch.server.grpc.FetchTask.getDefaultInstance());
}
/**
*
*Any custom tasks that should be performed on top documents after ranking
*
*
* repeated .luceneserver.FetchTask fetchTasks = 15;
*/
public java.util.List
getFetchTasksBuilderList() {
return getFetchTasksFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.FetchTask, com.yelp.nrtsearch.server.grpc.FetchTask.Builder, com.yelp.nrtsearch.server.grpc.FetchTaskOrBuilder>
getFetchTasksFieldBuilder() {
if (fetchTasksBuilder_ == null) {
fetchTasksBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.FetchTask, com.yelp.nrtsearch.server.grpc.FetchTask.Builder, com.yelp.nrtsearch.server.grpc.FetchTaskOrBuilder>(
fetchTasks_,
((bitField0_ & 0x00004000) != 0),
getParentForChildren(),
isClean());
fetchTasks_ = null;
}
return fetchTasksBuilder_;
}
private boolean disallowPartialResults_ ;
/**
*
*Should partial result be a failure condition. Applies when a search request times out. If false, the top documents ranking at the point of timeout are used and the request continues. Also, hitTimeout is set to true in the response.
*
*
* bool disallowPartialResults = 16;
* @return The disallowPartialResults.
*/
@java.lang.Override
public boolean getDisallowPartialResults() {
return disallowPartialResults_;
}
/**
*
*Should partial result be a failure condition. Applies when a search request times out. If false, the top documents ranking at the point of timeout are used and the request continues. Also, hitTimeout is set to true in the response.
*
*
* bool disallowPartialResults = 16;
* @param value The disallowPartialResults to set.
* @return This builder for chaining.
*/
public Builder setDisallowPartialResults(boolean value) {
disallowPartialResults_ = value;
bitField0_ |= 0x00008000;
onChanged();
return this;
}
/**
*
*Should partial result be a failure condition. Applies when a search request times out. If false, the top documents ranking at the point of timeout are used and the request continues. Also, hitTimeout is set to true in the response.
*
*
* bool disallowPartialResults = 16;
* @return This builder for chaining.
*/
public Builder clearDisallowPartialResults() {
bitField0_ = (bitField0_ & ~0x00008000);
disallowPartialResults_ = false;
onChanged();
return this;
}
private java.lang.Object queryNestedPath_ = "";
/**
*
*nested path we want to query by if we want to query child documents.
*
*
* string queryNestedPath = 17;
* @return The queryNestedPath.
*/
public java.lang.String getQueryNestedPath() {
java.lang.Object ref = queryNestedPath_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
queryNestedPath_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*nested path we want to query by if we want to query child documents.
*
*
* string queryNestedPath = 17;
* @return The bytes for queryNestedPath.
*/
public com.google.protobuf.ByteString
getQueryNestedPathBytes() {
java.lang.Object ref = queryNestedPath_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
queryNestedPath_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*nested path we want to query by if we want to query child documents.
*
*
* string queryNestedPath = 17;
* @param value The queryNestedPath to set.
* @return This builder for chaining.
*/
public Builder setQueryNestedPath(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
queryNestedPath_ = value;
bitField0_ |= 0x00010000;
onChanged();
return this;
}
/**
*
*nested path we want to query by if we want to query child documents.
*
*
* string queryNestedPath = 17;
* @return This builder for chaining.
*/
public Builder clearQueryNestedPath() {
queryNestedPath_ = getDefaultInstance().getQueryNestedPath();
bitField0_ = (bitField0_ & ~0x00010000);
onChanged();
return this;
}
/**
*
*nested path we want to query by if we want to query child documents.
*
*
* string queryNestedPath = 17;
* @param value The bytes for queryNestedPath to set.
* @return This builder for chaining.
*/
public Builder setQueryNestedPathBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
queryNestedPath_ = value;
bitField0_ |= 0x00010000;
onChanged();
return this;
}
private java.util.List rescorers_ =
java.util.Collections.emptyList();
private void ensureRescorersIsMutable() {
if (!((bitField0_ & 0x00020000) != 0)) {
rescorers_ = new java.util.ArrayList(rescorers_);
bitField0_ |= 0x00020000;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.Rescorer, com.yelp.nrtsearch.server.grpc.Rescorer.Builder, com.yelp.nrtsearch.server.grpc.RescorerOrBuilder> rescorersBuilder_;
/**
*
* Rescorers which are executed in-order after the first pass
*
*
* repeated .luceneserver.Rescorer rescorers = 18;
*/
public java.util.List getRescorersList() {
if (rescorersBuilder_ == null) {
return java.util.Collections.unmodifiableList(rescorers_);
} else {
return rescorersBuilder_.getMessageList();
}
}
/**
*
* Rescorers which are executed in-order after the first pass
*
*
* repeated .luceneserver.Rescorer rescorers = 18;
*/
public int getRescorersCount() {
if (rescorersBuilder_ == null) {
return rescorers_.size();
} else {
return rescorersBuilder_.getCount();
}
}
/**
*
* Rescorers which are executed in-order after the first pass
*
*
* repeated .luceneserver.Rescorer rescorers = 18;
*/
public com.yelp.nrtsearch.server.grpc.Rescorer getRescorers(int index) {
if (rescorersBuilder_ == null) {
return rescorers_.get(index);
} else {
return rescorersBuilder_.getMessage(index);
}
}
/**
*
* Rescorers which are executed in-order after the first pass
*
*
* repeated .luceneserver.Rescorer rescorers = 18;
*/
public Builder setRescorers(
int index, com.yelp.nrtsearch.server.grpc.Rescorer value) {
if (rescorersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRescorersIsMutable();
rescorers_.set(index, value);
onChanged();
} else {
rescorersBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Rescorers which are executed in-order after the first pass
*
*
* repeated .luceneserver.Rescorer rescorers = 18;
*/
public Builder setRescorers(
int index, com.yelp.nrtsearch.server.grpc.Rescorer.Builder builderForValue) {
if (rescorersBuilder_ == null) {
ensureRescorersIsMutable();
rescorers_.set(index, builderForValue.build());
onChanged();
} else {
rescorersBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Rescorers which are executed in-order after the first pass
*
*
* repeated .luceneserver.Rescorer rescorers = 18;
*/
public Builder addRescorers(com.yelp.nrtsearch.server.grpc.Rescorer value) {
if (rescorersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRescorersIsMutable();
rescorers_.add(value);
onChanged();
} else {
rescorersBuilder_.addMessage(value);
}
return this;
}
/**
*
* Rescorers which are executed in-order after the first pass
*
*
* repeated .luceneserver.Rescorer rescorers = 18;
*/
public Builder addRescorers(
int index, com.yelp.nrtsearch.server.grpc.Rescorer value) {
if (rescorersBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRescorersIsMutable();
rescorers_.add(index, value);
onChanged();
} else {
rescorersBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Rescorers which are executed in-order after the first pass
*
*
* repeated .luceneserver.Rescorer rescorers = 18;
*/
public Builder addRescorers(
com.yelp.nrtsearch.server.grpc.Rescorer.Builder builderForValue) {
if (rescorersBuilder_ == null) {
ensureRescorersIsMutable();
rescorers_.add(builderForValue.build());
onChanged();
} else {
rescorersBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Rescorers which are executed in-order after the first pass
*
*
* repeated .luceneserver.Rescorer rescorers = 18;
*/
public Builder addRescorers(
int index, com.yelp.nrtsearch.server.grpc.Rescorer.Builder builderForValue) {
if (rescorersBuilder_ == null) {
ensureRescorersIsMutable();
rescorers_.add(index, builderForValue.build());
onChanged();
} else {
rescorersBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Rescorers which are executed in-order after the first pass
*
*
* repeated .luceneserver.Rescorer rescorers = 18;
*/
public Builder addAllRescorers(
java.lang.Iterable extends com.yelp.nrtsearch.server.grpc.Rescorer> values) {
if (rescorersBuilder_ == null) {
ensureRescorersIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, rescorers_);
onChanged();
} else {
rescorersBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Rescorers which are executed in-order after the first pass
*
*
* repeated .luceneserver.Rescorer rescorers = 18;
*/
public Builder clearRescorers() {
if (rescorersBuilder_ == null) {
rescorers_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00020000);
onChanged();
} else {
rescorersBuilder_.clear();
}
return this;
}
/**
*
* Rescorers which are executed in-order after the first pass
*
*
* repeated .luceneserver.Rescorer rescorers = 18;
*/
public Builder removeRescorers(int index) {
if (rescorersBuilder_ == null) {
ensureRescorersIsMutable();
rescorers_.remove(index);
onChanged();
} else {
rescorersBuilder_.remove(index);
}
return this;
}
/**
*
* Rescorers which are executed in-order after the first pass
*
*
* repeated .luceneserver.Rescorer rescorers = 18;
*/
public com.yelp.nrtsearch.server.grpc.Rescorer.Builder getRescorersBuilder(
int index) {
return getRescorersFieldBuilder().getBuilder(index);
}
/**
*
* Rescorers which are executed in-order after the first pass
*
*
* repeated .luceneserver.Rescorer rescorers = 18;
*/
public com.yelp.nrtsearch.server.grpc.RescorerOrBuilder getRescorersOrBuilder(
int index) {
if (rescorersBuilder_ == null) {
return rescorers_.get(index); } else {
return rescorersBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Rescorers which are executed in-order after the first pass
*
*
* repeated .luceneserver.Rescorer rescorers = 18;
*/
public java.util.List extends com.yelp.nrtsearch.server.grpc.RescorerOrBuilder>
getRescorersOrBuilderList() {
if (rescorersBuilder_ != null) {
return rescorersBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(rescorers_);
}
}
/**
*
* Rescorers which are executed in-order after the first pass
*
*
* repeated .luceneserver.Rescorer rescorers = 18;
*/
public com.yelp.nrtsearch.server.grpc.Rescorer.Builder addRescorersBuilder() {
return getRescorersFieldBuilder().addBuilder(
com.yelp.nrtsearch.server.grpc.Rescorer.getDefaultInstance());
}
/**
*
* Rescorers which are executed in-order after the first pass
*
*
* repeated .luceneserver.Rescorer rescorers = 18;
*/
public com.yelp.nrtsearch.server.grpc.Rescorer.Builder addRescorersBuilder(
int index) {
return getRescorersFieldBuilder().addBuilder(
index, com.yelp.nrtsearch.server.grpc.Rescorer.getDefaultInstance());
}
/**
*
* Rescorers which are executed in-order after the first pass
*
*
* repeated .luceneserver.Rescorer rescorers = 18;
*/
public java.util.List
getRescorersBuilderList() {
return getRescorersFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.Rescorer, com.yelp.nrtsearch.server.grpc.Rescorer.Builder, com.yelp.nrtsearch.server.grpc.RescorerOrBuilder>
getRescorersFieldBuilder() {
if (rescorersBuilder_ == null) {
rescorersBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.Rescorer, com.yelp.nrtsearch.server.grpc.Rescorer.Builder, com.yelp.nrtsearch.server.grpc.RescorerOrBuilder>(
rescorers_,
((bitField0_ & 0x00020000) != 0),
getParentForChildren(),
isClean());
rescorers_ = null;
}
return rescorersBuilder_;
}
private boolean profile_ ;
/**
*
*If detailed request execution profiling should be included in the response
*
*
* bool profile = 19;
* @return The profile.
*/
@java.lang.Override
public boolean getProfile() {
return profile_;
}
/**
*
*If detailed request execution profiling should be included in the response
*
*
* bool profile = 19;
* @param value The profile to set.
* @return This builder for chaining.
*/
public Builder setProfile(boolean value) {
profile_ = value;
bitField0_ |= 0x00040000;
onChanged();
return this;
}
/**
*
*If detailed request execution profiling should be included in the response
*
*
* bool profile = 19;
* @return This builder for chaining.
*/
public Builder clearProfile() {
bitField0_ = (bitField0_ & ~0x00040000);
profile_ = false;
onChanged();
return this;
}
private int timeoutCheckEvery_ ;
/**
*
*Check the search timeout condition after each collection of n documents in a segment. If 0, timeout is only checked on the segment boundary.
*
*
* int32 timeoutCheckEvery = 20;
* @return The timeoutCheckEvery.
*/
@java.lang.Override
public int getTimeoutCheckEvery() {
return timeoutCheckEvery_;
}
/**
*
*Check the search timeout condition after each collection of n documents in a segment. If 0, timeout is only checked on the segment boundary.
*
*
* int32 timeoutCheckEvery = 20;
* @param value The timeoutCheckEvery to set.
* @return This builder for chaining.
*/
public Builder setTimeoutCheckEvery(int value) {
timeoutCheckEvery_ = value;
bitField0_ |= 0x00080000;
onChanged();
return this;
}
/**
*
*Check the search timeout condition after each collection of n documents in a segment. If 0, timeout is only checked on the segment boundary.
*
*
* int32 timeoutCheckEvery = 20;
* @return This builder for chaining.
*/
public Builder clearTimeoutCheckEvery() {
bitField0_ = (bitField0_ & ~0x00080000);
timeoutCheckEvery_ = 0;
onChanged();
return this;
}
private static final class CollectorsConverter implements com.google.protobuf.MapFieldBuilder.Converter {
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.Collector build(com.yelp.nrtsearch.server.grpc.CollectorOrBuilder val) {
if (val instanceof com.yelp.nrtsearch.server.grpc.Collector) { return (com.yelp.nrtsearch.server.grpc.Collector) val; }
return ((com.yelp.nrtsearch.server.grpc.Collector.Builder) val).build();
}
@java.lang.Override
public com.google.protobuf.MapEntry defaultEntry() {
return CollectorsDefaultEntryHolder.defaultEntry;
}
};
private static final CollectorsConverter collectorsConverter = new CollectorsConverter();
private com.google.protobuf.MapFieldBuilder<
java.lang.String, com.yelp.nrtsearch.server.grpc.CollectorOrBuilder, com.yelp.nrtsearch.server.grpc.Collector, com.yelp.nrtsearch.server.grpc.Collector.Builder> collectors_;
private com.google.protobuf.MapFieldBuilder
internalGetCollectors() {
if (collectors_ == null) {
return new com.google.protobuf.MapFieldBuilder<>(collectorsConverter);
}
return collectors_;
}
private com.google.protobuf.MapFieldBuilder
internalGetMutableCollectors() {
if (collectors_ == null) {
collectors_ = new com.google.protobuf.MapFieldBuilder<>(collectorsConverter);
}
bitField0_ |= 0x00100000;
onChanged();
return collectors_;
}
public int getCollectorsCount() {
return internalGetCollectors().ensureBuilderMap().size();
}
/**
*
*Additional document collectors. Provides support for operations such as aggregation.
*
*
* map<string, .luceneserver.Collector> collectors = 21;
*/
@java.lang.Override
public boolean containsCollectors(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetCollectors().ensureBuilderMap().containsKey(key);
}
/**
* Use {@link #getCollectorsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getCollectors() {
return getCollectorsMap();
}
/**
*
*Additional document collectors. Provides support for operations such as aggregation.
*
*
* map<string, .luceneserver.Collector> collectors = 21;
*/
@java.lang.Override
public java.util.Map getCollectorsMap() {
return internalGetCollectors().getImmutableMap();
}
/**
*
*Additional document collectors. Provides support for operations such as aggregation.
*
*
* map<string, .luceneserver.Collector> collectors = 21;
*/
@java.lang.Override
public /* nullable */
com.yelp.nrtsearch.server.grpc.Collector getCollectorsOrDefault(
java.lang.String key,
/* nullable */
com.yelp.nrtsearch.server.grpc.Collector defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map = internalGetMutableCollectors().ensureBuilderMap();
return map.containsKey(key) ? collectorsConverter.build(map.get(key)) : defaultValue;
}
/**
*
*Additional document collectors. Provides support for operations such as aggregation.
*
*
* map<string, .luceneserver.Collector> collectors = 21;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.Collector getCollectorsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map = internalGetMutableCollectors().ensureBuilderMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return collectorsConverter.build(map.get(key));
}
public Builder clearCollectors() {
bitField0_ = (bitField0_ & ~0x00100000);
internalGetMutableCollectors().clear();
return this;
}
/**
*
*Additional document collectors. Provides support for operations such as aggregation.
*
*
* map<string, .luceneserver.Collector> collectors = 21;
*/
public Builder removeCollectors(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableCollectors().ensureBuilderMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableCollectors() {
bitField0_ |= 0x00100000;
return internalGetMutableCollectors().ensureMessageMap();
}
/**
*
*Additional document collectors. Provides support for operations such as aggregation.
*
*
* map<string, .luceneserver.Collector> collectors = 21;
*/
public Builder putCollectors(
java.lang.String key,
com.yelp.nrtsearch.server.grpc.Collector value) {
if (key == null) { throw new NullPointerException("map key"); }
if (value == null) { throw new NullPointerException("map value"); }
internalGetMutableCollectors().ensureBuilderMap()
.put(key, value);
bitField0_ |= 0x00100000;
return this;
}
/**
*
*Additional document collectors. Provides support for operations such as aggregation.
*
*
* map<string, .luceneserver.Collector> collectors = 21;
*/
public Builder putAllCollectors(
java.util.Map values) {
for (java.util.Map.Entry e : values.entrySet()) {
if (e.getKey() == null || e.getValue() == null) {
throw new NullPointerException();
}
}
internalGetMutableCollectors().ensureBuilderMap()
.putAll(values);
bitField0_ |= 0x00100000;
return this;
}
/**
*
*Additional document collectors. Provides support for operations such as aggregation.
*
*
* map<string, .luceneserver.Collector> collectors = 21;
*/
public com.yelp.nrtsearch.server.grpc.Collector.Builder putCollectorsBuilderIfAbsent(
java.lang.String key) {
java.util.Map builderMap = internalGetMutableCollectors().ensureBuilderMap();
com.yelp.nrtsearch.server.grpc.CollectorOrBuilder entry = builderMap.get(key);
if (entry == null) {
entry = com.yelp.nrtsearch.server.grpc.Collector.newBuilder();
builderMap.put(key, entry);
}
if (entry instanceof com.yelp.nrtsearch.server.grpc.Collector) {
entry = ((com.yelp.nrtsearch.server.grpc.Collector) entry).toBuilder();
builderMap.put(key, entry);
}
return (com.yelp.nrtsearch.server.grpc.Collector.Builder) entry;
}
private int terminateAfter_ ;
/**
*
*Stop document collection in search phase after this many documents, 0 for unlimited.
*
*
* int32 terminateAfter = 22;
* @return The terminateAfter.
*/
@java.lang.Override
public int getTerminateAfter() {
return terminateAfter_;
}
/**
*
*Stop document collection in search phase after this many documents, 0 for unlimited.
*
*
* int32 terminateAfter = 22;
* @param value The terminateAfter to set.
* @return This builder for chaining.
*/
public Builder setTerminateAfter(int value) {
terminateAfter_ = value;
bitField0_ |= 0x00200000;
onChanged();
return this;
}
/**
*
*Stop document collection in search phase after this many documents, 0 for unlimited.
*
*
* int32 terminateAfter = 22;
* @return This builder for chaining.
*/
public Builder clearTerminateAfter() {
bitField0_ = (bitField0_ & ~0x00200000);
terminateAfter_ = 0;
onChanged();
return this;
}
private java.lang.Object responseCompression_ = "";
/**
*
*Set gRPC compression codec to use for response message. If value is unset or invalid, falls back to uncompressed. Valid codecs: identity, gzip, lz4
*
*
* string responseCompression = 23;
* @return The responseCompression.
*/
public java.lang.String getResponseCompression() {
java.lang.Object ref = responseCompression_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
responseCompression_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*Set gRPC compression codec to use for response message. If value is unset or invalid, falls back to uncompressed. Valid codecs: identity, gzip, lz4
*
*
* string responseCompression = 23;
* @return The bytes for responseCompression.
*/
public com.google.protobuf.ByteString
getResponseCompressionBytes() {
java.lang.Object ref = responseCompression_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
responseCompression_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*Set gRPC compression codec to use for response message. If value is unset or invalid, falls back to uncompressed. Valid codecs: identity, gzip, lz4
*
*
* string responseCompression = 23;
* @param value The responseCompression to set.
* @return This builder for chaining.
*/
public Builder setResponseCompression(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
responseCompression_ = value;
bitField0_ |= 0x00400000;
onChanged();
return this;
}
/**
*
*Set gRPC compression codec to use for response message. If value is unset or invalid, falls back to uncompressed. Valid codecs: identity, gzip, lz4
*
*
* string responseCompression = 23;
* @return This builder for chaining.
*/
public Builder clearResponseCompression() {
responseCompression_ = getDefaultInstance().getResponseCompression();
bitField0_ = (bitField0_ & ~0x00400000);
onChanged();
return this;
}
/**
*
*Set gRPC compression codec to use for response message. If value is unset or invalid, falls back to uncompressed. Valid codecs: identity, gzip, lz4
*
*
* string responseCompression = 23;
* @param value The bytes for responseCompression to set.
* @return This builder for chaining.
*/
public Builder setResponseCompressionBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
responseCompression_ = value;
bitField0_ |= 0x00400000;
onChanged();
return this;
}
private com.yelp.nrtsearch.server.grpc.Highlight highlight_;
private com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.Highlight, com.yelp.nrtsearch.server.grpc.Highlight.Builder, com.yelp.nrtsearch.server.grpc.HighlightOrBuilder> highlightBuilder_;
/**
*
* Specify how to highlight matched text
*
*
* .luceneserver.Highlight highlight = 24;
* @return Whether the highlight field is set.
*/
public boolean hasHighlight() {
return ((bitField0_ & 0x00800000) != 0);
}
/**
*
* Specify how to highlight matched text
*
*
* .luceneserver.Highlight highlight = 24;
* @return The highlight.
*/
public com.yelp.nrtsearch.server.grpc.Highlight getHighlight() {
if (highlightBuilder_ == null) {
return highlight_ == null ? com.yelp.nrtsearch.server.grpc.Highlight.getDefaultInstance() : highlight_;
} else {
return highlightBuilder_.getMessage();
}
}
/**
*
* Specify how to highlight matched text
*
*
* .luceneserver.Highlight highlight = 24;
*/
public Builder setHighlight(com.yelp.nrtsearch.server.grpc.Highlight value) {
if (highlightBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
highlight_ = value;
} else {
highlightBuilder_.setMessage(value);
}
bitField0_ |= 0x00800000;
onChanged();
return this;
}
/**
*
* Specify how to highlight matched text
*
*
* .luceneserver.Highlight highlight = 24;
*/
public Builder setHighlight(
com.yelp.nrtsearch.server.grpc.Highlight.Builder builderForValue) {
if (highlightBuilder_ == null) {
highlight_ = builderForValue.build();
} else {
highlightBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00800000;
onChanged();
return this;
}
/**
*
* Specify how to highlight matched text
*
*
* .luceneserver.Highlight highlight = 24;
*/
public Builder mergeHighlight(com.yelp.nrtsearch.server.grpc.Highlight value) {
if (highlightBuilder_ == null) {
if (((bitField0_ & 0x00800000) != 0) &&
highlight_ != null &&
highlight_ != com.yelp.nrtsearch.server.grpc.Highlight.getDefaultInstance()) {
getHighlightBuilder().mergeFrom(value);
} else {
highlight_ = value;
}
} else {
highlightBuilder_.mergeFrom(value);
}
if (highlight_ != null) {
bitField0_ |= 0x00800000;
onChanged();
}
return this;
}
/**
*
* Specify how to highlight matched text
*
*
* .luceneserver.Highlight highlight = 24;
*/
public Builder clearHighlight() {
bitField0_ = (bitField0_ & ~0x00800000);
highlight_ = null;
if (highlightBuilder_ != null) {
highlightBuilder_.dispose();
highlightBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Specify how to highlight matched text
*
*
* .luceneserver.Highlight highlight = 24;
*/
public com.yelp.nrtsearch.server.grpc.Highlight.Builder getHighlightBuilder() {
bitField0_ |= 0x00800000;
onChanged();
return getHighlightFieldBuilder().getBuilder();
}
/**
*
* Specify how to highlight matched text
*
*
* .luceneserver.Highlight highlight = 24;
*/
public com.yelp.nrtsearch.server.grpc.HighlightOrBuilder getHighlightOrBuilder() {
if (highlightBuilder_ != null) {
return highlightBuilder_.getMessageOrBuilder();
} else {
return highlight_ == null ?
com.yelp.nrtsearch.server.grpc.Highlight.getDefaultInstance() : highlight_;
}
}
/**
*
* Specify how to highlight matched text
*
*
* .luceneserver.Highlight highlight = 24;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.Highlight, com.yelp.nrtsearch.server.grpc.Highlight.Builder, com.yelp.nrtsearch.server.grpc.HighlightOrBuilder>
getHighlightFieldBuilder() {
if (highlightBuilder_ == null) {
highlightBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.Highlight, com.yelp.nrtsearch.server.grpc.Highlight.Builder, com.yelp.nrtsearch.server.grpc.HighlightOrBuilder>(
getHighlight(),
getParentForChildren(),
isClean());
highlight_ = null;
}
return highlightBuilder_;
}
private boolean explain_ ;
/**
*
* If Lucene explanation should be included in the response
*
*
* bool explain = 25;
* @return The explain.
*/
@java.lang.Override
public boolean getExplain() {
return explain_;
}
/**
*
* If Lucene explanation should be included in the response
*
*
* bool explain = 25;
* @param value The explain to set.
* @return This builder for chaining.
*/
public Builder setExplain(boolean value) {
explain_ = value;
bitField0_ |= 0x01000000;
onChanged();
return this;
}
/**
*
* If Lucene explanation should be included in the response
*
*
* bool explain = 25;
* @return This builder for chaining.
*/
public Builder clearExplain() {
bitField0_ = (bitField0_ & ~0x01000000);
explain_ = false;
onChanged();
return this;
}
private static final class InnerHitsConverter implements com.google.protobuf.MapFieldBuilder.Converter {
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.InnerHit build(com.yelp.nrtsearch.server.grpc.InnerHitOrBuilder val) {
if (val instanceof com.yelp.nrtsearch.server.grpc.InnerHit) { return (com.yelp.nrtsearch.server.grpc.InnerHit) val; }
return ((com.yelp.nrtsearch.server.grpc.InnerHit.Builder) val).build();
}
@java.lang.Override
public com.google.protobuf.MapEntry defaultEntry() {
return InnerHitsDefaultEntryHolder.defaultEntry;
}
};
private static final InnerHitsConverter innerHitsConverter = new InnerHitsConverter();
private com.google.protobuf.MapFieldBuilder<
java.lang.String, com.yelp.nrtsearch.server.grpc.InnerHitOrBuilder, com.yelp.nrtsearch.server.grpc.InnerHit, com.yelp.nrtsearch.server.grpc.InnerHit.Builder> innerHits_;
private com.google.protobuf.MapFieldBuilder
internalGetInnerHits() {
if (innerHits_ == null) {
return new com.google.protobuf.MapFieldBuilder<>(innerHitsConverter);
}
return innerHits_;
}
private com.google.protobuf.MapFieldBuilder
internalGetMutableInnerHits() {
if (innerHits_ == null) {
innerHits_ = new com.google.protobuf.MapFieldBuilder<>(innerHitsConverter);
}
bitField0_ |= 0x02000000;
onChanged();
return innerHits_;
}
public int getInnerHitsCount() {
return internalGetInnerHits().ensureBuilderMap().size();
}
/**
*
* Search nested object fields for each hit
*
*
* map<string, .luceneserver.InnerHit> inner_hits = 26;
*/
@java.lang.Override
public boolean containsInnerHits(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetInnerHits().ensureBuilderMap().containsKey(key);
}
/**
* Use {@link #getInnerHitsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getInnerHits() {
return getInnerHitsMap();
}
/**
*
* Search nested object fields for each hit
*
*
* map<string, .luceneserver.InnerHit> inner_hits = 26;
*/
@java.lang.Override
public java.util.Map getInnerHitsMap() {
return internalGetInnerHits().getImmutableMap();
}
/**
*
* Search nested object fields for each hit
*
*
* map<string, .luceneserver.InnerHit> inner_hits = 26;
*/
@java.lang.Override
public /* nullable */
com.yelp.nrtsearch.server.grpc.InnerHit getInnerHitsOrDefault(
java.lang.String key,
/* nullable */
com.yelp.nrtsearch.server.grpc.InnerHit defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map = internalGetMutableInnerHits().ensureBuilderMap();
return map.containsKey(key) ? innerHitsConverter.build(map.get(key)) : defaultValue;
}
/**
*
* Search nested object fields for each hit
*
*
* map<string, .luceneserver.InnerHit> inner_hits = 26;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.InnerHit getInnerHitsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map = internalGetMutableInnerHits().ensureBuilderMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return innerHitsConverter.build(map.get(key));
}
public Builder clearInnerHits() {
bitField0_ = (bitField0_ & ~0x02000000);
internalGetMutableInnerHits().clear();
return this;
}
/**
*
* Search nested object fields for each hit
*
*
* map<string, .luceneserver.InnerHit> inner_hits = 26;
*/
public Builder removeInnerHits(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableInnerHits().ensureBuilderMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableInnerHits() {
bitField0_ |= 0x02000000;
return internalGetMutableInnerHits().ensureMessageMap();
}
/**
*
* Search nested object fields for each hit
*
*
* map<string, .luceneserver.InnerHit> inner_hits = 26;
*/
public Builder putInnerHits(
java.lang.String key,
com.yelp.nrtsearch.server.grpc.InnerHit value) {
if (key == null) { throw new NullPointerException("map key"); }
if (value == null) { throw new NullPointerException("map value"); }
internalGetMutableInnerHits().ensureBuilderMap()
.put(key, value);
bitField0_ |= 0x02000000;
return this;
}
/**
*
* Search nested object fields for each hit
*
*
* map<string, .luceneserver.InnerHit> inner_hits = 26;
*/
public Builder putAllInnerHits(
java.util.Map values) {
for (java.util.Map.Entry e : values.entrySet()) {
if (e.getKey() == null || e.getValue() == null) {
throw new NullPointerException();
}
}
internalGetMutableInnerHits().ensureBuilderMap()
.putAll(values);
bitField0_ |= 0x02000000;
return this;
}
/**
*
* Search nested object fields for each hit
*
*
* map<string, .luceneserver.InnerHit> inner_hits = 26;
*/
public com.yelp.nrtsearch.server.grpc.InnerHit.Builder putInnerHitsBuilderIfAbsent(
java.lang.String key) {
java.util.Map builderMap = internalGetMutableInnerHits().ensureBuilderMap();
com.yelp.nrtsearch.server.grpc.InnerHitOrBuilder entry = builderMap.get(key);
if (entry == null) {
entry = com.yelp.nrtsearch.server.grpc.InnerHit.newBuilder();
builderMap.put(key, entry);
}
if (entry instanceof com.yelp.nrtsearch.server.grpc.InnerHit) {
entry = ((com.yelp.nrtsearch.server.grpc.InnerHit) entry).toBuilder();
builderMap.put(key, entry);
}
return (com.yelp.nrtsearch.server.grpc.InnerHit.Builder) entry;
}
private java.util.List runtimeFields_ =
java.util.Collections.emptyList();
private void ensureRuntimeFieldsIsMutable() {
if (!((bitField0_ & 0x04000000) != 0)) {
runtimeFields_ = new java.util.ArrayList(runtimeFields_);
bitField0_ |= 0x04000000;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.RuntimeField, com.yelp.nrtsearch.server.grpc.RuntimeField.Builder, com.yelp.nrtsearch.server.grpc.RuntimeFieldOrBuilder> runtimeFieldsBuilder_;
/**
*
* Defines runtime fields for this query
*
*
* repeated .luceneserver.RuntimeField runtimeFields = 27;
*/
public java.util.List getRuntimeFieldsList() {
if (runtimeFieldsBuilder_ == null) {
return java.util.Collections.unmodifiableList(runtimeFields_);
} else {
return runtimeFieldsBuilder_.getMessageList();
}
}
/**
*
* Defines runtime fields for this query
*
*
* repeated .luceneserver.RuntimeField runtimeFields = 27;
*/
public int getRuntimeFieldsCount() {
if (runtimeFieldsBuilder_ == null) {
return runtimeFields_.size();
} else {
return runtimeFieldsBuilder_.getCount();
}
}
/**
*
* Defines runtime fields for this query
*
*
* repeated .luceneserver.RuntimeField runtimeFields = 27;
*/
public com.yelp.nrtsearch.server.grpc.RuntimeField getRuntimeFields(int index) {
if (runtimeFieldsBuilder_ == null) {
return runtimeFields_.get(index);
} else {
return runtimeFieldsBuilder_.getMessage(index);
}
}
/**
*
* Defines runtime fields for this query
*
*
* repeated .luceneserver.RuntimeField runtimeFields = 27;
*/
public Builder setRuntimeFields(
int index, com.yelp.nrtsearch.server.grpc.RuntimeField value) {
if (runtimeFieldsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRuntimeFieldsIsMutable();
runtimeFields_.set(index, value);
onChanged();
} else {
runtimeFieldsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Defines runtime fields for this query
*
*
* repeated .luceneserver.RuntimeField runtimeFields = 27;
*/
public Builder setRuntimeFields(
int index, com.yelp.nrtsearch.server.grpc.RuntimeField.Builder builderForValue) {
if (runtimeFieldsBuilder_ == null) {
ensureRuntimeFieldsIsMutable();
runtimeFields_.set(index, builderForValue.build());
onChanged();
} else {
runtimeFieldsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Defines runtime fields for this query
*
*
* repeated .luceneserver.RuntimeField runtimeFields = 27;
*/
public Builder addRuntimeFields(com.yelp.nrtsearch.server.grpc.RuntimeField value) {
if (runtimeFieldsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRuntimeFieldsIsMutable();
runtimeFields_.add(value);
onChanged();
} else {
runtimeFieldsBuilder_.addMessage(value);
}
return this;
}
/**
*
* Defines runtime fields for this query
*
*
* repeated .luceneserver.RuntimeField runtimeFields = 27;
*/
public Builder addRuntimeFields(
int index, com.yelp.nrtsearch.server.grpc.RuntimeField value) {
if (runtimeFieldsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureRuntimeFieldsIsMutable();
runtimeFields_.add(index, value);
onChanged();
} else {
runtimeFieldsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Defines runtime fields for this query
*
*
* repeated .luceneserver.RuntimeField runtimeFields = 27;
*/
public Builder addRuntimeFields(
com.yelp.nrtsearch.server.grpc.RuntimeField.Builder builderForValue) {
if (runtimeFieldsBuilder_ == null) {
ensureRuntimeFieldsIsMutable();
runtimeFields_.add(builderForValue.build());
onChanged();
} else {
runtimeFieldsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Defines runtime fields for this query
*
*
* repeated .luceneserver.RuntimeField runtimeFields = 27;
*/
public Builder addRuntimeFields(
int index, com.yelp.nrtsearch.server.grpc.RuntimeField.Builder builderForValue) {
if (runtimeFieldsBuilder_ == null) {
ensureRuntimeFieldsIsMutable();
runtimeFields_.add(index, builderForValue.build());
onChanged();
} else {
runtimeFieldsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Defines runtime fields for this query
*
*
* repeated .luceneserver.RuntimeField runtimeFields = 27;
*/
public Builder addAllRuntimeFields(
java.lang.Iterable extends com.yelp.nrtsearch.server.grpc.RuntimeField> values) {
if (runtimeFieldsBuilder_ == null) {
ensureRuntimeFieldsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, runtimeFields_);
onChanged();
} else {
runtimeFieldsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Defines runtime fields for this query
*
*
* repeated .luceneserver.RuntimeField runtimeFields = 27;
*/
public Builder clearRuntimeFields() {
if (runtimeFieldsBuilder_ == null) {
runtimeFields_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x04000000);
onChanged();
} else {
runtimeFieldsBuilder_.clear();
}
return this;
}
/**
*
* Defines runtime fields for this query
*
*
* repeated .luceneserver.RuntimeField runtimeFields = 27;
*/
public Builder removeRuntimeFields(int index) {
if (runtimeFieldsBuilder_ == null) {
ensureRuntimeFieldsIsMutable();
runtimeFields_.remove(index);
onChanged();
} else {
runtimeFieldsBuilder_.remove(index);
}
return this;
}
/**
*
* Defines runtime fields for this query
*
*
* repeated .luceneserver.RuntimeField runtimeFields = 27;
*/
public com.yelp.nrtsearch.server.grpc.RuntimeField.Builder getRuntimeFieldsBuilder(
int index) {
return getRuntimeFieldsFieldBuilder().getBuilder(index);
}
/**
*
* Defines runtime fields for this query
*
*
* repeated .luceneserver.RuntimeField runtimeFields = 27;
*/
public com.yelp.nrtsearch.server.grpc.RuntimeFieldOrBuilder getRuntimeFieldsOrBuilder(
int index) {
if (runtimeFieldsBuilder_ == null) {
return runtimeFields_.get(index); } else {
return runtimeFieldsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Defines runtime fields for this query
*
*
* repeated .luceneserver.RuntimeField runtimeFields = 27;
*/
public java.util.List extends com.yelp.nrtsearch.server.grpc.RuntimeFieldOrBuilder>
getRuntimeFieldsOrBuilderList() {
if (runtimeFieldsBuilder_ != null) {
return runtimeFieldsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(runtimeFields_);
}
}
/**
*
* Defines runtime fields for this query
*
*
* repeated .luceneserver.RuntimeField runtimeFields = 27;
*/
public com.yelp.nrtsearch.server.grpc.RuntimeField.Builder addRuntimeFieldsBuilder() {
return getRuntimeFieldsFieldBuilder().addBuilder(
com.yelp.nrtsearch.server.grpc.RuntimeField.getDefaultInstance());
}
/**
*
* Defines runtime fields for this query
*
*
* repeated .luceneserver.RuntimeField runtimeFields = 27;
*/
public com.yelp.nrtsearch.server.grpc.RuntimeField.Builder addRuntimeFieldsBuilder(
int index) {
return getRuntimeFieldsFieldBuilder().addBuilder(
index, com.yelp.nrtsearch.server.grpc.RuntimeField.getDefaultInstance());
}
/**
*
* Defines runtime fields for this query
*
*
* repeated .luceneserver.RuntimeField runtimeFields = 27;
*/
public java.util.List
getRuntimeFieldsBuilderList() {
return getRuntimeFieldsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.RuntimeField, com.yelp.nrtsearch.server.grpc.RuntimeField.Builder, com.yelp.nrtsearch.server.grpc.RuntimeFieldOrBuilder>
getRuntimeFieldsFieldBuilder() {
if (runtimeFieldsBuilder_ == null) {
runtimeFieldsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.RuntimeField, com.yelp.nrtsearch.server.grpc.RuntimeField.Builder, com.yelp.nrtsearch.server.grpc.RuntimeFieldOrBuilder>(
runtimeFields_,
((bitField0_ & 0x04000000) != 0),
getParentForChildren(),
isClean());
runtimeFields_ = null;
}
return runtimeFieldsBuilder_;
}
private int terminateAfterMaxRecallCount_ ;
/**
*
*Stop document collection in search phase after this many recalled documents, after terminateAfter docs will be counted but not scored upto terminateAfterMaxRecallCount.
*
*
* int32 terminateAfterMaxRecallCount = 28;
* @return The terminateAfterMaxRecallCount.
*/
@java.lang.Override
public int getTerminateAfterMaxRecallCount() {
return terminateAfterMaxRecallCount_;
}
/**
*
*Stop document collection in search phase after this many recalled documents, after terminateAfter docs will be counted but not scored upto terminateAfterMaxRecallCount.
*
*
* int32 terminateAfterMaxRecallCount = 28;
* @param value The terminateAfterMaxRecallCount to set.
* @return This builder for chaining.
*/
public Builder setTerminateAfterMaxRecallCount(int value) {
terminateAfterMaxRecallCount_ = value;
bitField0_ |= 0x08000000;
onChanged();
return this;
}
/**
*
*Stop document collection in search phase after this many recalled documents, after terminateAfter docs will be counted but not scored upto terminateAfterMaxRecallCount.
*
*
* int32 terminateAfterMaxRecallCount = 28;
* @return This builder for chaining.
*/
public Builder clearTerminateAfterMaxRecallCount() {
bitField0_ = (bitField0_ & ~0x08000000);
terminateAfterMaxRecallCount_ = 0;
onChanged();
return this;
}
private com.yelp.nrtsearch.server.grpc.LoggingHits loggingHits_;
private com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.LoggingHits, com.yelp.nrtsearch.server.grpc.LoggingHits.Builder, com.yelp.nrtsearch.server.grpc.LoggingHitsOrBuilder> loggingHitsBuilder_;
/**
*
* Any custom logging that should log hits after ranking
*
*
* .luceneserver.LoggingHits loggingHits = 29;
* @return Whether the loggingHits field is set.
*/
public boolean hasLoggingHits() {
return ((bitField0_ & 0x10000000) != 0);
}
/**
*
* Any custom logging that should log hits after ranking
*
*
* .luceneserver.LoggingHits loggingHits = 29;
* @return The loggingHits.
*/
public com.yelp.nrtsearch.server.grpc.LoggingHits getLoggingHits() {
if (loggingHitsBuilder_ == null) {
return loggingHits_ == null ? com.yelp.nrtsearch.server.grpc.LoggingHits.getDefaultInstance() : loggingHits_;
} else {
return loggingHitsBuilder_.getMessage();
}
}
/**
*
* Any custom logging that should log hits after ranking
*
*
* .luceneserver.LoggingHits loggingHits = 29;
*/
public Builder setLoggingHits(com.yelp.nrtsearch.server.grpc.LoggingHits value) {
if (loggingHitsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
loggingHits_ = value;
} else {
loggingHitsBuilder_.setMessage(value);
}
bitField0_ |= 0x10000000;
onChanged();
return this;
}
/**
*
* Any custom logging that should log hits after ranking
*
*
* .luceneserver.LoggingHits loggingHits = 29;
*/
public Builder setLoggingHits(
com.yelp.nrtsearch.server.grpc.LoggingHits.Builder builderForValue) {
if (loggingHitsBuilder_ == null) {
loggingHits_ = builderForValue.build();
} else {
loggingHitsBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x10000000;
onChanged();
return this;
}
/**
*
* Any custom logging that should log hits after ranking
*
*
* .luceneserver.LoggingHits loggingHits = 29;
*/
public Builder mergeLoggingHits(com.yelp.nrtsearch.server.grpc.LoggingHits value) {
if (loggingHitsBuilder_ == null) {
if (((bitField0_ & 0x10000000) != 0) &&
loggingHits_ != null &&
loggingHits_ != com.yelp.nrtsearch.server.grpc.LoggingHits.getDefaultInstance()) {
getLoggingHitsBuilder().mergeFrom(value);
} else {
loggingHits_ = value;
}
} else {
loggingHitsBuilder_.mergeFrom(value);
}
if (loggingHits_ != null) {
bitField0_ |= 0x10000000;
onChanged();
}
return this;
}
/**
*
* Any custom logging that should log hits after ranking
*
*
* .luceneserver.LoggingHits loggingHits = 29;
*/
public Builder clearLoggingHits() {
bitField0_ = (bitField0_ & ~0x10000000);
loggingHits_ = null;
if (loggingHitsBuilder_ != null) {
loggingHitsBuilder_.dispose();
loggingHitsBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Any custom logging that should log hits after ranking
*
*
* .luceneserver.LoggingHits loggingHits = 29;
*/
public com.yelp.nrtsearch.server.grpc.LoggingHits.Builder getLoggingHitsBuilder() {
bitField0_ |= 0x10000000;
onChanged();
return getLoggingHitsFieldBuilder().getBuilder();
}
/**
*
* Any custom logging that should log hits after ranking
*
*
* .luceneserver.LoggingHits loggingHits = 29;
*/
public com.yelp.nrtsearch.server.grpc.LoggingHitsOrBuilder getLoggingHitsOrBuilder() {
if (loggingHitsBuilder_ != null) {
return loggingHitsBuilder_.getMessageOrBuilder();
} else {
return loggingHits_ == null ?
com.yelp.nrtsearch.server.grpc.LoggingHits.getDefaultInstance() : loggingHits_;
}
}
/**
*
* Any custom logging that should log hits after ranking
*
*
* .luceneserver.LoggingHits loggingHits = 29;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.LoggingHits, com.yelp.nrtsearch.server.grpc.LoggingHits.Builder, com.yelp.nrtsearch.server.grpc.LoggingHitsOrBuilder>
getLoggingHitsFieldBuilder() {
if (loggingHitsBuilder_ == null) {
loggingHitsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.LoggingHits, com.yelp.nrtsearch.server.grpc.LoggingHits.Builder, com.yelp.nrtsearch.server.grpc.LoggingHitsOrBuilder>(
getLoggingHits(),
getParentForChildren(),
isClean());
loggingHits_ = null;
}
return loggingHitsBuilder_;
}
private com.yelp.nrtsearch.server.grpc.LastHitInfo searchAfter_;
private com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.LastHitInfo, com.yelp.nrtsearch.server.grpc.LastHitInfo.Builder, com.yelp.nrtsearch.server.grpc.LastHitInfoOrBuilder> searchAfterBuilder_;
/**
*
* Keeps tracks of last hit for search after
*
*
* .luceneserver.LastHitInfo searchAfter = 30;
* @return Whether the searchAfter field is set.
*/
public boolean hasSearchAfter() {
return ((bitField0_ & 0x20000000) != 0);
}
/**
*
* Keeps tracks of last hit for search after
*
*
* .luceneserver.LastHitInfo searchAfter = 30;
* @return The searchAfter.
*/
public com.yelp.nrtsearch.server.grpc.LastHitInfo getSearchAfter() {
if (searchAfterBuilder_ == null) {
return searchAfter_ == null ? com.yelp.nrtsearch.server.grpc.LastHitInfo.getDefaultInstance() : searchAfter_;
} else {
return searchAfterBuilder_.getMessage();
}
}
/**
*
* Keeps tracks of last hit for search after
*
*
* .luceneserver.LastHitInfo searchAfter = 30;
*/
public Builder setSearchAfter(com.yelp.nrtsearch.server.grpc.LastHitInfo value) {
if (searchAfterBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
searchAfter_ = value;
} else {
searchAfterBuilder_.setMessage(value);
}
bitField0_ |= 0x20000000;
onChanged();
return this;
}
/**
*
* Keeps tracks of last hit for search after
*
*
* .luceneserver.LastHitInfo searchAfter = 30;
*/
public Builder setSearchAfter(
com.yelp.nrtsearch.server.grpc.LastHitInfo.Builder builderForValue) {
if (searchAfterBuilder_ == null) {
searchAfter_ = builderForValue.build();
} else {
searchAfterBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x20000000;
onChanged();
return this;
}
/**
*
* Keeps tracks of last hit for search after
*
*
* .luceneserver.LastHitInfo searchAfter = 30;
*/
public Builder mergeSearchAfter(com.yelp.nrtsearch.server.grpc.LastHitInfo value) {
if (searchAfterBuilder_ == null) {
if (((bitField0_ & 0x20000000) != 0) &&
searchAfter_ != null &&
searchAfter_ != com.yelp.nrtsearch.server.grpc.LastHitInfo.getDefaultInstance()) {
getSearchAfterBuilder().mergeFrom(value);
} else {
searchAfter_ = value;
}
} else {
searchAfterBuilder_.mergeFrom(value);
}
if (searchAfter_ != null) {
bitField0_ |= 0x20000000;
onChanged();
}
return this;
}
/**
*
* Keeps tracks of last hit for search after
*
*
* .luceneserver.LastHitInfo searchAfter = 30;
*/
public Builder clearSearchAfter() {
bitField0_ = (bitField0_ & ~0x20000000);
searchAfter_ = null;
if (searchAfterBuilder_ != null) {
searchAfterBuilder_.dispose();
searchAfterBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Keeps tracks of last hit for search after
*
*
* .luceneserver.LastHitInfo searchAfter = 30;
*/
public com.yelp.nrtsearch.server.grpc.LastHitInfo.Builder getSearchAfterBuilder() {
bitField0_ |= 0x20000000;
onChanged();
return getSearchAfterFieldBuilder().getBuilder();
}
/**
*
* Keeps tracks of last hit for search after
*
*
* .luceneserver.LastHitInfo searchAfter = 30;
*/
public com.yelp.nrtsearch.server.grpc.LastHitInfoOrBuilder getSearchAfterOrBuilder() {
if (searchAfterBuilder_ != null) {
return searchAfterBuilder_.getMessageOrBuilder();
} else {
return searchAfter_ == null ?
com.yelp.nrtsearch.server.grpc.LastHitInfo.getDefaultInstance() : searchAfter_;
}
}
/**
*
* Keeps tracks of last hit for search after
*
*
* .luceneserver.LastHitInfo searchAfter = 30;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.LastHitInfo, com.yelp.nrtsearch.server.grpc.LastHitInfo.Builder, com.yelp.nrtsearch.server.grpc.LastHitInfoOrBuilder>
getSearchAfterFieldBuilder() {
if (searchAfterBuilder_ == null) {
searchAfterBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.LastHitInfo, com.yelp.nrtsearch.server.grpc.LastHitInfo.Builder, com.yelp.nrtsearch.server.grpc.LastHitInfoOrBuilder>(
getSearchAfter(),
getParentForChildren(),
isClean());
searchAfter_ = null;
}
return searchAfterBuilder_;
}
private java.util.List knn_ =
java.util.Collections.emptyList();
private void ensureKnnIsMutable() {
if (!((bitField0_ & 0x40000000) != 0)) {
knn_ = new java.util.ArrayList(knn_);
bitField0_ |= 0x40000000;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.KnnQuery, com.yelp.nrtsearch.server.grpc.KnnQuery.Builder, com.yelp.nrtsearch.server.grpc.KnnQueryOrBuilder> knnBuilder_;
/**
*
* Request kNN vector search queries, results will be combined with the standard query (if provided) using the boolean query SHOULD logic
*
*
* repeated .luceneserver.KnnQuery knn = 31;
*/
public java.util.List getKnnList() {
if (knnBuilder_ == null) {
return java.util.Collections.unmodifiableList(knn_);
} else {
return knnBuilder_.getMessageList();
}
}
/**
*
* Request kNN vector search queries, results will be combined with the standard query (if provided) using the boolean query SHOULD logic
*
*
* repeated .luceneserver.KnnQuery knn = 31;
*/
public int getKnnCount() {
if (knnBuilder_ == null) {
return knn_.size();
} else {
return knnBuilder_.getCount();
}
}
/**
*
* Request kNN vector search queries, results will be combined with the standard query (if provided) using the boolean query SHOULD logic
*
*
* repeated .luceneserver.KnnQuery knn = 31;
*/
public com.yelp.nrtsearch.server.grpc.KnnQuery getKnn(int index) {
if (knnBuilder_ == null) {
return knn_.get(index);
} else {
return knnBuilder_.getMessage(index);
}
}
/**
*
* Request kNN vector search queries, results will be combined with the standard query (if provided) using the boolean query SHOULD logic
*
*
* repeated .luceneserver.KnnQuery knn = 31;
*/
public Builder setKnn(
int index, com.yelp.nrtsearch.server.grpc.KnnQuery value) {
if (knnBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureKnnIsMutable();
knn_.set(index, value);
onChanged();
} else {
knnBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Request kNN vector search queries, results will be combined with the standard query (if provided) using the boolean query SHOULD logic
*
*
* repeated .luceneserver.KnnQuery knn = 31;
*/
public Builder setKnn(
int index, com.yelp.nrtsearch.server.grpc.KnnQuery.Builder builderForValue) {
if (knnBuilder_ == null) {
ensureKnnIsMutable();
knn_.set(index, builderForValue.build());
onChanged();
} else {
knnBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Request kNN vector search queries, results will be combined with the standard query (if provided) using the boolean query SHOULD logic
*
*
* repeated .luceneserver.KnnQuery knn = 31;
*/
public Builder addKnn(com.yelp.nrtsearch.server.grpc.KnnQuery value) {
if (knnBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureKnnIsMutable();
knn_.add(value);
onChanged();
} else {
knnBuilder_.addMessage(value);
}
return this;
}
/**
*
* Request kNN vector search queries, results will be combined with the standard query (if provided) using the boolean query SHOULD logic
*
*
* repeated .luceneserver.KnnQuery knn = 31;
*/
public Builder addKnn(
int index, com.yelp.nrtsearch.server.grpc.KnnQuery value) {
if (knnBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureKnnIsMutable();
knn_.add(index, value);
onChanged();
} else {
knnBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Request kNN vector search queries, results will be combined with the standard query (if provided) using the boolean query SHOULD logic
*
*
* repeated .luceneserver.KnnQuery knn = 31;
*/
public Builder addKnn(
com.yelp.nrtsearch.server.grpc.KnnQuery.Builder builderForValue) {
if (knnBuilder_ == null) {
ensureKnnIsMutable();
knn_.add(builderForValue.build());
onChanged();
} else {
knnBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Request kNN vector search queries, results will be combined with the standard query (if provided) using the boolean query SHOULD logic
*
*
* repeated .luceneserver.KnnQuery knn = 31;
*/
public Builder addKnn(
int index, com.yelp.nrtsearch.server.grpc.KnnQuery.Builder builderForValue) {
if (knnBuilder_ == null) {
ensureKnnIsMutable();
knn_.add(index, builderForValue.build());
onChanged();
} else {
knnBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Request kNN vector search queries, results will be combined with the standard query (if provided) using the boolean query SHOULD logic
*
*
* repeated .luceneserver.KnnQuery knn = 31;
*/
public Builder addAllKnn(
java.lang.Iterable extends com.yelp.nrtsearch.server.grpc.KnnQuery> values) {
if (knnBuilder_ == null) {
ensureKnnIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, knn_);
onChanged();
} else {
knnBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Request kNN vector search queries, results will be combined with the standard query (if provided) using the boolean query SHOULD logic
*
*
* repeated .luceneserver.KnnQuery knn = 31;
*/
public Builder clearKnn() {
if (knnBuilder_ == null) {
knn_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x40000000);
onChanged();
} else {
knnBuilder_.clear();
}
return this;
}
/**
*
* Request kNN vector search queries, results will be combined with the standard query (if provided) using the boolean query SHOULD logic
*
*
* repeated .luceneserver.KnnQuery knn = 31;
*/
public Builder removeKnn(int index) {
if (knnBuilder_ == null) {
ensureKnnIsMutable();
knn_.remove(index);
onChanged();
} else {
knnBuilder_.remove(index);
}
return this;
}
/**
*
* Request kNN vector search queries, results will be combined with the standard query (if provided) using the boolean query SHOULD logic
*
*
* repeated .luceneserver.KnnQuery knn = 31;
*/
public com.yelp.nrtsearch.server.grpc.KnnQuery.Builder getKnnBuilder(
int index) {
return getKnnFieldBuilder().getBuilder(index);
}
/**
*
* Request kNN vector search queries, results will be combined with the standard query (if provided) using the boolean query SHOULD logic
*
*
* repeated .luceneserver.KnnQuery knn = 31;
*/
public com.yelp.nrtsearch.server.grpc.KnnQueryOrBuilder getKnnOrBuilder(
int index) {
if (knnBuilder_ == null) {
return knn_.get(index); } else {
return knnBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Request kNN vector search queries, results will be combined with the standard query (if provided) using the boolean query SHOULD logic
*
*
* repeated .luceneserver.KnnQuery knn = 31;
*/
public java.util.List extends com.yelp.nrtsearch.server.grpc.KnnQueryOrBuilder>
getKnnOrBuilderList() {
if (knnBuilder_ != null) {
return knnBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(knn_);
}
}
/**
*
* Request kNN vector search queries, results will be combined with the standard query (if provided) using the boolean query SHOULD logic
*
*
* repeated .luceneserver.KnnQuery knn = 31;
*/
public com.yelp.nrtsearch.server.grpc.KnnQuery.Builder addKnnBuilder() {
return getKnnFieldBuilder().addBuilder(
com.yelp.nrtsearch.server.grpc.KnnQuery.getDefaultInstance());
}
/**
*
* Request kNN vector search queries, results will be combined with the standard query (if provided) using the boolean query SHOULD logic
*
*
* repeated .luceneserver.KnnQuery knn = 31;
*/
public com.yelp.nrtsearch.server.grpc.KnnQuery.Builder addKnnBuilder(
int index) {
return getKnnFieldBuilder().addBuilder(
index, com.yelp.nrtsearch.server.grpc.KnnQuery.getDefaultInstance());
}
/**
*
* Request kNN vector search queries, results will be combined with the standard query (if provided) using the boolean query SHOULD logic
*
*
* repeated .luceneserver.KnnQuery knn = 31;
*/
public java.util.List
getKnnBuilderList() {
return getKnnFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.KnnQuery, com.yelp.nrtsearch.server.grpc.KnnQuery.Builder, com.yelp.nrtsearch.server.grpc.KnnQueryOrBuilder>
getKnnFieldBuilder() {
if (knnBuilder_ == null) {
knnBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.KnnQuery, com.yelp.nrtsearch.server.grpc.KnnQuery.Builder, com.yelp.nrtsearch.server.grpc.KnnQueryOrBuilder>(
knn_,
((bitField0_ & 0x40000000) != 0),
getParentForChildren(),
isClean());
knn_ = null;
}
return knnBuilder_;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:luceneserver.SearchRequest)
}
// @@protoc_insertion_point(class_scope:luceneserver.SearchRequest)
private static final com.yelp.nrtsearch.server.grpc.SearchRequest DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.yelp.nrtsearch.server.grpc.SearchRequest();
}
public static com.yelp.nrtsearch.server.grpc.SearchRequest getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public SearchRequest parsePartialFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws com.google.protobuf.InvalidProtocolBufferException {
Builder builder = newBuilder();
try {
builder.mergeFrom(input, extensionRegistry);
} catch (com.google.protobuf.InvalidProtocolBufferException e) {
throw e.setUnfinishedMessage(builder.buildPartial());
} catch (com.google.protobuf.UninitializedMessageException e) {
throw e.asInvalidProtocolBufferException().setUnfinishedMessage(builder.buildPartial());
} catch (java.io.IOException e) {
throw new com.google.protobuf.InvalidProtocolBufferException(e)
.setUnfinishedMessage(builder.buildPartial());
}
return builder.buildPartial();
}
};
public static com.google.protobuf.Parser parser() {
return PARSER;
}
@java.lang.Override
public com.google.protobuf.Parser getParserForType() {
return PARSER;
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.SearchRequest getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}