com.yelp.nrtsearch.server.grpc.MultiMatchQuery Maven / Gradle / Ivy
Go to download
Show more of this group Show more artifacts with this name
Show all versions of clientlib Show documentation
Show all versions of clientlib Show documentation
GRPC Clientlib for nrtSearch
// Generated by the protocol buffer compiler. DO NOT EDIT!
// source: yelp/nrtsearch/search.proto
// Protobuf Java Version: 3.25.3
package com.yelp.nrtsearch.server.grpc;
/**
*
* A query that creates a match query for each field provided and wraps all the match queries in a disjunction max query.
*
*
* Protobuf type {@code luceneserver.MultiMatchQuery}
*/
public final class MultiMatchQuery extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:luceneserver.MultiMatchQuery)
MultiMatchQueryOrBuilder {
private static final long serialVersionUID = 0L;
// Use MultiMatchQuery.newBuilder() to construct.
private MultiMatchQuery(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private MultiMatchQuery() {
fields_ =
com.google.protobuf.LazyStringArrayList.emptyList();
query_ = "";
operator_ = 0;
type_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new MultiMatchQuery();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_MultiMatchQuery_descriptor;
}
@SuppressWarnings({"rawtypes"})
@java.lang.Override
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 3:
return internalGetFieldBoosts();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_MultiMatchQuery_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.yelp.nrtsearch.server.grpc.MultiMatchQuery.class, com.yelp.nrtsearch.server.grpc.MultiMatchQuery.Builder.class);
}
/**
*
* Type defining the execution behavior of the match.
*
*
* Protobuf enum {@code luceneserver.MultiMatchQuery.MatchType}
*/
public enum MatchType
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* Finds documents which match any field, but uses the _score from the best field.
*
*
* BEST_FIELDS = 0;
*/
BEST_FIELDS(0),
/**
*
* Runs a MatchPhrasePrefixQuery query on each field and uses the _score from the best field.
*
*
* PHRASE_PREFIX = 1;
*/
PHRASE_PREFIX(1),
/**
*
* Finds documents that match across multiple fields, as if they were a single field.
*
*
* CROSS_FIELDS = 2;
*/
CROSS_FIELDS(2),
UNRECOGNIZED(-1),
;
/**
*
* Finds documents which match any field, but uses the _score from the best field.
*
*
* BEST_FIELDS = 0;
*/
public static final int BEST_FIELDS_VALUE = 0;
/**
*
* Runs a MatchPhrasePrefixQuery query on each field and uses the _score from the best field.
*
*
* PHRASE_PREFIX = 1;
*/
public static final int PHRASE_PREFIX_VALUE = 1;
/**
*
* Finds documents that match across multiple fields, as if they were a single field.
*
*
* CROSS_FIELDS = 2;
*/
public static final int CROSS_FIELDS_VALUE = 2;
public final int getNumber() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalArgumentException(
"Can't get the number of an unknown enum value.");
}
return value;
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static MatchType valueOf(int value) {
return forNumber(value);
}
/**
* @param value The numeric wire value of the corresponding enum entry.
* @return The enum associated with the given numeric wire value.
*/
public static MatchType forNumber(int value) {
switch (value) {
case 0: return BEST_FIELDS;
case 1: return PHRASE_PREFIX;
case 2: return CROSS_FIELDS;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
MatchType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public MatchType findValueByNumber(int number) {
return MatchType.forNumber(number);
}
};
public final com.google.protobuf.Descriptors.EnumValueDescriptor
getValueDescriptor() {
if (this == UNRECOGNIZED) {
throw new java.lang.IllegalStateException(
"Can't get the descriptor of an unrecognized enum value.");
}
return getDescriptor().getValues().get(ordinal());
}
public final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptorForType() {
return getDescriptor();
}
public static final com.google.protobuf.Descriptors.EnumDescriptor
getDescriptor() {
return com.yelp.nrtsearch.server.grpc.MultiMatchQuery.getDescriptor().getEnumTypes().get(0);
}
private static final MatchType[] VALUES = values();
public static MatchType valueOf(
com.google.protobuf.Descriptors.EnumValueDescriptor desc) {
if (desc.getType() != getDescriptor()) {
throw new java.lang.IllegalArgumentException(
"EnumValueDescriptor is not for this type.");
}
if (desc.getIndex() == -1) {
return UNRECOGNIZED;
}
return VALUES[desc.getIndex()];
}
private final int value;
private MatchType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:luceneserver.MultiMatchQuery.MatchType)
}
private int bitField0_;
public static final int FIELDS_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private com.google.protobuf.LazyStringArrayList fields_ =
com.google.protobuf.LazyStringArrayList.emptyList();
/**
*
* Fields in the document to query.
*
*
* repeated string fields = 1;
* @return A list containing the fields.
*/
public com.google.protobuf.ProtocolStringList
getFieldsList() {
return fields_;
}
/**
*
* Fields in the document to query.
*
*
* repeated string fields = 1;
* @return The count of fields.
*/
public int getFieldsCount() {
return fields_.size();
}
/**
*
* Fields in the document to query.
*
*
* repeated string fields = 1;
* @param index The index of the element to return.
* @return The fields at the given index.
*/
public java.lang.String getFields(int index) {
return fields_.get(index);
}
/**
*
* Fields in the document to query.
*
*
* repeated string fields = 1;
* @param index The index of the value to return.
* @return The bytes of the fields at the given index.
*/
public com.google.protobuf.ByteString
getFieldsBytes(int index) {
return fields_.getByteString(index);
}
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 FIELDBOOSTS_FIELD_NUMBER = 3;
private static final class FieldBoostsDefaultEntryHolder {
static final com.google.protobuf.MapEntry<
java.lang.String, java.lang.Float> defaultEntry =
com.google.protobuf.MapEntry
.newDefaultInstance(
com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_MultiMatchQuery_FieldBoostsEntry_descriptor,
com.google.protobuf.WireFormat.FieldType.STRING,
"",
com.google.protobuf.WireFormat.FieldType.FLOAT,
0F);
}
@SuppressWarnings("serial")
private com.google.protobuf.MapField<
java.lang.String, java.lang.Float> fieldBoosts_;
private com.google.protobuf.MapField
internalGetFieldBoosts() {
if (fieldBoosts_ == null) {
return com.google.protobuf.MapField.emptyMapField(
FieldBoostsDefaultEntryHolder.defaultEntry);
}
return fieldBoosts_;
}
public int getFieldBoostsCount() {
return internalGetFieldBoosts().getMap().size();
}
/**
*
* Boosts for each field, if any.
*
*
* map<string, float> fieldBoosts = 3;
*/
@java.lang.Override
public boolean containsFieldBoosts(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetFieldBoosts().getMap().containsKey(key);
}
/**
* Use {@link #getFieldBoostsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getFieldBoosts() {
return getFieldBoostsMap();
}
/**
*
* Boosts for each field, if any.
*
*
* map<string, float> fieldBoosts = 3;
*/
@java.lang.Override
public java.util.Map getFieldBoostsMap() {
return internalGetFieldBoosts().getMap();
}
/**
*
* Boosts for each field, if any.
*
*
* map<string, float> fieldBoosts = 3;
*/
@java.lang.Override
public float getFieldBoostsOrDefault(
java.lang.String key,
float defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetFieldBoosts().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* Boosts for each field, if any.
*
*
* map<string, float> fieldBoosts = 3;
*/
@java.lang.Override
public float getFieldBoostsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetFieldBoosts().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public static final int OPERATOR_FIELD_NUMBER = 4;
private int operator_ = 0;
/**
*
* Boolean logic used to interpret text in the query. The possible values are SHOULD (default) and MUST.
*
*
* .luceneserver.MatchOperator operator = 4;
* @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 = 4;
* @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 = 5;
private int minimumNumberShouldMatch_ = 0;
/**
*
* Minimum number of optional clauses that must match.
*
*
* int32 minimumNumberShouldMatch = 5;
* @return The minimumNumberShouldMatch.
*/
@java.lang.Override
public int getMinimumNumberShouldMatch() {
return minimumNumberShouldMatch_;
}
public static final int ANALYZER_FIELD_NUMBER = 6;
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 = 6;
* @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 = 6;
* @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 = 6;
*/
@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 = 7;
private com.yelp.nrtsearch.server.grpc.FuzzyParams fuzzyParams_;
/**
*
* Parameters to set the fuzziness of the query
*
*
* .luceneserver.FuzzyParams fuzzyParams = 7;
* @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 = 7;
* @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 = 7;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.FuzzyParamsOrBuilder getFuzzyParamsOrBuilder() {
return fuzzyParams_ == null ? com.yelp.nrtsearch.server.grpc.FuzzyParams.getDefaultInstance() : fuzzyParams_;
}
public static final int TIEBREAKERMULTIPLIER_FIELD_NUMBER = 8;
private float tieBreakerMultiplier_ = 0F;
/**
*
* The score of each non-maximum match query disjunct for a document will be multiplied by this weight and added into the final score.
*
*
* float tieBreakerMultiplier = 8;
* @return The tieBreakerMultiplier.
*/
@java.lang.Override
public float getTieBreakerMultiplier() {
return tieBreakerMultiplier_;
}
public static final int TYPE_FIELD_NUMBER = 9;
private int type_ = 0;
/**
*
* Type defining match behavior of query.
*
*
* .luceneserver.MultiMatchQuery.MatchType type = 9;
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override public int getTypeValue() {
return type_;
}
/**
*
* Type defining match behavior of query.
*
*
* .luceneserver.MultiMatchQuery.MatchType type = 9;
* @return The type.
*/
@java.lang.Override public com.yelp.nrtsearch.server.grpc.MultiMatchQuery.MatchType getType() {
com.yelp.nrtsearch.server.grpc.MultiMatchQuery.MatchType result = com.yelp.nrtsearch.server.grpc.MultiMatchQuery.MatchType.forNumber(type_);
return result == null ? com.yelp.nrtsearch.server.grpc.MultiMatchQuery.MatchType.UNRECOGNIZED : result;
}
public static final int SLOP_FIELD_NUMBER = 10;
private int slop_ = 0;
/**
*
* Edit distance between respective positions of tokens generated by analyzing this query and the positions of terms in a document, applies to PHRASE_PREFIX type matching.
*
*
* int32 slop = 10;
* @return The slop.
*/
@java.lang.Override
public int getSlop() {
return slop_;
}
public static final int MAXEXPANSIONS_FIELD_NUMBER = 11;
private int maxExpansions_ = 0;
/**
*
* Maximum number of terms to which the prefix token will expand when using PHRASE_PREFIX matching. Defaults to 50.
*
*
* int32 maxExpansions = 11;
* @return The maxExpansions.
*/
@java.lang.Override
public int getMaxExpansions() {
return maxExpansions_;
}
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 {
for (int i = 0; i < fields_.size(); i++) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, fields_.getRaw(i));
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 2, query_);
}
com.google.protobuf.GeneratedMessageV3
.serializeStringMapTo(
output,
internalGetFieldBoosts(),
FieldBoostsDefaultEntryHolder.defaultEntry,
3);
if (operator_ != com.yelp.nrtsearch.server.grpc.MatchOperator.SHOULD.getNumber()) {
output.writeEnum(4, operator_);
}
if (minimumNumberShouldMatch_ != 0) {
output.writeInt32(5, minimumNumberShouldMatch_);
}
if (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(6, getAnalyzer());
}
if (((bitField0_ & 0x00000002) != 0)) {
output.writeMessage(7, getFuzzyParams());
}
if (java.lang.Float.floatToRawIntBits(tieBreakerMultiplier_) != 0) {
output.writeFloat(8, tieBreakerMultiplier_);
}
if (type_ != com.yelp.nrtsearch.server.grpc.MultiMatchQuery.MatchType.BEST_FIELDS.getNumber()) {
output.writeEnum(9, type_);
}
if (slop_ != 0) {
output.writeInt32(10, slop_);
}
if (maxExpansions_ != 0) {
output.writeInt32(11, maxExpansions_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
{
int dataSize = 0;
for (int i = 0; i < fields_.size(); i++) {
dataSize += computeStringSizeNoTag(fields_.getRaw(i));
}
size += dataSize;
size += 1 * getFieldsList().size();
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(query_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(2, query_);
}
for (java.util.Map.Entry entry
: internalGetFieldBoosts().getMap().entrySet()) {
com.google.protobuf.MapEntry
fieldBoosts__ = FieldBoostsDefaultEntryHolder.defaultEntry.newBuilderForType()
.setKey(entry.getKey())
.setValue(entry.getValue())
.build();
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, fieldBoosts__);
}
if (operator_ != com.yelp.nrtsearch.server.grpc.MatchOperator.SHOULD.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(4, operator_);
}
if (minimumNumberShouldMatch_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(5, minimumNumberShouldMatch_);
}
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(6, getAnalyzer());
}
if (((bitField0_ & 0x00000002) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(7, getFuzzyParams());
}
if (java.lang.Float.floatToRawIntBits(tieBreakerMultiplier_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(8, tieBreakerMultiplier_);
}
if (type_ != com.yelp.nrtsearch.server.grpc.MultiMatchQuery.MatchType.BEST_FIELDS.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(9, type_);
}
if (slop_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(10, slop_);
}
if (maxExpansions_ != 0) {
size += com.google.protobuf.CodedOutputStream
.computeInt32Size(11, maxExpansions_);
}
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.MultiMatchQuery)) {
return super.equals(obj);
}
com.yelp.nrtsearch.server.grpc.MultiMatchQuery other = (com.yelp.nrtsearch.server.grpc.MultiMatchQuery) obj;
if (!getFieldsList()
.equals(other.getFieldsList())) return false;
if (!getQuery()
.equals(other.getQuery())) return false;
if (!internalGetFieldBoosts().equals(
other.internalGetFieldBoosts())) 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 (java.lang.Float.floatToIntBits(getTieBreakerMultiplier())
!= java.lang.Float.floatToIntBits(
other.getTieBreakerMultiplier())) return false;
if (type_ != other.type_) return false;
if (getSlop()
!= other.getSlop()) return false;
if (getMaxExpansions()
!= other.getMaxExpansions()) 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();
if (getFieldsCount() > 0) {
hash = (37 * hash) + FIELDS_FIELD_NUMBER;
hash = (53 * hash) + getFieldsList().hashCode();
}
hash = (37 * hash) + QUERY_FIELD_NUMBER;
hash = (53 * hash) + getQuery().hashCode();
if (!internalGetFieldBoosts().getMap().isEmpty()) {
hash = (37 * hash) + FIELDBOOSTS_FIELD_NUMBER;
hash = (53 * hash) + internalGetFieldBoosts().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 = (37 * hash) + TIEBREAKERMULTIPLIER_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(
getTieBreakerMultiplier());
hash = (37 * hash) + TYPE_FIELD_NUMBER;
hash = (53 * hash) + type_;
hash = (37 * hash) + SLOP_FIELD_NUMBER;
hash = (53 * hash) + getSlop();
hash = (37 * hash) + MAXEXPANSIONS_FIELD_NUMBER;
hash = (53 * hash) + getMaxExpansions();
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.yelp.nrtsearch.server.grpc.MultiMatchQuery parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.MultiMatchQuery 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.MultiMatchQuery parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.MultiMatchQuery 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.MultiMatchQuery parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.MultiMatchQuery 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.MultiMatchQuery parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.yelp.nrtsearch.server.grpc.MultiMatchQuery 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.MultiMatchQuery parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.yelp.nrtsearch.server.grpc.MultiMatchQuery 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.MultiMatchQuery 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.MultiMatchQuery 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.MultiMatchQuery 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 creates a match query for each field provided and wraps all the match queries in a disjunction max query.
*
*
* Protobuf type {@code luceneserver.MultiMatchQuery}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:luceneserver.MultiMatchQuery)
com.yelp.nrtsearch.server.grpc.MultiMatchQueryOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_MultiMatchQuery_descriptor;
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMapFieldReflection(
int number) {
switch (number) {
case 3:
return internalGetFieldBoosts();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@SuppressWarnings({"rawtypes"})
protected com.google.protobuf.MapFieldReflectionAccessor internalGetMutableMapFieldReflection(
int number) {
switch (number) {
case 3:
return internalGetMutableFieldBoosts();
default:
throw new RuntimeException(
"Invalid map field number: " + number);
}
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_MultiMatchQuery_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.yelp.nrtsearch.server.grpc.MultiMatchQuery.class, com.yelp.nrtsearch.server.grpc.MultiMatchQuery.Builder.class);
}
// Construct using com.yelp.nrtsearch.server.grpc.MultiMatchQuery.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;
fields_ =
com.google.protobuf.LazyStringArrayList.emptyList();
query_ = "";
internalGetMutableFieldBoosts().clear();
operator_ = 0;
minimumNumberShouldMatch_ = 0;
analyzer_ = null;
if (analyzerBuilder_ != null) {
analyzerBuilder_.dispose();
analyzerBuilder_ = null;
}
fuzzyParams_ = null;
if (fuzzyParamsBuilder_ != null) {
fuzzyParamsBuilder_.dispose();
fuzzyParamsBuilder_ = null;
}
tieBreakerMultiplier_ = 0F;
type_ = 0;
slop_ = 0;
maxExpansions_ = 0;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_MultiMatchQuery_descriptor;
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.MultiMatchQuery getDefaultInstanceForType() {
return com.yelp.nrtsearch.server.grpc.MultiMatchQuery.getDefaultInstance();
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.MultiMatchQuery build() {
com.yelp.nrtsearch.server.grpc.MultiMatchQuery result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.MultiMatchQuery buildPartial() {
com.yelp.nrtsearch.server.grpc.MultiMatchQuery result = new com.yelp.nrtsearch.server.grpc.MultiMatchQuery(this);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartial0(com.yelp.nrtsearch.server.grpc.MultiMatchQuery result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
fields_.makeImmutable();
result.fields_ = fields_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.query_ = query_;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.fieldBoosts_ = internalGetFieldBoosts();
result.fieldBoosts_.makeImmutable();
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.operator_ = operator_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.minimumNumberShouldMatch_ = minimumNumberShouldMatch_;
}
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000020) != 0)) {
result.analyzer_ = analyzerBuilder_ == null
? analyzer_
: analyzerBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000040) != 0)) {
result.fuzzyParams_ = fuzzyParamsBuilder_ == null
? fuzzyParams_
: fuzzyParamsBuilder_.build();
to_bitField0_ |= 0x00000002;
}
if (((from_bitField0_ & 0x00000080) != 0)) {
result.tieBreakerMultiplier_ = tieBreakerMultiplier_;
}
if (((from_bitField0_ & 0x00000100) != 0)) {
result.type_ = type_;
}
if (((from_bitField0_ & 0x00000200) != 0)) {
result.slop_ = slop_;
}
if (((from_bitField0_ & 0x00000400) != 0)) {
result.maxExpansions_ = maxExpansions_;
}
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.MultiMatchQuery) {
return mergeFrom((com.yelp.nrtsearch.server.grpc.MultiMatchQuery)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.yelp.nrtsearch.server.grpc.MultiMatchQuery other) {
if (other == com.yelp.nrtsearch.server.grpc.MultiMatchQuery.getDefaultInstance()) return this;
if (!other.fields_.isEmpty()) {
if (fields_.isEmpty()) {
fields_ = other.fields_;
bitField0_ |= 0x00000001;
} else {
ensureFieldsIsMutable();
fields_.addAll(other.fields_);
}
onChanged();
}
if (!other.getQuery().isEmpty()) {
query_ = other.query_;
bitField0_ |= 0x00000002;
onChanged();
}
internalGetMutableFieldBoosts().mergeFrom(
other.internalGetFieldBoosts());
bitField0_ |= 0x00000004;
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());
}
if (other.getTieBreakerMultiplier() != 0F) {
setTieBreakerMultiplier(other.getTieBreakerMultiplier());
}
if (other.type_ != 0) {
setTypeValue(other.getTypeValue());
}
if (other.getSlop() != 0) {
setSlop(other.getSlop());
}
if (other.getMaxExpansions() != 0) {
setMaxExpansions(other.getMaxExpansions());
}
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: {
java.lang.String s = input.readStringRequireUtf8();
ensureFieldsIsMutable();
fields_.add(s);
break;
} // case 10
case 18: {
query_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000002;
break;
} // case 18
case 26: {
com.google.protobuf.MapEntry
fieldBoosts__ = input.readMessage(
FieldBoostsDefaultEntryHolder.defaultEntry.getParserForType(), extensionRegistry);
internalGetMutableFieldBoosts().getMutableMap().put(
fieldBoosts__.getKey(), fieldBoosts__.getValue());
bitField0_ |= 0x00000004;
break;
} // case 26
case 32: {
operator_ = input.readEnum();
bitField0_ |= 0x00000008;
break;
} // case 32
case 40: {
minimumNumberShouldMatch_ = input.readInt32();
bitField0_ |= 0x00000010;
break;
} // case 40
case 50: {
input.readMessage(
getAnalyzerFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000020;
break;
} // case 50
case 58: {
input.readMessage(
getFuzzyParamsFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000040;
break;
} // case 58
case 69: {
tieBreakerMultiplier_ = input.readFloat();
bitField0_ |= 0x00000080;
break;
} // case 69
case 72: {
type_ = input.readEnum();
bitField0_ |= 0x00000100;
break;
} // case 72
case 80: {
slop_ = input.readInt32();
bitField0_ |= 0x00000200;
break;
} // case 80
case 88: {
maxExpansions_ = input.readInt32();
bitField0_ |= 0x00000400;
break;
} // case 88
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 com.google.protobuf.LazyStringArrayList fields_ =
com.google.protobuf.LazyStringArrayList.emptyList();
private void ensureFieldsIsMutable() {
if (!fields_.isModifiable()) {
fields_ = new com.google.protobuf.LazyStringArrayList(fields_);
}
bitField0_ |= 0x00000001;
}
/**
*
* Fields in the document to query.
*
*
* repeated string fields = 1;
* @return A list containing the fields.
*/
public com.google.protobuf.ProtocolStringList
getFieldsList() {
fields_.makeImmutable();
return fields_;
}
/**
*
* Fields in the document to query.
*
*
* repeated string fields = 1;
* @return The count of fields.
*/
public int getFieldsCount() {
return fields_.size();
}
/**
*
* Fields in the document to query.
*
*
* repeated string fields = 1;
* @param index The index of the element to return.
* @return The fields at the given index.
*/
public java.lang.String getFields(int index) {
return fields_.get(index);
}
/**
*
* Fields in the document to query.
*
*
* repeated string fields = 1;
* @param index The index of the value to return.
* @return The bytes of the fields at the given index.
*/
public com.google.protobuf.ByteString
getFieldsBytes(int index) {
return fields_.getByteString(index);
}
/**
*
* Fields in the document to query.
*
*
* repeated string fields = 1;
* @param index The index to set the value at.
* @param value The fields to set.
* @return This builder for chaining.
*/
public Builder setFields(
int index, java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureFieldsIsMutable();
fields_.set(index, value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Fields in the document to query.
*
*
* repeated string fields = 1;
* @param value The fields to add.
* @return This builder for chaining.
*/
public Builder addFields(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
ensureFieldsIsMutable();
fields_.add(value);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Fields in the document to query.
*
*
* repeated string fields = 1;
* @param values The fields to add.
* @return This builder for chaining.
*/
public Builder addAllFields(
java.lang.Iterable values) {
ensureFieldsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, fields_);
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Fields in the document to query.
*
*
* repeated string fields = 1;
* @return This builder for chaining.
*/
public Builder clearFields() {
fields_ =
com.google.protobuf.LazyStringArrayList.emptyList();
bitField0_ = (bitField0_ & ~0x00000001);;
onChanged();
return this;
}
/**
*
* Fields in the document to query.
*
*
* repeated string fields = 1;
* @param value The bytes of the fields to add.
* @return This builder for chaining.
*/
public Builder addFieldsBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
ensureFieldsIsMutable();
fields_.add(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 com.google.protobuf.MapField<
java.lang.String, java.lang.Float> fieldBoosts_;
private com.google.protobuf.MapField
internalGetFieldBoosts() {
if (fieldBoosts_ == null) {
return com.google.protobuf.MapField.emptyMapField(
FieldBoostsDefaultEntryHolder.defaultEntry);
}
return fieldBoosts_;
}
private com.google.protobuf.MapField
internalGetMutableFieldBoosts() {
if (fieldBoosts_ == null) {
fieldBoosts_ = com.google.protobuf.MapField.newMapField(
FieldBoostsDefaultEntryHolder.defaultEntry);
}
if (!fieldBoosts_.isMutable()) {
fieldBoosts_ = fieldBoosts_.copy();
}
bitField0_ |= 0x00000004;
onChanged();
return fieldBoosts_;
}
public int getFieldBoostsCount() {
return internalGetFieldBoosts().getMap().size();
}
/**
*
* Boosts for each field, if any.
*
*
* map<string, float> fieldBoosts = 3;
*/
@java.lang.Override
public boolean containsFieldBoosts(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
return internalGetFieldBoosts().getMap().containsKey(key);
}
/**
* Use {@link #getFieldBoostsMap()} instead.
*/
@java.lang.Override
@java.lang.Deprecated
public java.util.Map getFieldBoosts() {
return getFieldBoostsMap();
}
/**
*
* Boosts for each field, if any.
*
*
* map<string, float> fieldBoosts = 3;
*/
@java.lang.Override
public java.util.Map getFieldBoostsMap() {
return internalGetFieldBoosts().getMap();
}
/**
*
* Boosts for each field, if any.
*
*
* map<string, float> fieldBoosts = 3;
*/
@java.lang.Override
public float getFieldBoostsOrDefault(
java.lang.String key,
float defaultValue) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetFieldBoosts().getMap();
return map.containsKey(key) ? map.get(key) : defaultValue;
}
/**
*
* Boosts for each field, if any.
*
*
* map<string, float> fieldBoosts = 3;
*/
@java.lang.Override
public float getFieldBoostsOrThrow(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
java.util.Map map =
internalGetFieldBoosts().getMap();
if (!map.containsKey(key)) {
throw new java.lang.IllegalArgumentException();
}
return map.get(key);
}
public Builder clearFieldBoosts() {
bitField0_ = (bitField0_ & ~0x00000004);
internalGetMutableFieldBoosts().getMutableMap()
.clear();
return this;
}
/**
*
* Boosts for each field, if any.
*
*
* map<string, float> fieldBoosts = 3;
*/
public Builder removeFieldBoosts(
java.lang.String key) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableFieldBoosts().getMutableMap()
.remove(key);
return this;
}
/**
* Use alternate mutation accessors instead.
*/
@java.lang.Deprecated
public java.util.Map
getMutableFieldBoosts() {
bitField0_ |= 0x00000004;
return internalGetMutableFieldBoosts().getMutableMap();
}
/**
*
* Boosts for each field, if any.
*
*
* map<string, float> fieldBoosts = 3;
*/
public Builder putFieldBoosts(
java.lang.String key,
float value) {
if (key == null) { throw new NullPointerException("map key"); }
internalGetMutableFieldBoosts().getMutableMap()
.put(key, value);
bitField0_ |= 0x00000004;
return this;
}
/**
*
* Boosts for each field, if any.
*
*
* map<string, float> fieldBoosts = 3;
*/
public Builder putAllFieldBoosts(
java.util.Map values) {
internalGetMutableFieldBoosts().getMutableMap()
.putAll(values);
bitField0_ |= 0x00000004;
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 = 4;
* @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 = 4;
* @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_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* Boolean logic used to interpret text in the query. The possible values are SHOULD (default) and MUST.
*
*
* .luceneserver.MatchOperator operator = 4;
* @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 = 4;
* @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_ |= 0x00000008;
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 = 4;
* @return This builder for chaining.
*/
public Builder clearOperator() {
bitField0_ = (bitField0_ & ~0x00000008);
operator_ = 0;
onChanged();
return this;
}
private int minimumNumberShouldMatch_ ;
/**
*
* Minimum number of optional clauses that must match.
*
*
* int32 minimumNumberShouldMatch = 5;
* @return The minimumNumberShouldMatch.
*/
@java.lang.Override
public int getMinimumNumberShouldMatch() {
return minimumNumberShouldMatch_;
}
/**
*
* Minimum number of optional clauses that must match.
*
*
* int32 minimumNumberShouldMatch = 5;
* @param value The minimumNumberShouldMatch to set.
* @return This builder for chaining.
*/
public Builder setMinimumNumberShouldMatch(int value) {
minimumNumberShouldMatch_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* Minimum number of optional clauses that must match.
*
*
* int32 minimumNumberShouldMatch = 5;
* @return This builder for chaining.
*/
public Builder clearMinimumNumberShouldMatch() {
bitField0_ = (bitField0_ & ~0x00000010);
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 = 6;
* @return Whether the analyzer field is set.
*/
public boolean hasAnalyzer() {
return ((bitField0_ & 0x00000020) != 0);
}
/**
*
* Analyzer used to analyze the query. If not provided, the default search analyzer for the field would be used instead.
*
*
* .luceneserver.Analyzer analyzer = 6;
* @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 = 6;
*/
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_ |= 0x00000020;
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 = 6;
*/
public Builder setAnalyzer(
com.yelp.nrtsearch.server.grpc.Analyzer.Builder builderForValue) {
if (analyzerBuilder_ == null) {
analyzer_ = builderForValue.build();
} else {
analyzerBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000020;
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 = 6;
*/
public Builder mergeAnalyzer(com.yelp.nrtsearch.server.grpc.Analyzer value) {
if (analyzerBuilder_ == null) {
if (((bitField0_ & 0x00000020) != 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_ |= 0x00000020;
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 = 6;
*/
public Builder clearAnalyzer() {
bitField0_ = (bitField0_ & ~0x00000020);
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 = 6;
*/
public com.yelp.nrtsearch.server.grpc.Analyzer.Builder getAnalyzerBuilder() {
bitField0_ |= 0x00000020;
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 = 6;
*/
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 = 6;
*/
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 = 7;
* @return Whether the fuzzyParams field is set.
*/
public boolean hasFuzzyParams() {
return ((bitField0_ & 0x00000040) != 0);
}
/**
*
* Parameters to set the fuzziness of the query
*
*
* .luceneserver.FuzzyParams fuzzyParams = 7;
* @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 = 7;
*/
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_ |= 0x00000040;
onChanged();
return this;
}
/**
*
* Parameters to set the fuzziness of the query
*
*
* .luceneserver.FuzzyParams fuzzyParams = 7;
*/
public Builder setFuzzyParams(
com.yelp.nrtsearch.server.grpc.FuzzyParams.Builder builderForValue) {
if (fuzzyParamsBuilder_ == null) {
fuzzyParams_ = builderForValue.build();
} else {
fuzzyParamsBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000040;
onChanged();
return this;
}
/**
*
* Parameters to set the fuzziness of the query
*
*
* .luceneserver.FuzzyParams fuzzyParams = 7;
*/
public Builder mergeFuzzyParams(com.yelp.nrtsearch.server.grpc.FuzzyParams value) {
if (fuzzyParamsBuilder_ == null) {
if (((bitField0_ & 0x00000040) != 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_ |= 0x00000040;
onChanged();
}
return this;
}
/**
*
* Parameters to set the fuzziness of the query
*
*
* .luceneserver.FuzzyParams fuzzyParams = 7;
*/
public Builder clearFuzzyParams() {
bitField0_ = (bitField0_ & ~0x00000040);
fuzzyParams_ = null;
if (fuzzyParamsBuilder_ != null) {
fuzzyParamsBuilder_.dispose();
fuzzyParamsBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Parameters to set the fuzziness of the query
*
*
* .luceneserver.FuzzyParams fuzzyParams = 7;
*/
public com.yelp.nrtsearch.server.grpc.FuzzyParams.Builder getFuzzyParamsBuilder() {
bitField0_ |= 0x00000040;
onChanged();
return getFuzzyParamsFieldBuilder().getBuilder();
}
/**
*
* Parameters to set the fuzziness of the query
*
*
* .luceneserver.FuzzyParams fuzzyParams = 7;
*/
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 = 7;
*/
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_;
}
private float tieBreakerMultiplier_ ;
/**
*
* The score of each non-maximum match query disjunct for a document will be multiplied by this weight and added into the final score.
*
*
* float tieBreakerMultiplier = 8;
* @return The tieBreakerMultiplier.
*/
@java.lang.Override
public float getTieBreakerMultiplier() {
return tieBreakerMultiplier_;
}
/**
*
* The score of each non-maximum match query disjunct for a document will be multiplied by this weight and added into the final score.
*
*
* float tieBreakerMultiplier = 8;
* @param value The tieBreakerMultiplier to set.
* @return This builder for chaining.
*/
public Builder setTieBreakerMultiplier(float value) {
tieBreakerMultiplier_ = value;
bitField0_ |= 0x00000080;
onChanged();
return this;
}
/**
*
* The score of each non-maximum match query disjunct for a document will be multiplied by this weight and added into the final score.
*
*
* float tieBreakerMultiplier = 8;
* @return This builder for chaining.
*/
public Builder clearTieBreakerMultiplier() {
bitField0_ = (bitField0_ & ~0x00000080);
tieBreakerMultiplier_ = 0F;
onChanged();
return this;
}
private int type_ = 0;
/**
*
* Type defining match behavior of query.
*
*
* .luceneserver.MultiMatchQuery.MatchType type = 9;
* @return The enum numeric value on the wire for type.
*/
@java.lang.Override public int getTypeValue() {
return type_;
}
/**
*
* Type defining match behavior of query.
*
*
* .luceneserver.MultiMatchQuery.MatchType type = 9;
* @param value The enum numeric value on the wire for type to set.
* @return This builder for chaining.
*/
public Builder setTypeValue(int value) {
type_ = value;
bitField0_ |= 0x00000100;
onChanged();
return this;
}
/**
*
* Type defining match behavior of query.
*
*
* .luceneserver.MultiMatchQuery.MatchType type = 9;
* @return The type.
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.MultiMatchQuery.MatchType getType() {
com.yelp.nrtsearch.server.grpc.MultiMatchQuery.MatchType result = com.yelp.nrtsearch.server.grpc.MultiMatchQuery.MatchType.forNumber(type_);
return result == null ? com.yelp.nrtsearch.server.grpc.MultiMatchQuery.MatchType.UNRECOGNIZED : result;
}
/**
*
* Type defining match behavior of query.
*
*
* .luceneserver.MultiMatchQuery.MatchType type = 9;
* @param value The type to set.
* @return This builder for chaining.
*/
public Builder setType(com.yelp.nrtsearch.server.grpc.MultiMatchQuery.MatchType value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000100;
type_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Type defining match behavior of query.
*
*
* .luceneserver.MultiMatchQuery.MatchType type = 9;
* @return This builder for chaining.
*/
public Builder clearType() {
bitField0_ = (bitField0_ & ~0x00000100);
type_ = 0;
onChanged();
return this;
}
private int slop_ ;
/**
*
* Edit distance between respective positions of tokens generated by analyzing this query and the positions of terms in a document, applies to PHRASE_PREFIX type matching.
*
*
* int32 slop = 10;
* @return The slop.
*/
@java.lang.Override
public int getSlop() {
return slop_;
}
/**
*
* Edit distance between respective positions of tokens generated by analyzing this query and the positions of terms in a document, applies to PHRASE_PREFIX type matching.
*
*
* int32 slop = 10;
* @param value The slop to set.
* @return This builder for chaining.
*/
public Builder setSlop(int value) {
slop_ = value;
bitField0_ |= 0x00000200;
onChanged();
return this;
}
/**
*
* Edit distance between respective positions of tokens generated by analyzing this query and the positions of terms in a document, applies to PHRASE_PREFIX type matching.
*
*
* int32 slop = 10;
* @return This builder for chaining.
*/
public Builder clearSlop() {
bitField0_ = (bitField0_ & ~0x00000200);
slop_ = 0;
onChanged();
return this;
}
private int maxExpansions_ ;
/**
*
* Maximum number of terms to which the prefix token will expand when using PHRASE_PREFIX matching. Defaults to 50.
*
*
* int32 maxExpansions = 11;
* @return The maxExpansions.
*/
@java.lang.Override
public int getMaxExpansions() {
return maxExpansions_;
}
/**
*
* Maximum number of terms to which the prefix token will expand when using PHRASE_PREFIX matching. Defaults to 50.
*
*
* int32 maxExpansions = 11;
* @param value The maxExpansions to set.
* @return This builder for chaining.
*/
public Builder setMaxExpansions(int value) {
maxExpansions_ = value;
bitField0_ |= 0x00000400;
onChanged();
return this;
}
/**
*
* Maximum number of terms to which the prefix token will expand when using PHRASE_PREFIX matching. Defaults to 50.
*
*
* int32 maxExpansions = 11;
* @return This builder for chaining.
*/
public Builder clearMaxExpansions() {
bitField0_ = (bitField0_ & ~0x00000400);
maxExpansions_ = 0;
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.MultiMatchQuery)
}
// @@protoc_insertion_point(class_scope:luceneserver.MultiMatchQuery)
private static final com.yelp.nrtsearch.server.grpc.MultiMatchQuery DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.yelp.nrtsearch.server.grpc.MultiMatchQuery();
}
public static com.yelp.nrtsearch.server.grpc.MultiMatchQuery getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public MultiMatchQuery 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.MultiMatchQuery getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}