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

com.yelp.nrtsearch.server.grpc.MatchQuery 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/search.proto

// Protobuf Java Version: 3.25.3
package com.yelp.nrtsearch.server.grpc;

/**
 * 
 * A query that analyzes the text before finding matching documents. The tokens resulting from the analysis are combined using term queries in boolean clauses.
 * 
* * Protobuf type {@code luceneserver.MatchQuery} */ public final class MatchQuery extends com.google.protobuf.GeneratedMessageV3 implements // @@protoc_insertion_point(message_implements:luceneserver.MatchQuery) MatchQueryOrBuilder { private static final long serialVersionUID = 0L; // Use MatchQuery.newBuilder() to construct. private MatchQuery(com.google.protobuf.GeneratedMessageV3.Builder builder) { super(builder); } private MatchQuery() { field_ = ""; query_ = ""; operator_ = 0; } @java.lang.Override @SuppressWarnings({"unused"}) protected java.lang.Object newInstance( UnusedPrivateParameter unused) { return new MatchQuery(); } public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_MatchQuery_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_MatchQuery_fieldAccessorTable .ensureFieldAccessorsInitialized( com.yelp.nrtsearch.server.grpc.MatchQuery.class, com.yelp.nrtsearch.server.grpc.MatchQuery.Builder.class); } private int bitField0_; public static final int FIELD_FIELD_NUMBER = 1; @SuppressWarnings("serial") private volatile java.lang.Object field_ = ""; /** *
   * Field in the document to query.
   * 
