All Downloads are FREE. Search and download functionalities are using the official Maven repository.

com.yelp.nrtsearch.server.grpc.FuzzySuggester Maven / Gradle / Ivy

There is a newer version: 1.0.0-beta.1
Show newest version
// 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;

/**
 * 
 * Implements a fuzzy AnalyzingSuggester (see @lucene:suggest:org.apache.lucene.search.suggest.analyzing.FuzzySuggester
 * 
* * Protobuf type {@code luceneserver.FuzzySuggester} */ public final class FuzzySuggester extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:luceneserver.FuzzySuggester) FuzzySuggesterOrBuilder { private static final long serialVersionUID = 0L; // Use FuzzySuggester.newBuilder() to construct. private FuzzySuggester(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private FuzzySuggester() { analyzer_ = ""; indexAnalyzer_ = ""; queryAnalyzer_ = ""; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new FuzzySuggester(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.yelp.nrtsearch.server.grpc.SuggestResponseProto.internal_static_luceneserver_FuzzySuggester_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.yelp.nrtsearch.server.grpc.SuggestResponseProto.internal_static_luceneserver_FuzzySuggester_fieldAccessorTable .ensureFieldAccessorsInitialized( com.yelp.nrtsearch.server.grpc.FuzzySuggester.class, com.yelp.nrtsearch.server.grpc.FuzzySuggester.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_; } public static final int MINFUZZYLENGTH_FIELD_NUMBER = 8; private int minFuzzyLength_ = 0; /** *
   *Minimum key length before edits are allowed,
   * 
* * int32 minFuzzyLength = 8; * @return The minFuzzyLength. */ @java.lang.Override public int getMinFuzzyLength() { return minFuzzyLength_; } public static final int NONFUZZYPREFIX_FIELD_NUMBER = 9; private int nonFuzzyPrefix_ = 0; /** *
   *Key prefix where edits are not allowed,
   * 
* * int32 nonFuzzyPrefix = 9; * @return The nonFuzzyPrefix. */ @java.lang.Override public int getNonFuzzyPrefix() { return nonFuzzyPrefix_; } public static final int MAXEDITS_FIELD_NUMBER = 10; private int maxEdits_ = 0; /** *
   *Maximum number of edits for fuzzy suggestions
   * 
* * int32 maxEdits = 10; * @return The maxEdits. */ @java.lang.Override public int getMaxEdits() { return maxEdits_; } public static final int TRANSPOSITIONS_FIELD_NUMBER = 11; private boolean transpositions_ = false; /** *
   *Whether transpositions are allowed
   * 
* * bool transpositions = 11; * @return The transpositions. */ @java.lang.Override public boolean getTranspositions() { return transpositions_; } public static final int UNICODEAWARE_FIELD_NUMBER = 12; private boolean unicodeAware_ = false; /** *
   *True if all edits are measured in unicode characters, not UTF-8 bytes
   * 
* * bool unicodeAware = 12; * @return The unicodeAware. */ @java.lang.Override public boolean getUnicodeAware() { return unicodeAware_; } 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_); } if (minFuzzyLength_ != 0) { output.writeInt32(8, minFuzzyLength_); } if (nonFuzzyPrefix_ != 0) { output.writeInt32(9, nonFuzzyPrefix_); } if (maxEdits_ != 0) { output.writeInt32(10, maxEdits_); } if (transpositions_ != false) { output.writeBool(11, transpositions_); } if (unicodeAware_ != false) { output.writeBool(12, unicodeAware_); } 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_); } if (minFuzzyLength_ != 0) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(8, minFuzzyLength_); } if (nonFuzzyPrefix_ != 0) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(9, nonFuzzyPrefix_); } if (maxEdits_ != 0) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(10, maxEdits_); } if (transpositions_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(11, transpositions_); } if (unicodeAware_ != false) { size += com.google.protobuf.CodedOutputStream .computeBoolSize(12, unicodeAware_); } 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.FuzzySuggester)) { return super.equals(obj); } com.yelp.nrtsearch.server.grpc.FuzzySuggester other = (com.yelp.nrtsearch.server.grpc.FuzzySuggester) 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 (getMinFuzzyLength() != other.getMinFuzzyLength()) return false; if (getNonFuzzyPrefix() != other.getNonFuzzyPrefix()) return false; if (getMaxEdits() != other.getMaxEdits()) return false; if (getTranspositions() != other.getTranspositions()) return false; if (getUnicodeAware() != other.getUnicodeAware()) 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 = (37 * hash) + MINFUZZYLENGTH_FIELD_NUMBER; hash = (53 * hash) + getMinFuzzyLength(); hash = (37 * hash) + NONFUZZYPREFIX_FIELD_NUMBER; hash = (53 * hash) + getNonFuzzyPrefix(); hash = (37 * hash) + MAXEDITS_FIELD_NUMBER; hash = (53 * hash) + getMaxEdits(); hash = (37 * hash) + TRANSPOSITIONS_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getTranspositions()); hash = (37 * hash) + UNICODEAWARE_FIELD_NUMBER; hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean( getUnicodeAware()); hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.yelp.nrtsearch.server.grpc.FuzzySuggester parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.yelp.nrtsearch.server.grpc.FuzzySuggester 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.FuzzySuggester parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.yelp.nrtsearch.server.grpc.FuzzySuggester 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.FuzzySuggester parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.yelp.nrtsearch.server.grpc.FuzzySuggester 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.FuzzySuggester parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.yelp.nrtsearch.server.grpc.FuzzySuggester 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.FuzzySuggester parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.yelp.nrtsearch.server.grpc.FuzzySuggester 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.FuzzySuggester 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.FuzzySuggester 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.FuzzySuggester 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; } /** *
   * Implements a fuzzy AnalyzingSuggester (see @lucene:suggest:org.apache.lucene.search.suggest.analyzing.FuzzySuggester
   * 
* * Protobuf type {@code luceneserver.FuzzySuggester} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:luceneserver.FuzzySuggester) com.yelp.nrtsearch.server.grpc.FuzzySuggesterOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.yelp.nrtsearch.server.grpc.SuggestResponseProto.internal_static_luceneserver_FuzzySuggester_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.yelp.nrtsearch.server.grpc.SuggestResponseProto.internal_static_luceneserver_FuzzySuggester_fieldAccessorTable .ensureFieldAccessorsInitialized( com.yelp.nrtsearch.server.grpc.FuzzySuggester.class, com.yelp.nrtsearch.server.grpc.FuzzySuggester.Builder.class); } // Construct using com.yelp.nrtsearch.server.grpc.FuzzySuggester.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; minFuzzyLength_ = 0; nonFuzzyPrefix_ = 0; maxEdits_ = 0; transpositions_ = false; unicodeAware_ = false; return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.yelp.nrtsearch.server.grpc.SuggestResponseProto.internal_static_luceneserver_FuzzySuggester_descriptor; } @java.lang.Override public com.yelp.nrtsearch.server.grpc.FuzzySuggester getDefaultInstanceForType() { return com.yelp.nrtsearch.server.grpc.FuzzySuggester.getDefaultInstance(); } @java.lang.Override public com.yelp.nrtsearch.server.grpc.FuzzySuggester build() { com.yelp.nrtsearch.server.grpc.FuzzySuggester result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.yelp.nrtsearch.server.grpc.FuzzySuggester buildPartial() { com.yelp.nrtsearch.server.grpc.FuzzySuggester result = new com.yelp.nrtsearch.server.grpc.FuzzySuggester(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(com.yelp.nrtsearch.server.grpc.FuzzySuggester 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_; } if (((from_bitField0_ & 0x00000080) != 0)) { result.minFuzzyLength_ = minFuzzyLength_; } if (((from_bitField0_ & 0x00000100) != 0)) { result.nonFuzzyPrefix_ = nonFuzzyPrefix_; } if (((from_bitField0_ & 0x00000200) != 0)) { result.maxEdits_ = maxEdits_; } if (((from_bitField0_ & 0x00000400) != 0)) { result.transpositions_ = transpositions_; } if (((from_bitField0_ & 0x00000800) != 0)) { result.unicodeAware_ = unicodeAware_; } } @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.FuzzySuggester) { return mergeFrom((com.yelp.nrtsearch.server.grpc.FuzzySuggester)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.yelp.nrtsearch.server.grpc.FuzzySuggester other) { if (other == com.yelp.nrtsearch.server.grpc.FuzzySuggester.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()); } if (other.getMinFuzzyLength() != 0) { setMinFuzzyLength(other.getMinFuzzyLength()); } if (other.getNonFuzzyPrefix() != 0) { setNonFuzzyPrefix(other.getNonFuzzyPrefix()); } if (other.getMaxEdits() != 0) { setMaxEdits(other.getMaxEdits()); } if (other.getTranspositions() != false) { setTranspositions(other.getTranspositions()); } if (other.getUnicodeAware() != false) { setUnicodeAware(other.getUnicodeAware()); } 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 case 64: { minFuzzyLength_ = input.readInt32(); bitField0_ |= 0x00000080; break; } // case 64 case 72: { nonFuzzyPrefix_ = input.readInt32(); bitField0_ |= 0x00000100; break; } // case 72 case 80: { maxEdits_ = input.readInt32(); bitField0_ |= 0x00000200; break; } // case 80 case 88: { transpositions_ = input.readBool(); bitField0_ |= 0x00000400; break; } // case 88 case 96: { unicodeAware_ = input.readBool(); bitField0_ |= 0x00000800; break; } // case 96 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; } private int minFuzzyLength_ ; /** *
     *Minimum key length before edits are allowed,
     * 
* * int32 minFuzzyLength = 8; * @return The minFuzzyLength. */ @java.lang.Override public int getMinFuzzyLength() { return minFuzzyLength_; } /** *
     *Minimum key length before edits are allowed,
     * 
* * int32 minFuzzyLength = 8; * @param value The minFuzzyLength to set. * @return This builder for chaining. */ public Builder setMinFuzzyLength(int value) { minFuzzyLength_ = value; bitField0_ |= 0x00000080; onChanged(); return this; } /** *
     *Minimum key length before edits are allowed,
     * 
* * int32 minFuzzyLength = 8; * @return This builder for chaining. */ public Builder clearMinFuzzyLength() { bitField0_ = (bitField0_ & ~0x00000080); minFuzzyLength_ = 0; onChanged(); return this; } private int nonFuzzyPrefix_ ; /** *
     *Key prefix where edits are not allowed,
     * 
* * int32 nonFuzzyPrefix = 9; * @return The nonFuzzyPrefix. */ @java.lang.Override public int getNonFuzzyPrefix() { return nonFuzzyPrefix_; } /** *
     *Key prefix where edits are not allowed,
     * 
* * int32 nonFuzzyPrefix = 9; * @param value The nonFuzzyPrefix to set. * @return This builder for chaining. */ public Builder setNonFuzzyPrefix(int value) { nonFuzzyPrefix_ = value; bitField0_ |= 0x00000100; onChanged(); return this; } /** *
     *Key prefix where edits are not allowed,
     * 
* * int32 nonFuzzyPrefix = 9; * @return This builder for chaining. */ public Builder clearNonFuzzyPrefix() { bitField0_ = (bitField0_ & ~0x00000100); nonFuzzyPrefix_ = 0; onChanged(); return this; } private int maxEdits_ ; /** *
     *Maximum number of edits for fuzzy suggestions
     * 
* * int32 maxEdits = 10; * @return The maxEdits. */ @java.lang.Override public int getMaxEdits() { return maxEdits_; } /** *
     *Maximum number of edits for fuzzy suggestions
     * 
* * int32 maxEdits = 10; * @param value The maxEdits to set. * @return This builder for chaining. */ public Builder setMaxEdits(int value) { maxEdits_ = value; bitField0_ |= 0x00000200; onChanged(); return this; } /** *
     *Maximum number of edits for fuzzy suggestions
     * 
* * int32 maxEdits = 10; * @return This builder for chaining. */ public Builder clearMaxEdits() { bitField0_ = (bitField0_ & ~0x00000200); maxEdits_ = 0; onChanged(); return this; } private boolean transpositions_ ; /** *
     *Whether transpositions are allowed
     * 
* * bool transpositions = 11; * @return The transpositions. */ @java.lang.Override public boolean getTranspositions() { return transpositions_; } /** *
     *Whether transpositions are allowed
     * 
* * bool transpositions = 11; * @param value The transpositions to set. * @return This builder for chaining. */ public Builder setTranspositions(boolean value) { transpositions_ = value; bitField0_ |= 0x00000400; onChanged(); return this; } /** *
     *Whether transpositions are allowed
     * 
* * bool transpositions = 11; * @return This builder for chaining. */ public Builder clearTranspositions() { bitField0_ = (bitField0_ & ~0x00000400); transpositions_ = false; onChanged(); return this; } private boolean unicodeAware_ ; /** *
     *True if all edits are measured in unicode characters, not UTF-8 bytes
     * 
* * bool unicodeAware = 12; * @return The unicodeAware. */ @java.lang.Override public boolean getUnicodeAware() { return unicodeAware_; } /** *
     *True if all edits are measured in unicode characters, not UTF-8 bytes
     * 
* * bool unicodeAware = 12; * @param value The unicodeAware to set. * @return This builder for chaining. */ public Builder setUnicodeAware(boolean value) { unicodeAware_ = value; bitField0_ |= 0x00000800; onChanged(); return this; } /** *
     *True if all edits are measured in unicode characters, not UTF-8 bytes
     * 
* * bool unicodeAware = 12; * @return This builder for chaining. */ public Builder clearUnicodeAware() { bitField0_ = (bitField0_ & ~0x00000800); unicodeAware_ = 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.FuzzySuggester) } // @@protoc_insertion_point(class_scope:luceneserver.FuzzySuggester) private static final com.yelp.nrtsearch.server.grpc.FuzzySuggester DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.yelp.nrtsearch.server.grpc.FuzzySuggester(); } public static com.yelp.nrtsearch.server.grpc.FuzzySuggester getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public FuzzySuggester 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.FuzzySuggester getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy