com.yelp.nrtsearch.server.grpc.AnalyzingSuggester 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/suggest.proto
// Protobuf Java Version: 3.25.3
package com.yelp.nrtsearch.server.grpc;
/**
*
* Suggester that first analyzes the surface form, adds the analyzed form to a weighted FST, and then does the same thing at lookup time (see @lucene:suggest:org.apache.lucene.search.suggest.analyzing.AnalyzingSuggester
*
*
* Protobuf type {@code luceneserver.AnalyzingSuggester}
*/
public final class AnalyzingSuggester extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:luceneserver.AnalyzingSuggester)
AnalyzingSuggesterOrBuilder {
private static final long serialVersionUID = 0L;
// Use AnalyzingSuggester.newBuilder() to construct.
private AnalyzingSuggester(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private AnalyzingSuggester() {
analyzer_ = "";
indexAnalyzer_ = "";
queryAnalyzer_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new AnalyzingSuggester();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.yelp.nrtsearch.server.grpc.SuggestResponseProto.internal_static_luceneserver_AnalyzingSuggester_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.yelp.nrtsearch.server.grpc.SuggestResponseProto.internal_static_luceneserver_AnalyzingSuggester_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.yelp.nrtsearch.server.grpc.AnalyzingSuggester.class, com.yelp.nrtsearch.server.grpc.AnalyzingSuggester.Builder.class);
}
public static final int ANALYZER_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object analyzer_ = "";
/**
*
*Index and query analyzer
*
*
* string analyzer = 1;
* @return The analyzer.
*/
@java.lang.Override
public java.lang.String getAnalyzer() {
java.lang.Object ref = analyzer_;
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();
analyzer_ = s;
return s;
}
}
/**
*
*Index and query analyzer
*
*
* string analyzer = 1;
* @return The bytes for analyzer.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getAnalyzerBytes() {
java.lang.Object ref = analyzer_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
analyzer_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int INDEXANALYZER_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private volatile java.lang.Object indexAnalyzer_ = "";
/**
*
* Index Analyzer
*
*
* string indexAnalyzer = 2;
* @return The indexAnalyzer.
*/
@java.lang.Override
public java.lang.String getIndexAnalyzer() {
java.lang.Object ref = indexAnalyzer_;
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();
indexAnalyzer_ = s;
return s;
}
}
/**
*
* Index Analyzer
*
*
* string indexAnalyzer = 2;
* @return The bytes for indexAnalyzer.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getIndexAnalyzerBytes() {
java.lang.Object ref = indexAnalyzer_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
indexAnalyzer_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int QUERYANALYZER_FIELD_NUMBER = 3;
@SuppressWarnings("serial")
private volatile java.lang.Object queryAnalyzer_ = "";
/**
*
* Query Analyzer
*
*
* string queryAnalyzer = 3;
* @return The queryAnalyzer.
*/
@java.lang.Override
public java.lang.String getQueryAnalyzer() {
java.lang.Object ref = queryAnalyzer_;
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();
queryAnalyzer_ = s;
return s;
}
}
/**
*
* Query Analyzer
*
*
* string queryAnalyzer = 3;
* @return The bytes for queryAnalyzer.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getQueryAnalyzerBytes() {
java.lang.Object ref = queryAnalyzer_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
queryAnalyzer_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int MAXSURFACEFORMSPERANALYZEDFORM_FIELD_NUMBER = 4;
private int maxSurfaceFormsPerAnalyzedForm_ = 0;
/**
*
*Maximum number of surface forms to keep for a single analyzed form
*
*
* int32 maxSurfaceFormsPerAnalyzedForm = 4;
* @return The maxSurfaceFormsPerAnalyzedForm.
*/
@java.lang.Override
public int getMaxSurfaceFormsPerAnalyzedForm() {
return maxSurfaceFormsPerAnalyzedForm_;
}
public static final int MAXGRAPHEXPANSIONS_FIELD_NUMBER = 5;
private int maxGraphExpansions_ = 0;
/**
*
*Maximum number of graph paths to expand from the analyzed from
*
*
* int32 maxGraphExpansions = 5;
* @return The maxGraphExpansions.
*/
@java.lang.Override
public int getMaxGraphExpansions() {
return maxGraphExpansions_;
}
public static final int PRESERVESEP_FIELD_NUMBER = 6;
private boolean preserveSep_ = false;
/**
*
*True if token separators should be preserved when matching
*
*
* bool preserveSep = 6;
* @return The preserveSep.
*/
@java.lang.Override
public boolean getPreserveSep() {
return preserveSep_;
}
public static final int EXACTFIRST_FIELD_NUMBER = 7;
private boolean exactFirst_ = false;
/**
*
*True if the exact match should always be returned first regardless of score
*
*
* bool exactFirst = 7;
* @return The exactFirst.
*/
@java.lang.Override
public boolean getExactFirst() {
return exactFirst_;
}
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(analyzer_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, analyzer_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(indexAnalyzer_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, indexAnalyzer_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queryAnalyzer_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 3, queryAnalyzer_);
}
if (maxSurfaceFormsPerAnalyzedForm_ != 0) {
output.writeInt32(4, maxSurfaceFormsPerAnalyzedForm_);
}
if (maxGraphExpansions_ != 0) {
output.writeInt32(5, maxGraphExpansions_);
}
if (preserveSep_ != false) {
output.writeBool(6, preserveSep_);
}
if (exactFirst_ != false) {
output.writeBool(7, exactFirst_);
}
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(analyzer_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, analyzer_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(indexAnalyzer_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, indexAnalyzer_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(queryAnalyzer_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(3, queryAnalyzer_);
}
if (maxSurfaceFormsPerAnalyzedForm_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(4, maxSurfaceFormsPerAnalyzedForm_);
}
if (maxGraphExpansions_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(5, maxGraphExpansions_);
}
if (preserveSep_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(6, preserveSep_);
}
if (exactFirst_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(7, exactFirst_);
}
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.AnalyzingSuggester)) {
return super.equals(obj);
}
com.yelp.nrtsearch.server.grpc.AnalyzingSuggester other = (com.yelp.nrtsearch.server.grpc.AnalyzingSuggester) obj;
if (!getAnalyzer()
.equals(other.getAnalyzer())) return false;
if (!getIndexAnalyzer()
.equals(other.getIndexAnalyzer())) return false;
if (!getQueryAnalyzer()
.equals(other.getQueryAnalyzer())) return false;
if (getMaxSurfaceFormsPerAnalyzedForm()
!= other.getMaxSurfaceFormsPerAnalyzedForm()) return false;
if (getMaxGraphExpansions()
!= other.getMaxGraphExpansions()) return false;
if (getPreserveSep()
!= other.getPreserveSep()) return false;
if (getExactFirst()
!= other.getExactFirst()) return false;
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) + ANALYZER_FIELD_NUMBER;
hash = (53 * hash) + getAnalyzer().hashCode();
hash = (37 * hash) + INDEXANALYZER_FIELD_NUMBER;
hash = (53 * hash) + getIndexAnalyzer().hashCode();
hash = (37 * hash) + QUERYANALYZER_FIELD_NUMBER;
hash = (53 * hash) + getQueryAnalyzer().hashCode();
hash = (37 * hash) + MAXSURFACEFORMSPERANALYZEDFORM_FIELD_NUMBER;
hash = (53 * hash) + getMaxSurfaceFormsPerAnalyzedForm();
hash = (37 * hash) + MAXGRAPHEXPANSIONS_FIELD_NUMBER;
hash = (53 * hash) + getMaxGraphExpansions();
hash = (37 * hash) + PRESERVESEP_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getPreserveSep());
hash = (37 * hash) + EXACTFIRST_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getExactFirst());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.yelp.nrtsearch.server.grpc.AnalyzingSuggester parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.AnalyzingSuggester 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.AnalyzingSuggester parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.AnalyzingSuggester 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.AnalyzingSuggester parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.AnalyzingSuggester 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.AnalyzingSuggester parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.yelp.nrtsearch.server.grpc.AnalyzingSuggester 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.AnalyzingSuggester parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.yelp.nrtsearch.server.grpc.AnalyzingSuggester 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.AnalyzingSuggester 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.AnalyzingSuggester 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.AnalyzingSuggester 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;
}
/**
*
* Suggester that first analyzes the surface form, adds the analyzed form to a weighted FST, and then does the same thing at lookup time (see @lucene:suggest:org.apache.lucene.search.suggest.analyzing.AnalyzingSuggester
*
*
* Protobuf type {@code luceneserver.AnalyzingSuggester}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:luceneserver.AnalyzingSuggester)
com.yelp.nrtsearch.server.grpc.AnalyzingSuggesterOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.yelp.nrtsearch.server.grpc.SuggestResponseProto.internal_static_luceneserver_AnalyzingSuggester_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.yelp.nrtsearch.server.grpc.SuggestResponseProto.internal_static_luceneserver_AnalyzingSuggester_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.yelp.nrtsearch.server.grpc.AnalyzingSuggester.class, com.yelp.nrtsearch.server.grpc.AnalyzingSuggester.Builder.class);
}
// Construct using com.yelp.nrtsearch.server.grpc.AnalyzingSuggester.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
analyzer_ = "";
indexAnalyzer_ = "";
queryAnalyzer_ = "";
maxSurfaceFormsPerAnalyzedForm_ = 0;
maxGraphExpansions_ = 0;
preserveSep_ = false;
exactFirst_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.yelp.nrtsearch.server.grpc.SuggestResponseProto.internal_static_luceneserver_AnalyzingSuggester_descriptor;
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.AnalyzingSuggester getDefaultInstanceForType() {
return com.yelp.nrtsearch.server.grpc.AnalyzingSuggester.getDefaultInstance();
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.AnalyzingSuggester build() {
com.yelp.nrtsearch.server.grpc.AnalyzingSuggester result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.AnalyzingSuggester buildPartial() {
com.yelp.nrtsearch.server.grpc.AnalyzingSuggester result = new com.yelp.nrtsearch.server.grpc.AnalyzingSuggester(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.yelp.nrtsearch.server.grpc.AnalyzingSuggester result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.analyzer_ = analyzer_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.indexAnalyzer_ = indexAnalyzer_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.queryAnalyzer_ = queryAnalyzer_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.maxSurfaceFormsPerAnalyzedForm_ = maxSurfaceFormsPerAnalyzedForm_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.maxGraphExpansions_ = maxGraphExpansions_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.preserveSep_ = preserveSep_;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.exactFirst_ = exactFirst_;
}
}
@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.AnalyzingSuggester) {
return mergeFrom((com.yelp.nrtsearch.server.grpc.AnalyzingSuggester)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.yelp.nrtsearch.server.grpc.AnalyzingSuggester other) {
if (other == com.yelp.nrtsearch.server.grpc.AnalyzingSuggester.getDefaultInstance()) return this;
if (!other.getAnalyzer().isEmpty()) {
analyzer_ = other.analyzer_;
bitField0_ |= 0x00000001;
onChanged();
}
if (!other.getIndexAnalyzer().isEmpty()) {
indexAnalyzer_ = other.indexAnalyzer_;
bitField0_ |= 0x00000002;
onChanged();
}
if (!other.getQueryAnalyzer().isEmpty()) {
queryAnalyzer_ = other.queryAnalyzer_;
bitField0_ |= 0x00000004;
onChanged();
}
if (other.getMaxSurfaceFormsPerAnalyzedForm() != 0) {
setMaxSurfaceFormsPerAnalyzedForm(other.getMaxSurfaceFormsPerAnalyzedForm());
}
if (other.getMaxGraphExpansions() != 0) {
setMaxGraphExpansions(other.getMaxGraphExpansions());
}
if (other.getPreserveSep() != false) {
setPreserveSep(other.getPreserveSep());
}
if (other.getExactFirst() != false) {
setExactFirst(other.getExactFirst());
}
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: {
analyzer_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
indexAnalyzer_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
queryAnalyzer_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000004;
break;
} // case 26
case 32: {
maxSurfaceFormsPerAnalyzedForm_ = input.readInt32();
bitField0_ |= 0x00000008;
break;
} // case 32
case 40: {
maxGraphExpansions_ = input.readInt32();
bitField0_ |= 0x00000010;
break;
} // case 40
case 48: {
preserveSep_ = input.readBool();
bitField0_ |= 0x00000020;
break;
} // case 48
case 56: {
exactFirst_ = input.readBool();
bitField0_ |= 0x00000040;
break;
} // case 56
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 bitField0_;
private java.lang.Object analyzer_ = "";
/**
*
*Index and query analyzer
*
*
* string analyzer = 1;
* @return The analyzer.
*/
public java.lang.String getAnalyzer() {
java.lang.Object ref = analyzer_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
analyzer_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
*Index and query analyzer
*
*
* string analyzer = 1;
* @return The bytes for analyzer.
*/
public com.google.protobuf.ByteString
getAnalyzerBytes() {
java.lang.Object ref = analyzer_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
analyzer_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
*Index and query analyzer
*
*
* string analyzer = 1;
* @param value The analyzer to set.
* @return This builder for chaining.
*/
public Builder setAnalyzer(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
analyzer_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
*Index and query analyzer
*
*
* string analyzer = 1;
* @return This builder for chaining.
*/
public Builder clearAnalyzer() {
analyzer_ = getDefaultInstance().getAnalyzer();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
*Index and query analyzer
*
*
* string analyzer = 1;
* @param value The bytes for analyzer to set.
* @return This builder for chaining.
*/
public Builder setAnalyzerBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
analyzer_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private java.lang.Object indexAnalyzer_ = "";
/**
*
* Index Analyzer
*
*
* string indexAnalyzer = 2;
* @return The indexAnalyzer.
*/
public java.lang.String getIndexAnalyzer() {
java.lang.Object ref = indexAnalyzer_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
indexAnalyzer_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Index Analyzer
*
*
* string indexAnalyzer = 2;
* @return The bytes for indexAnalyzer.
*/
public com.google.protobuf.ByteString
getIndexAnalyzerBytes() {
java.lang.Object ref = indexAnalyzer_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
indexAnalyzer_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Index Analyzer
*
*
* string indexAnalyzer = 2;
* @param value The indexAnalyzer to set.
* @return This builder for chaining.
*/
public Builder setIndexAnalyzer(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
indexAnalyzer_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Index Analyzer
*
*
* string indexAnalyzer = 2;
* @return This builder for chaining.
*/
public Builder clearIndexAnalyzer() {
indexAnalyzer_ = getDefaultInstance().getIndexAnalyzer();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
return this;
}
/**
*
* Index Analyzer
*
*
* string indexAnalyzer = 2;
* @param value The bytes for indexAnalyzer to set.
* @return This builder for chaining.
*/
public Builder setIndexAnalyzerBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
indexAnalyzer_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
private java.lang.Object queryAnalyzer_ = "";
/**
*
* Query Analyzer
*
*
* string queryAnalyzer = 3;
* @return The queryAnalyzer.
*/
public java.lang.String getQueryAnalyzer() {
java.lang.Object ref = queryAnalyzer_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
queryAnalyzer_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Query Analyzer
*
*
* string queryAnalyzer = 3;
* @return The bytes for queryAnalyzer.
*/
public com.google.protobuf.ByteString
getQueryAnalyzerBytes() {
java.lang.Object ref = queryAnalyzer_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
queryAnalyzer_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Query Analyzer
*
*
* string queryAnalyzer = 3;
* @param value The queryAnalyzer to set.
* @return This builder for chaining.
*/
public Builder setQueryAnalyzer(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
queryAnalyzer_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Query Analyzer
*
*
* string queryAnalyzer = 3;
* @return This builder for chaining.
*/
public Builder clearQueryAnalyzer() {
queryAnalyzer_ = getDefaultInstance().getQueryAnalyzer();
bitField0_ = (bitField0_ & ~0x00000004);
onChanged();
return this;
}
/**
*
* Query Analyzer
*
*
* string queryAnalyzer = 3;
* @param value The bytes for queryAnalyzer to set.
* @return This builder for chaining.
*/
public Builder setQueryAnalyzerBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
queryAnalyzer_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
private int maxSurfaceFormsPerAnalyzedForm_ ;
/**
*
*Maximum number of surface forms to keep for a single analyzed form
*
*
* int32 maxSurfaceFormsPerAnalyzedForm = 4;
* @return The maxSurfaceFormsPerAnalyzedForm.
*/
@java.lang.Override
public int getMaxSurfaceFormsPerAnalyzedForm() {
return maxSurfaceFormsPerAnalyzedForm_;
}
/**
*
*Maximum number of surface forms to keep for a single analyzed form
*
*
* int32 maxSurfaceFormsPerAnalyzedForm = 4;
* @param value The maxSurfaceFormsPerAnalyzedForm to set.
* @return This builder for chaining.
*/
public Builder setMaxSurfaceFormsPerAnalyzedForm(int value) {
maxSurfaceFormsPerAnalyzedForm_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
*Maximum number of surface forms to keep for a single analyzed form
*
*
* int32 maxSurfaceFormsPerAnalyzedForm = 4;
* @return This builder for chaining.
*/
public Builder clearMaxSurfaceFormsPerAnalyzedForm() {
bitField0_ = (bitField0_ & ~0x00000008);
maxSurfaceFormsPerAnalyzedForm_ = 0;
onChanged();
return this;
}
private int maxGraphExpansions_ ;
/**
*
*Maximum number of graph paths to expand from the analyzed from
*
*
* int32 maxGraphExpansions = 5;
* @return The maxGraphExpansions.
*/
@java.lang.Override
public int getMaxGraphExpansions() {
return maxGraphExpansions_;
}
/**
*
*Maximum number of graph paths to expand from the analyzed from
*
*
* int32 maxGraphExpansions = 5;
* @param value The maxGraphExpansions to set.
* @return This builder for chaining.
*/
public Builder setMaxGraphExpansions(int value) {
maxGraphExpansions_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
*Maximum number of graph paths to expand from the analyzed from
*
*
* int32 maxGraphExpansions = 5;
* @return This builder for chaining.
*/
public Builder clearMaxGraphExpansions() {
bitField0_ = (bitField0_ & ~0x00000010);
maxGraphExpansions_ = 0;
onChanged();
return this;
}
private boolean preserveSep_ ;
/**
*
*True if token separators should be preserved when matching
*
*
* bool preserveSep = 6;
* @return The preserveSep.
*/
@java.lang.Override
public boolean getPreserveSep() {
return preserveSep_;
}
/**
*
*True if token separators should be preserved when matching
*
*
* bool preserveSep = 6;
* @param value The preserveSep to set.
* @return This builder for chaining.
*/
public Builder setPreserveSep(boolean value) {
preserveSep_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
*True if token separators should be preserved when matching
*
*
* bool preserveSep = 6;
* @return This builder for chaining.
*/
public Builder clearPreserveSep() {
bitField0_ = (bitField0_ & ~0x00000020);
preserveSep_ = false;
onChanged();
return this;
}
private boolean exactFirst_ ;
/**
*
*True if the exact match should always be returned first regardless of score
*
*
* bool exactFirst = 7;
* @return The exactFirst.
*/
@java.lang.Override
public boolean getExactFirst() {
return exactFirst_;
}
/**
*
*True if the exact match should always be returned first regardless of score
*
*
* bool exactFirst = 7;
* @param value The exactFirst to set.
* @return This builder for chaining.
*/
public Builder setExactFirst(boolean value) {
exactFirst_ = value;
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
*True if the exact match should always be returned first regardless of score
*
*
* bool exactFirst = 7;
* @return This builder for chaining.
*/
public Builder clearExactFirst() {
bitField0_ = (bitField0_ & ~0x00000040);
exactFirst_ = false;
onChanged();
return this;
}
@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.AnalyzingSuggester)
}
// @@protoc_insertion_point(class_scope:luceneserver.AnalyzingSuggester)
private static final com.yelp.nrtsearch.server.grpc.AnalyzingSuggester DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.yelp.nrtsearch.server.grpc.AnalyzingSuggester();
}
public static com.yelp.nrtsearch.server.grpc.AnalyzingSuggester getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public AnalyzingSuggester 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.AnalyzingSuggester getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}