* * string field = 1; * @return The field. */ @java.lang.Override public java.lang.String getField() { java.lang.Object ref = field_; 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(); field_ = s; return s; } } /** *
   * Field in the document to query.
   * 
* * string field = 1; * @return The bytes for field. */ @java.lang.Override public com.google.protobuf.ByteString getFieldBytes() { java.lang.Object ref = field_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); field_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int QUERY_FIELD_NUMBER = 2; @SuppressWarnings("serial") private volatile java.lang.Object query_ = ""; /** *
   * The text to query with.
   * 
* * string query = 2; * @return The query. */ @java.lang.Override public java.lang.String getQuery() { java.lang.Object ref = query_; 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(); query_ = s; return s; } } /** *
   * The text to query with.
   * 
* * string query = 2; * @return The bytes for query. */ @java.lang.Override public com.google.protobuf.ByteString getQueryBytes() { java.lang.Object ref = query_; if (ref instanceof java.lang.String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); query_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } public static final int OPERATOR_FIELD_NUMBER = 3; private int operator_ = 0; /** *
   * Boolean logic used to interpret text in the query. The possible values are SHOULD (default) and MUST.
   * 
* * .luceneserver.MatchOperator operator = 3; * @return The enum numeric value on the wire for operator. */ @java.lang.Override public int getOperatorValue() { return operator_; } /** *
   * Boolean logic used to interpret text in the query. The possible values are SHOULD (default) and MUST.
   * 
* * .luceneserver.MatchOperator operator = 3; * @return The operator. */ @java.lang.Override public com.yelp.nrtsearch.server.grpc.MatchOperator getOperator() { com.yelp.nrtsearch.server.grpc.MatchOperator result = com.yelp.nrtsearch.server.grpc.MatchOperator.forNumber(operator_); return result == null ? com.yelp.nrtsearch.server.grpc.MatchOperator.UNRECOGNIZED : result; } public static final int MINIMUMNUMBERSHOULDMATCH_FIELD_NUMBER = 4; private int minimumNumberShouldMatch_ = 0; /** *
   * Minimum number of optional clauses that must match.
   * 
* * int32 minimumNumberShouldMatch = 4; * @return The minimumNumberShouldMatch. */ @java.lang.Override public int getMinimumNumberShouldMatch() { return minimumNumberShouldMatch_; } public static final int ANALYZER_FIELD_NUMBER = 5; private com.yelp.nrtsearch.server.grpc.Analyzer analyzer_; /** *
   * Analyzer used to analyze the query. If not provided, the default search analyzer for the field would be used instead.
   * 
* * .luceneserver.Analyzer analyzer = 5; * @return Whether the analyzer field is set. */ @java.lang.Override public boolean hasAnalyzer() { return ((bitField0_ & 0x00000001) != 0); } /** *
   * Analyzer used to analyze the query. If not provided, the default search analyzer for the field would be used instead.
   * 
* * .luceneserver.Analyzer analyzer = 5; * @return The analyzer. */ @java.lang.Override public com.yelp.nrtsearch.server.grpc.Analyzer getAnalyzer() { return analyzer_ == null ? com.yelp.nrtsearch.server.grpc.Analyzer.getDefaultInstance() : analyzer_; } /** *
   * Analyzer used to analyze the query. If not provided, the default search analyzer for the field would be used instead.
   * 
* * .luceneserver.Analyzer analyzer = 5; */ @java.lang.Override public com.yelp.nrtsearch.server.grpc.AnalyzerOrBuilder getAnalyzerOrBuilder() { return analyzer_ == null ? com.yelp.nrtsearch.server.grpc.Analyzer.getDefaultInstance() : analyzer_; } public static final int FUZZYPARAMS_FIELD_NUMBER = 6; private com.yelp.nrtsearch.server.grpc.FuzzyParams fuzzyParams_; /** *
   * Parameters to set the fuzziness of the query
   * 
* * .luceneserver.FuzzyParams fuzzyParams = 6; * @return Whether the fuzzyParams field is set. */ @java.lang.Override public boolean hasFuzzyParams() { return ((bitField0_ & 0x00000002) != 0); } /** *
   * Parameters to set the fuzziness of the query
   * 
* * .luceneserver.FuzzyParams fuzzyParams = 6; * @return The fuzzyParams. */ @java.lang.Override public com.yelp.nrtsearch.server.grpc.FuzzyParams getFuzzyParams() { return fuzzyParams_ == null ? com.yelp.nrtsearch.server.grpc.FuzzyParams.getDefaultInstance() : fuzzyParams_; } /** *
   * Parameters to set the fuzziness of the query
   * 
* * .luceneserver.FuzzyParams fuzzyParams = 6; */ @java.lang.Override public com.yelp.nrtsearch.server.grpc.FuzzyParamsOrBuilder getFuzzyParamsOrBuilder() { return fuzzyParams_ == null ? com.yelp.nrtsearch.server.grpc.FuzzyParams.getDefaultInstance() : fuzzyParams_; } 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(field_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 1, field_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { com.google.protobuf.GeneratedMessageV3.writeString(output, 2, query_); } if (operator_ != com.yelp.nrtsearch.server.grpc.MatchOperator.SHOULD.getNumber()) { output.writeEnum(3, operator_); } if (minimumNumberShouldMatch_ != 0) { output.writeInt32(4, minimumNumberShouldMatch_); } if (((bitField0_ & 0x00000001) != 0)) { output.writeMessage(5, getAnalyzer()); } if (((bitField0_ & 0x00000002) != 0)) { output.writeMessage(6, getFuzzyParams()); } 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(field_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, field_); } if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) { size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, query_); } if (operator_ != com.yelp.nrtsearch.server.grpc.MatchOperator.SHOULD.getNumber()) { size += com.google.protobuf.CodedOutputStream .computeEnumSize(3, operator_); } if (minimumNumberShouldMatch_ != 0) { size += com.google.protobuf.CodedOutputStream .computeInt32Size(4, minimumNumberShouldMatch_); } if (((bitField0_ & 0x00000001) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(5, getAnalyzer()); } if (((bitField0_ & 0x00000002) != 0)) { size += com.google.protobuf.CodedOutputStream .computeMessageSize(6, getFuzzyParams()); } 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.MatchQuery)) { return super.equals(obj); } com.yelp.nrtsearch.server.grpc.MatchQuery other = (com.yelp.nrtsearch.server.grpc.MatchQuery) obj; if (!getField() .equals(other.getField())) return false; if (!getQuery() .equals(other.getQuery())) return false; if (operator_ != other.operator_) return false; if (getMinimumNumberShouldMatch() != other.getMinimumNumberShouldMatch()) return false; if (hasAnalyzer() != other.hasAnalyzer()) return false; if (hasAnalyzer()) { if (!getAnalyzer() .equals(other.getAnalyzer())) return false; } if (hasFuzzyParams() != other.hasFuzzyParams()) return false; if (hasFuzzyParams()) { if (!getFuzzyParams() .equals(other.getFuzzyParams())) 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) + FIELD_FIELD_NUMBER; hash = (53 * hash) + getField().hashCode(); hash = (37 * hash) + QUERY_FIELD_NUMBER; hash = (53 * hash) + getQuery().hashCode(); hash = (37 * hash) + OPERATOR_FIELD_NUMBER; hash = (53 * hash) + operator_; hash = (37 * hash) + MINIMUMNUMBERSHOULDMATCH_FIELD_NUMBER; hash = (53 * hash) + getMinimumNumberShouldMatch(); if (hasAnalyzer()) { hash = (37 * hash) + ANALYZER_FIELD_NUMBER; hash = (53 * hash) + getAnalyzer().hashCode(); } if (hasFuzzyParams()) { hash = (37 * hash) + FUZZYPARAMS_FIELD_NUMBER; hash = (53 * hash) + getFuzzyParams().hashCode(); } hash = (29 * hash) + getUnknownFields().hashCode(); memoizedHashCode = hash; return hash; } public static com.yelp.nrtsearch.server.grpc.MatchQuery parseFrom( java.nio.ByteBuffer data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.yelp.nrtsearch.server.grpc.MatchQuery 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.MatchQuery parseFrom( com.google.protobuf.ByteString data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.yelp.nrtsearch.server.grpc.MatchQuery 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.MatchQuery parseFrom(byte[] data) throws com.google.protobuf.InvalidProtocolBufferException { return PARSER.parseFrom(data); } public static com.yelp.nrtsearch.server.grpc.MatchQuery 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.MatchQuery parseFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseWithIOException(PARSER, input); } public static com.yelp.nrtsearch.server.grpc.MatchQuery 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.MatchQuery parseDelimitedFrom(java.io.InputStream input) throws java.io.IOException { return com.google.protobuf.GeneratedMessageV3 .parseDelimitedWithIOException(PARSER, input); } public static com.yelp.nrtsearch.server.grpc.MatchQuery 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.MatchQuery 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.MatchQuery 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.MatchQuery 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; } /** *
   * A query that analyzes the text before finding matching documents. The tokens resulting from the analysis are combined using term queries in boolean clauses.
   * 
* * Protobuf type {@code luceneserver.MatchQuery} */ public static final class Builder extends com.google.protobuf.GeneratedMessageV3.Builder implements // @@protoc_insertion_point(builder_implements:luceneserver.MatchQuery) com.yelp.nrtsearch.server.grpc.MatchQueryOrBuilder { public static final com.google.protobuf.Descriptors.Descriptor getDescriptor() { return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_MatchQuery_descriptor; } @java.lang.Override protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable internalGetFieldAccessorTable() { return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_MatchQuery_fieldAccessorTable .ensureFieldAccessorsInitialized( com.yelp.nrtsearch.server.grpc.MatchQuery.class, com.yelp.nrtsearch.server.grpc.MatchQuery.Builder.class); } // Construct using com.yelp.nrtsearch.server.grpc.MatchQuery.newBuilder() private Builder() { maybeForceBuilderInitialization(); } private Builder( com.google.protobuf.GeneratedMessageV3.BuilderParent parent) { super(parent); maybeForceBuilderInitialization(); } private void maybeForceBuilderInitialization() { if (com.google.protobuf.GeneratedMessageV3 .alwaysUseFieldBuilders) { getAnalyzerFieldBuilder(); getFuzzyParamsFieldBuilder(); } } @java.lang.Override public Builder clear() { super.clear(); bitField0_ = 0; field_ = ""; query_ = ""; operator_ = 0; minimumNumberShouldMatch_ = 0; analyzer_ = null; if (analyzerBuilder_ != null) { analyzerBuilder_.dispose(); analyzerBuilder_ = null; } fuzzyParams_ = null; if (fuzzyParamsBuilder_ != null) { fuzzyParamsBuilder_.dispose(); fuzzyParamsBuilder_ = null; } return this; } @java.lang.Override public com.google.protobuf.Descriptors.Descriptor getDescriptorForType() { return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_MatchQuery_descriptor; } @java.lang.Override public com.yelp.nrtsearch.server.grpc.MatchQuery getDefaultInstanceForType() { return com.yelp.nrtsearch.server.grpc.MatchQuery.getDefaultInstance(); } @java.lang.Override public com.yelp.nrtsearch.server.grpc.MatchQuery build() { com.yelp.nrtsearch.server.grpc.MatchQuery result = buildPartial(); if (!result.isInitialized()) { throw newUninitializedMessageException(result); } return result; } @java.lang.Override public com.yelp.nrtsearch.server.grpc.MatchQuery buildPartial() { com.yelp.nrtsearch.server.grpc.MatchQuery result = new com.yelp.nrtsearch.server.grpc.MatchQuery(this); if (bitField0_ != 0) { buildPartial0(result); } onBuilt(); return result; } private void buildPartial0(com.yelp.nrtsearch.server.grpc.MatchQuery result) { int from_bitField0_ = bitField0_; if (((from_bitField0_ & 0x00000001) != 0)) { result.field_ = field_; } if (((from_bitField0_ & 0x00000002) != 0)) { result.query_ = query_; } if (((from_bitField0_ & 0x00000004) != 0)) { result.operator_ = operator_; } if (((from_bitField0_ & 0x00000008) != 0)) { result.minimumNumberShouldMatch_ = minimumNumberShouldMatch_; } int to_bitField0_ = 0; if (((from_bitField0_ & 0x00000010) != 0)) { result.analyzer_ = analyzerBuilder_ == null ? analyzer_ : analyzerBuilder_.build(); to_bitField0_ |= 0x00000001; } if (((from_bitField0_ & 0x00000020) != 0)) { result.fuzzyParams_ = fuzzyParamsBuilder_ == null ? fuzzyParams_ : fuzzyParamsBuilder_.build(); to_bitField0_ |= 0x00000002; } result.bitField0_ |= to_bitField0_; } @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.MatchQuery) { return mergeFrom((com.yelp.nrtsearch.server.grpc.MatchQuery)other); } else { super.mergeFrom(other); return this; } } public Builder mergeFrom(com.yelp.nrtsearch.server.grpc.MatchQuery other) { if (other == com.yelp.nrtsearch.server.grpc.MatchQuery.getDefaultInstance()) return this; if (!other.getField().isEmpty()) { field_ = other.field_; bitField0_ |= 0x00000001; onChanged(); } if (!other.getQuery().isEmpty()) { query_ = other.query_; bitField0_ |= 0x00000002; onChanged(); } if (other.operator_ != 0) { setOperatorValue(other.getOperatorValue()); } if (other.getMinimumNumberShouldMatch() != 0) { setMinimumNumberShouldMatch(other.getMinimumNumberShouldMatch()); } if (other.hasAnalyzer()) { mergeAnalyzer(other.getAnalyzer()); } if (other.hasFuzzyParams()) { mergeFuzzyParams(other.getFuzzyParams()); } 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: { field_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000001; break; } // case 10 case 18: { query_ = input.readStringRequireUtf8(); bitField0_ |= 0x00000002; break; } // case 18 case 24: { operator_ = input.readEnum(); bitField0_ |= 0x00000004; break; } // case 24 case 32: { minimumNumberShouldMatch_ = input.readInt32(); bitField0_ |= 0x00000008; break; } // case 32 case 42: { input.readMessage( getAnalyzerFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000010; break; } // case 42 case 50: { input.readMessage( getFuzzyParamsFieldBuilder().getBuilder(), extensionRegistry); bitField0_ |= 0x00000020; break; } // case 50 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 field_ = ""; /** *
     * Field in the document to query.
     * 
* * string field = 1; * @return The field. */ public java.lang.String getField() { java.lang.Object ref = field_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); field_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * Field in the document to query.
     * 
* * string field = 1; * @return The bytes for field. */ public com.google.protobuf.ByteString getFieldBytes() { java.lang.Object ref = field_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); field_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * Field in the document to query.
     * 
* * string field = 1; * @param value The field to set. * @return This builder for chaining. */ public Builder setField( java.lang.String value) { if (value == null) { throw new NullPointerException(); } field_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } /** *
     * Field in the document to query.
     * 
* * string field = 1; * @return This builder for chaining. */ public Builder clearField() { field_ = getDefaultInstance().getField(); bitField0_ = (bitField0_ & ~0x00000001); onChanged(); return this; } /** *
     * Field in the document to query.
     * 
* * string field = 1; * @param value The bytes for field to set. * @return This builder for chaining. */ public Builder setFieldBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); field_ = value; bitField0_ |= 0x00000001; onChanged(); return this; } private java.lang.Object query_ = ""; /** *
     * The text to query with.
     * 
* * string query = 2; * @return The query. */ public java.lang.String getQuery() { java.lang.Object ref = query_; if (!(ref instanceof java.lang.String)) { com.google.protobuf.ByteString bs = (com.google.protobuf.ByteString) ref; java.lang.String s = bs.toStringUtf8(); query_ = s; return s; } else { return (java.lang.String) ref; } } /** *
     * The text to query with.
     * 
* * string query = 2; * @return The bytes for query. */ public com.google.protobuf.ByteString getQueryBytes() { java.lang.Object ref = query_; if (ref instanceof String) { com.google.protobuf.ByteString b = com.google.protobuf.ByteString.copyFromUtf8( (java.lang.String) ref); query_ = b; return b; } else { return (com.google.protobuf.ByteString) ref; } } /** *
     * The text to query with.
     * 
* * string query = 2; * @param value The query to set. * @return This builder for chaining. */ public Builder setQuery( java.lang.String value) { if (value == null) { throw new NullPointerException(); } query_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } /** *
     * The text to query with.
     * 
* * string query = 2; * @return This builder for chaining. */ public Builder clearQuery() { query_ = getDefaultInstance().getQuery(); bitField0_ = (bitField0_ & ~0x00000002); onChanged(); return this; } /** *
     * The text to query with.
     * 
* * string query = 2; * @param value The bytes for query to set. * @return This builder for chaining. */ public Builder setQueryBytes( com.google.protobuf.ByteString value) { if (value == null) { throw new NullPointerException(); } checkByteStringIsUtf8(value); query_ = value; bitField0_ |= 0x00000002; onChanged(); return this; } private int operator_ = 0; /** *
     * Boolean logic used to interpret text in the query. The possible values are SHOULD (default) and MUST.
     * 
* * .luceneserver.MatchOperator operator = 3; * @return The enum numeric value on the wire for operator. */ @java.lang.Override public int getOperatorValue() { return operator_; } /** *
     * Boolean logic used to interpret text in the query. The possible values are SHOULD (default) and MUST.
     * 
* * .luceneserver.MatchOperator operator = 3; * @param value The enum numeric value on the wire for operator to set. * @return This builder for chaining. */ public Builder setOperatorValue(int value) { operator_ = value; bitField0_ |= 0x00000004; onChanged(); return this; } /** *
     * Boolean logic used to interpret text in the query. The possible values are SHOULD (default) and MUST.
     * 
* * .luceneserver.MatchOperator operator = 3; * @return The operator. */ @java.lang.Override public com.yelp.nrtsearch.server.grpc.MatchOperator getOperator() { com.yelp.nrtsearch.server.grpc.MatchOperator result = com.yelp.nrtsearch.server.grpc.MatchOperator.forNumber(operator_); return result == null ? com.yelp.nrtsearch.server.grpc.MatchOperator.UNRECOGNIZED : result; } /** *
     * Boolean logic used to interpret text in the query. The possible values are SHOULD (default) and MUST.
     * 
* * .luceneserver.MatchOperator operator = 3; * @param value The operator to set. * @return This builder for chaining. */ public Builder setOperator(com.yelp.nrtsearch.server.grpc.MatchOperator value) { if (value == null) { throw new NullPointerException(); } bitField0_ |= 0x00000004; operator_ = value.getNumber(); onChanged(); return this; } /** *
     * Boolean logic used to interpret text in the query. The possible values are SHOULD (default) and MUST.
     * 
* * .luceneserver.MatchOperator operator = 3; * @return This builder for chaining. */ public Builder clearOperator() { bitField0_ = (bitField0_ & ~0x00000004); operator_ = 0; onChanged(); return this; } private int minimumNumberShouldMatch_ ; /** *
     * Minimum number of optional clauses that must match.
     * 
* * int32 minimumNumberShouldMatch = 4; * @return The minimumNumberShouldMatch. */ @java.lang.Override public int getMinimumNumberShouldMatch() { return minimumNumberShouldMatch_; } /** *
     * Minimum number of optional clauses that must match.
     * 
* * int32 minimumNumberShouldMatch = 4; * @param value The minimumNumberShouldMatch to set. * @return This builder for chaining. */ public Builder setMinimumNumberShouldMatch(int value) { minimumNumberShouldMatch_ = value; bitField0_ |= 0x00000008; onChanged(); return this; } /** *
     * Minimum number of optional clauses that must match.
     * 
* * int32 minimumNumberShouldMatch = 4; * @return This builder for chaining. */ public Builder clearMinimumNumberShouldMatch() { bitField0_ = (bitField0_ & ~0x00000008); minimumNumberShouldMatch_ = 0; onChanged(); return this; } private com.yelp.nrtsearch.server.grpc.Analyzer analyzer_; private com.google.protobuf.SingleFieldBuilderV3< com.yelp.nrtsearch.server.grpc.Analyzer, com.yelp.nrtsearch.server.grpc.Analyzer.Builder, com.yelp.nrtsearch.server.grpc.AnalyzerOrBuilder> analyzerBuilder_; /** *
     * Analyzer used to analyze the query. If not provided, the default search analyzer for the field would be used instead.
     * 
* * .luceneserver.Analyzer analyzer = 5; * @return Whether the analyzer field is set. */ public boolean hasAnalyzer() { return ((bitField0_ & 0x00000010) != 0); } /** *
     * Analyzer used to analyze the query. If not provided, the default search analyzer for the field would be used instead.
     * 
* * .luceneserver.Analyzer analyzer = 5; * @return The analyzer. */ public com.yelp.nrtsearch.server.grpc.Analyzer getAnalyzer() { if (analyzerBuilder_ == null) { return analyzer_ == null ? com.yelp.nrtsearch.server.grpc.Analyzer.getDefaultInstance() : analyzer_; } else { return analyzerBuilder_.getMessage(); } } /** *
     * Analyzer used to analyze the query. If not provided, the default search analyzer for the field would be used instead.
     * 
* * .luceneserver.Analyzer analyzer = 5; */ public Builder setAnalyzer(com.yelp.nrtsearch.server.grpc.Analyzer value) { if (analyzerBuilder_ == null) { if (value == null) { throw new NullPointerException(); } analyzer_ = value; } else { analyzerBuilder_.setMessage(value); } bitField0_ |= 0x00000010; onChanged(); return this; } /** *
     * Analyzer used to analyze the query. If not provided, the default search analyzer for the field would be used instead.
     * 
* * .luceneserver.Analyzer analyzer = 5; */ public Builder setAnalyzer( com.yelp.nrtsearch.server.grpc.Analyzer.Builder builderForValue) { if (analyzerBuilder_ == null) { analyzer_ = builderForValue.build(); } else { analyzerBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000010; onChanged(); return this; } /** *
     * Analyzer used to analyze the query. If not provided, the default search analyzer for the field would be used instead.
     * 
* * .luceneserver.Analyzer analyzer = 5; */ public Builder mergeAnalyzer(com.yelp.nrtsearch.server.grpc.Analyzer value) { if (analyzerBuilder_ == null) { if (((bitField0_ & 0x00000010) != 0) && analyzer_ != null && analyzer_ != com.yelp.nrtsearch.server.grpc.Analyzer.getDefaultInstance()) { getAnalyzerBuilder().mergeFrom(value); } else { analyzer_ = value; } } else { analyzerBuilder_.mergeFrom(value); } if (analyzer_ != null) { bitField0_ |= 0x00000010; onChanged(); } return this; } /** *
     * Analyzer used to analyze the query. If not provided, the default search analyzer for the field would be used instead.
     * 
* * .luceneserver.Analyzer analyzer = 5; */ public Builder clearAnalyzer() { bitField0_ = (bitField0_ & ~0x00000010); analyzer_ = null; if (analyzerBuilder_ != null) { analyzerBuilder_.dispose(); analyzerBuilder_ = null; } onChanged(); return this; } /** *
     * Analyzer used to analyze the query. If not provided, the default search analyzer for the field would be used instead.
     * 
* * .luceneserver.Analyzer analyzer = 5; */ public com.yelp.nrtsearch.server.grpc.Analyzer.Builder getAnalyzerBuilder() { bitField0_ |= 0x00000010; onChanged(); return getAnalyzerFieldBuilder().getBuilder(); } /** *
     * Analyzer used to analyze the query. If not provided, the default search analyzer for the field would be used instead.
     * 
* * .luceneserver.Analyzer analyzer = 5; */ public com.yelp.nrtsearch.server.grpc.AnalyzerOrBuilder getAnalyzerOrBuilder() { if (analyzerBuilder_ != null) { return analyzerBuilder_.getMessageOrBuilder(); } else { return analyzer_ == null ? com.yelp.nrtsearch.server.grpc.Analyzer.getDefaultInstance() : analyzer_; } } /** *
     * Analyzer used to analyze the query. If not provided, the default search analyzer for the field would be used instead.
     * 
* * .luceneserver.Analyzer analyzer = 5; */ private com.google.protobuf.SingleFieldBuilderV3< com.yelp.nrtsearch.server.grpc.Analyzer, com.yelp.nrtsearch.server.grpc.Analyzer.Builder, com.yelp.nrtsearch.server.grpc.AnalyzerOrBuilder> getAnalyzerFieldBuilder() { if (analyzerBuilder_ == null) { analyzerBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.yelp.nrtsearch.server.grpc.Analyzer, com.yelp.nrtsearch.server.grpc.Analyzer.Builder, com.yelp.nrtsearch.server.grpc.AnalyzerOrBuilder>( getAnalyzer(), getParentForChildren(), isClean()); analyzer_ = null; } return analyzerBuilder_; } private com.yelp.nrtsearch.server.grpc.FuzzyParams fuzzyParams_; private com.google.protobuf.SingleFieldBuilderV3< com.yelp.nrtsearch.server.grpc.FuzzyParams, com.yelp.nrtsearch.server.grpc.FuzzyParams.Builder, com.yelp.nrtsearch.server.grpc.FuzzyParamsOrBuilder> fuzzyParamsBuilder_; /** *
     * Parameters to set the fuzziness of the query
     * 
* * .luceneserver.FuzzyParams fuzzyParams = 6; * @return Whether the fuzzyParams field is set. */ public boolean hasFuzzyParams() { return ((bitField0_ & 0x00000020) != 0); } /** *
     * Parameters to set the fuzziness of the query
     * 
* * .luceneserver.FuzzyParams fuzzyParams = 6; * @return The fuzzyParams. */ public com.yelp.nrtsearch.server.grpc.FuzzyParams getFuzzyParams() { if (fuzzyParamsBuilder_ == null) { return fuzzyParams_ == null ? com.yelp.nrtsearch.server.grpc.FuzzyParams.getDefaultInstance() : fuzzyParams_; } else { return fuzzyParamsBuilder_.getMessage(); } } /** *
     * Parameters to set the fuzziness of the query
     * 
* * .luceneserver.FuzzyParams fuzzyParams = 6; */ public Builder setFuzzyParams(com.yelp.nrtsearch.server.grpc.FuzzyParams value) { if (fuzzyParamsBuilder_ == null) { if (value == null) { throw new NullPointerException(); } fuzzyParams_ = value; } else { fuzzyParamsBuilder_.setMessage(value); } bitField0_ |= 0x00000020; onChanged(); return this; } /** *
     * Parameters to set the fuzziness of the query
     * 
* * .luceneserver.FuzzyParams fuzzyParams = 6; */ public Builder setFuzzyParams( com.yelp.nrtsearch.server.grpc.FuzzyParams.Builder builderForValue) { if (fuzzyParamsBuilder_ == null) { fuzzyParams_ = builderForValue.build(); } else { fuzzyParamsBuilder_.setMessage(builderForValue.build()); } bitField0_ |= 0x00000020; onChanged(); return this; } /** *
     * Parameters to set the fuzziness of the query
     * 
* * .luceneserver.FuzzyParams fuzzyParams = 6; */ public Builder mergeFuzzyParams(com.yelp.nrtsearch.server.grpc.FuzzyParams value) { if (fuzzyParamsBuilder_ == null) { if (((bitField0_ & 0x00000020) != 0) && fuzzyParams_ != null && fuzzyParams_ != com.yelp.nrtsearch.server.grpc.FuzzyParams.getDefaultInstance()) { getFuzzyParamsBuilder().mergeFrom(value); } else { fuzzyParams_ = value; } } else { fuzzyParamsBuilder_.mergeFrom(value); } if (fuzzyParams_ != null) { bitField0_ |= 0x00000020; onChanged(); } return this; } /** *
     * Parameters to set the fuzziness of the query
     * 
* * .luceneserver.FuzzyParams fuzzyParams = 6; */ public Builder clearFuzzyParams() { bitField0_ = (bitField0_ & ~0x00000020); fuzzyParams_ = null; if (fuzzyParamsBuilder_ != null) { fuzzyParamsBuilder_.dispose(); fuzzyParamsBuilder_ = null; } onChanged(); return this; } /** *
     * Parameters to set the fuzziness of the query
     * 
* * .luceneserver.FuzzyParams fuzzyParams = 6; */ public com.yelp.nrtsearch.server.grpc.FuzzyParams.Builder getFuzzyParamsBuilder() { bitField0_ |= 0x00000020; onChanged(); return getFuzzyParamsFieldBuilder().getBuilder(); } /** *
     * Parameters to set the fuzziness of the query
     * 
* * .luceneserver.FuzzyParams fuzzyParams = 6; */ public com.yelp.nrtsearch.server.grpc.FuzzyParamsOrBuilder getFuzzyParamsOrBuilder() { if (fuzzyParamsBuilder_ != null) { return fuzzyParamsBuilder_.getMessageOrBuilder(); } else { return fuzzyParams_ == null ? com.yelp.nrtsearch.server.grpc.FuzzyParams.getDefaultInstance() : fuzzyParams_; } } /** *
     * Parameters to set the fuzziness of the query
     * 
* * .luceneserver.FuzzyParams fuzzyParams = 6; */ private com.google.protobuf.SingleFieldBuilderV3< com.yelp.nrtsearch.server.grpc.FuzzyParams, com.yelp.nrtsearch.server.grpc.FuzzyParams.Builder, com.yelp.nrtsearch.server.grpc.FuzzyParamsOrBuilder> getFuzzyParamsFieldBuilder() { if (fuzzyParamsBuilder_ == null) { fuzzyParamsBuilder_ = new com.google.protobuf.SingleFieldBuilderV3< com.yelp.nrtsearch.server.grpc.FuzzyParams, com.yelp.nrtsearch.server.grpc.FuzzyParams.Builder, com.yelp.nrtsearch.server.grpc.FuzzyParamsOrBuilder>( getFuzzyParams(), getParentForChildren(), isClean()); fuzzyParams_ = null; } return fuzzyParamsBuilder_; } @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.MatchQuery) } // @@protoc_insertion_point(class_scope:luceneserver.MatchQuery) private static final com.yelp.nrtsearch.server.grpc.MatchQuery DEFAULT_INSTANCE; static { DEFAULT_INSTANCE = new com.yelp.nrtsearch.server.grpc.MatchQuery(); } public static com.yelp.nrtsearch.server.grpc.MatchQuery getDefaultInstance() { return DEFAULT_INSTANCE; } private static final com.google.protobuf.Parser PARSER = new com.google.protobuf.AbstractParser() { @java.lang.Override public MatchQuery 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.MatchQuery getDefaultInstanceForType() { return DEFAULT_INSTANCE; } }




© 2015 - 2024 Weber Informatics LLC | Privacy Policy