com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery 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 to modify the score of documents with a given set of functions
*
*
* Protobuf type {@code luceneserver.MultiFunctionScoreQuery}
*/
public final class MultiFunctionScoreQuery extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:luceneserver.MultiFunctionScoreQuery)
MultiFunctionScoreQueryOrBuilder {
private static final long serialVersionUID = 0L;
// Use MultiFunctionScoreQuery.newBuilder() to construct.
private MultiFunctionScoreQuery(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private MultiFunctionScoreQuery() {
functions_ = java.util.Collections.emptyList();
scoreMode_ = 0;
boostMode_ = 0;
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new MultiFunctionScoreQuery();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_MultiFunctionScoreQuery_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_MultiFunctionScoreQuery_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.class, com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.Builder.class);
}
/**
* Protobuf enum {@code luceneserver.MultiFunctionScoreQuery.DecayType}
*/
public enum DecayType
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* Exponential decay function
*
*
* DECAY_TYPE_EXPONENTIAL = 0;
*/
DECAY_TYPE_EXPONENTIAL(0),
/**
*
* Linear decay function
*
*
* DECAY_TYPE_LINEAR = 1;
*/
DECAY_TYPE_LINEAR(1),
/**
*
* Gaussian decay function
*
*
* DECAY_TYPE_GUASSIAN = 2;
*/
DECAY_TYPE_GUASSIAN(2),
UNRECOGNIZED(-1),
;
/**
*
* Exponential decay function
*
*
* DECAY_TYPE_EXPONENTIAL = 0;
*/
public static final int DECAY_TYPE_EXPONENTIAL_VALUE = 0;
/**
*
* Linear decay function
*
*
* DECAY_TYPE_LINEAR = 1;
*/
public static final int DECAY_TYPE_LINEAR_VALUE = 1;
/**
*
* Gaussian decay function
*
*
* DECAY_TYPE_GUASSIAN = 2;
*/
public static final int DECAY_TYPE_GUASSIAN_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 DecayType 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 DecayType forNumber(int value) {
switch (value) {
case 0: return DECAY_TYPE_EXPONENTIAL;
case 1: return DECAY_TYPE_LINEAR;
case 2: return DECAY_TYPE_GUASSIAN;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
DecayType> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public DecayType findValueByNumber(int number) {
return DecayType.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.MultiFunctionScoreQuery.getDescriptor().getEnumTypes().get(0);
}
private static final DecayType[] VALUES = values();
public static DecayType 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 DecayType(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:luceneserver.MultiFunctionScoreQuery.DecayType)
}
/**
*
* How to combine multiple function scores to produce a final function score
*
*
* Protobuf enum {@code luceneserver.MultiFunctionScoreQuery.FunctionScoreMode}
*/
public enum FunctionScoreMode
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* Multiply weighted function scores together
*
*
* SCORE_MODE_MULTIPLY = 0;
*/
SCORE_MODE_MULTIPLY(0),
/**
*
* Add weighted function scores together
*
*
* SCORE_MODE_SUM = 1;
*/
SCORE_MODE_SUM(1),
UNRECOGNIZED(-1),
;
/**
*
* Multiply weighted function scores together
*
*
* SCORE_MODE_MULTIPLY = 0;
*/
public static final int SCORE_MODE_MULTIPLY_VALUE = 0;
/**
*
* Add weighted function scores together
*
*
* SCORE_MODE_SUM = 1;
*/
public static final int SCORE_MODE_SUM_VALUE = 1;
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 FunctionScoreMode 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 FunctionScoreMode forNumber(int value) {
switch (value) {
case 0: return SCORE_MODE_MULTIPLY;
case 1: return SCORE_MODE_SUM;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
FunctionScoreMode> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public FunctionScoreMode findValueByNumber(int number) {
return FunctionScoreMode.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.MultiFunctionScoreQuery.getDescriptor().getEnumTypes().get(1);
}
private static final FunctionScoreMode[] VALUES = values();
public static FunctionScoreMode 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 FunctionScoreMode(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:luceneserver.MultiFunctionScoreQuery.FunctionScoreMode)
}
/**
*
* How to combine final function score with query score
*
*
* Protobuf enum {@code luceneserver.MultiFunctionScoreQuery.BoostMode}
*/
public enum BoostMode
implements com.google.protobuf.ProtocolMessageEnum {
/**
*
* Multiply scores together
*
*
* BOOST_MODE_MULTIPLY = 0;
*/
BOOST_MODE_MULTIPLY(0),
/**
*
* Add scores together
*
*
* BOOST_MODE_SUM = 1;
*/
BOOST_MODE_SUM(1),
/**
*
* Ignore the query score, and use the function score only
*
*
* BOOST_MODE_REPLACE = 2;
*/
BOOST_MODE_REPLACE(2),
UNRECOGNIZED(-1),
;
/**
*
* Multiply scores together
*
*
* BOOST_MODE_MULTIPLY = 0;
*/
public static final int BOOST_MODE_MULTIPLY_VALUE = 0;
/**
*
* Add scores together
*
*
* BOOST_MODE_SUM = 1;
*/
public static final int BOOST_MODE_SUM_VALUE = 1;
/**
*
* Ignore the query score, and use the function score only
*
*
* BOOST_MODE_REPLACE = 2;
*/
public static final int BOOST_MODE_REPLACE_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 BoostMode 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 BoostMode forNumber(int value) {
switch (value) {
case 0: return BOOST_MODE_MULTIPLY;
case 1: return BOOST_MODE_SUM;
case 2: return BOOST_MODE_REPLACE;
default: return null;
}
}
public static com.google.protobuf.Internal.EnumLiteMap
internalGetValueMap() {
return internalValueMap;
}
private static final com.google.protobuf.Internal.EnumLiteMap<
BoostMode> internalValueMap =
new com.google.protobuf.Internal.EnumLiteMap() {
public BoostMode findValueByNumber(int number) {
return BoostMode.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.MultiFunctionScoreQuery.getDescriptor().getEnumTypes().get(2);
}
private static final BoostMode[] VALUES = values();
public static BoostMode 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 BoostMode(int value) {
this.value = value;
}
// @@protoc_insertion_point(enum_scope:luceneserver.MultiFunctionScoreQuery.BoostMode)
}
public interface FilterFunctionOrBuilder extends
// @@protoc_insertion_point(interface_extends:luceneserver.MultiFunctionScoreQuery.FilterFunction)
com.google.protobuf.MessageOrBuilder {
/**
*
* Apply function only to docs that pass this filter, match all if not specified
*
*
* .luceneserver.Query filter = 1;
* @return Whether the filter field is set.
*/
boolean hasFilter();
/**
*
* Apply function only to docs that pass this filter, match all if not specified
*
*
* .luceneserver.Query filter = 1;
* @return The filter.
*/
com.yelp.nrtsearch.server.grpc.Query getFilter();
/**
*
* Apply function only to docs that pass this filter, match all if not specified
*
*
* .luceneserver.Query filter = 1;
*/
com.yelp.nrtsearch.server.grpc.QueryOrBuilder getFilterOrBuilder();
/**
*
* Weight to multiply with function score, 1.0 if not specified
*
*
* float weight = 2;
* @return The weight.
*/
float getWeight();
/**
*
* Produce score with score script definition
*
*
* .luceneserver.Script script = 3;
* @return Whether the script field is set.
*/
boolean hasScript();
/**
*
* Produce score with score script definition
*
*
* .luceneserver.Script script = 3;
* @return The script.
*/
com.yelp.nrtsearch.server.grpc.Script getScript();
/**
*
* Produce score with score script definition
*
*
* .luceneserver.Script script = 3;
*/
com.yelp.nrtsearch.server.grpc.ScriptOrBuilder getScriptOrBuilder();
/**
*
* Produce score with a decay function
*
*
* .luceneserver.MultiFunctionScoreQuery.DecayFunction decayFunction = 4;
* @return Whether the decayFunction field is set.
*/
boolean hasDecayFunction();
/**
*
* Produce score with a decay function
*
*
* .luceneserver.MultiFunctionScoreQuery.DecayFunction decayFunction = 4;
* @return The decayFunction.
*/
com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction getDecayFunction();
/**
*
* Produce score with a decay function
*
*
* .luceneserver.MultiFunctionScoreQuery.DecayFunction decayFunction = 4;
*/
com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunctionOrBuilder getDecayFunctionOrBuilder();
com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction.FunctionCase getFunctionCase();
}
/**
*
* Function to produce a weighted value
*
*
* Protobuf type {@code luceneserver.MultiFunctionScoreQuery.FilterFunction}
*/
public static final class FilterFunction extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:luceneserver.MultiFunctionScoreQuery.FilterFunction)
FilterFunctionOrBuilder {
private static final long serialVersionUID = 0L;
// Use FilterFunction.newBuilder() to construct.
private FilterFunction(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private FilterFunction() {
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new FilterFunction();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_MultiFunctionScoreQuery_FilterFunction_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_MultiFunctionScoreQuery_FilterFunction_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction.class, com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction.Builder.class);
}
private int bitField0_;
private int functionCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object function_;
public enum FunctionCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
SCRIPT(3),
DECAYFUNCTION(4),
FUNCTION_NOT_SET(0);
private final int value;
private FunctionCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static FunctionCase valueOf(int value) {
return forNumber(value);
}
public static FunctionCase forNumber(int value) {
switch (value) {
case 3: return SCRIPT;
case 4: return DECAYFUNCTION;
case 0: return FUNCTION_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public FunctionCase
getFunctionCase() {
return FunctionCase.forNumber(
functionCase_);
}
public static final int FILTER_FIELD_NUMBER = 1;
private com.yelp.nrtsearch.server.grpc.Query filter_;
/**
*
* Apply function only to docs that pass this filter, match all if not specified
*
*
* .luceneserver.Query filter = 1;
* @return Whether the filter field is set.
*/
@java.lang.Override
public boolean hasFilter() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Apply function only to docs that pass this filter, match all if not specified
*
*
* .luceneserver.Query filter = 1;
* @return The filter.
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.Query getFilter() {
return filter_ == null ? com.yelp.nrtsearch.server.grpc.Query.getDefaultInstance() : filter_;
}
/**
*
* Apply function only to docs that pass this filter, match all if not specified
*
*
* .luceneserver.Query filter = 1;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.QueryOrBuilder getFilterOrBuilder() {
return filter_ == null ? com.yelp.nrtsearch.server.grpc.Query.getDefaultInstance() : filter_;
}
public static final int WEIGHT_FIELD_NUMBER = 2;
private float weight_ = 0F;
/**
*
* Weight to multiply with function score, 1.0 if not specified
*
*
* float weight = 2;
* @return The weight.
*/
@java.lang.Override
public float getWeight() {
return weight_;
}
public static final int SCRIPT_FIELD_NUMBER = 3;
/**
*
* Produce score with score script definition
*
*
* .luceneserver.Script script = 3;
* @return Whether the script field is set.
*/
@java.lang.Override
public boolean hasScript() {
return functionCase_ == 3;
}
/**
*
* Produce score with score script definition
*
*
* .luceneserver.Script script = 3;
* @return The script.
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.Script getScript() {
if (functionCase_ == 3) {
return (com.yelp.nrtsearch.server.grpc.Script) function_;
}
return com.yelp.nrtsearch.server.grpc.Script.getDefaultInstance();
}
/**
*
* Produce score with score script definition
*
*
* .luceneserver.Script script = 3;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.ScriptOrBuilder getScriptOrBuilder() {
if (functionCase_ == 3) {
return (com.yelp.nrtsearch.server.grpc.Script) function_;
}
return com.yelp.nrtsearch.server.grpc.Script.getDefaultInstance();
}
public static final int DECAYFUNCTION_FIELD_NUMBER = 4;
/**
*
* Produce score with a decay function
*
*
* .luceneserver.MultiFunctionScoreQuery.DecayFunction decayFunction = 4;
* @return Whether the decayFunction field is set.
*/
@java.lang.Override
public boolean hasDecayFunction() {
return functionCase_ == 4;
}
/**
*
* Produce score with a decay function
*
*
* .luceneserver.MultiFunctionScoreQuery.DecayFunction decayFunction = 4;
* @return The decayFunction.
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction getDecayFunction() {
if (functionCase_ == 4) {
return (com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction) function_;
}
return com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction.getDefaultInstance();
}
/**
*
* Produce score with a decay function
*
*
* .luceneserver.MultiFunctionScoreQuery.DecayFunction decayFunction = 4;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunctionOrBuilder getDecayFunctionOrBuilder() {
if (functionCase_ == 4) {
return (com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction) function_;
}
return com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction.getDefaultInstance();
}
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 (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(1, getFilter());
}
if (java.lang.Float.floatToRawIntBits(weight_) != 0) {
output.writeFloat(2, weight_);
}
if (functionCase_ == 3) {
output.writeMessage(3, (com.yelp.nrtsearch.server.grpc.Script) function_);
}
if (functionCase_ == 4) {
output.writeMessage(4, (com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction) function_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getFilter());
}
if (java.lang.Float.floatToRawIntBits(weight_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(2, weight_);
}
if (functionCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, (com.yelp.nrtsearch.server.grpc.Script) function_);
}
if (functionCase_ == 4) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(4, (com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction) function_);
}
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.MultiFunctionScoreQuery.FilterFunction)) {
return super.equals(obj);
}
com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction other = (com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction) obj;
if (hasFilter() != other.hasFilter()) return false;
if (hasFilter()) {
if (!getFilter()
.equals(other.getFilter())) return false;
}
if (java.lang.Float.floatToIntBits(getWeight())
!= java.lang.Float.floatToIntBits(
other.getWeight())) return false;
if (!getFunctionCase().equals(other.getFunctionCase())) return false;
switch (functionCase_) {
case 3:
if (!getScript()
.equals(other.getScript())) return false;
break;
case 4:
if (!getDecayFunction()
.equals(other.getDecayFunction())) return false;
break;
case 0:
default:
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
if (hasFilter()) {
hash = (37 * hash) + FILTER_FIELD_NUMBER;
hash = (53 * hash) + getFilter().hashCode();
}
hash = (37 * hash) + WEIGHT_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(
getWeight());
switch (functionCase_) {
case 3:
hash = (37 * hash) + SCRIPT_FIELD_NUMBER;
hash = (53 * hash) + getScript().hashCode();
break;
case 4:
hash = (37 * hash) + DECAYFUNCTION_FIELD_NUMBER;
hash = (53 * hash) + getDecayFunction().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction 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.MultiFunctionScoreQuery.FilterFunction parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction 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.MultiFunctionScoreQuery.FilterFunction parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction 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.MultiFunctionScoreQuery.FilterFunction parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction 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.MultiFunctionScoreQuery.FilterFunction parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction 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.MultiFunctionScoreQuery.FilterFunction 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.MultiFunctionScoreQuery.FilterFunction 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.MultiFunctionScoreQuery.FilterFunction 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;
}
/**
*
* Function to produce a weighted value
*
*
* Protobuf type {@code luceneserver.MultiFunctionScoreQuery.FilterFunction}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:luceneserver.MultiFunctionScoreQuery.FilterFunction)
com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunctionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_MultiFunctionScoreQuery_FilterFunction_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_MultiFunctionScoreQuery_FilterFunction_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction.class, com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction.Builder.class);
}
// Construct using com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getFilterFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
filter_ = null;
if (filterBuilder_ != null) {
filterBuilder_.dispose();
filterBuilder_ = null;
}
weight_ = 0F;
if (scriptBuilder_ != null) {
scriptBuilder_.clear();
}
if (decayFunctionBuilder_ != null) {
decayFunctionBuilder_.clear();
}
functionCase_ = 0;
function_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_MultiFunctionScoreQuery_FilterFunction_descriptor;
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction getDefaultInstanceForType() {
return com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction.getDefaultInstance();
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction build() {
com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction buildPartial() {
com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction result = new com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction(this);
if (bitField0_ != 0) { buildPartial0(result); }
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.filter_ = filterBuilder_ == null
? filter_
: filterBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.weight_ = weight_;
}
result.bitField0_ |= to_bitField0_;
}
private void buildPartialOneofs(com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction result) {
result.functionCase_ = functionCase_;
result.function_ = this.function_;
if (functionCase_ == 3 &&
scriptBuilder_ != null) {
result.function_ = scriptBuilder_.build();
}
if (functionCase_ == 4 &&
decayFunctionBuilder_ != null) {
result.function_ = decayFunctionBuilder_.build();
}
}
@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.MultiFunctionScoreQuery.FilterFunction) {
return mergeFrom((com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction other) {
if (other == com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction.getDefaultInstance()) return this;
if (other.hasFilter()) {
mergeFilter(other.getFilter());
}
if (other.getWeight() != 0F) {
setWeight(other.getWeight());
}
switch (other.getFunctionCase()) {
case SCRIPT: {
mergeScript(other.getScript());
break;
}
case DECAYFUNCTION: {
mergeDecayFunction(other.getDecayFunction());
break;
}
case FUNCTION_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
input.readMessage(
getFilterFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 21: {
weight_ = input.readFloat();
bitField0_ |= 0x00000002;
break;
} // case 21
case 26: {
input.readMessage(
getScriptFieldBuilder().getBuilder(),
extensionRegistry);
functionCase_ = 3;
break;
} // case 26
case 34: {
input.readMessage(
getDecayFunctionFieldBuilder().getBuilder(),
extensionRegistry);
functionCase_ = 4;
break;
} // case 34
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 functionCase_ = 0;
private java.lang.Object function_;
public FunctionCase
getFunctionCase() {
return FunctionCase.forNumber(
functionCase_);
}
public Builder clearFunction() {
functionCase_ = 0;
function_ = null;
onChanged();
return this;
}
private int bitField0_;
private com.yelp.nrtsearch.server.grpc.Query filter_;
private com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.Query, com.yelp.nrtsearch.server.grpc.Query.Builder, com.yelp.nrtsearch.server.grpc.QueryOrBuilder> filterBuilder_;
/**
*
* Apply function only to docs that pass this filter, match all if not specified
*
*
* .luceneserver.Query filter = 1;
* @return Whether the filter field is set.
*/
public boolean hasFilter() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Apply function only to docs that pass this filter, match all if not specified
*
*
* .luceneserver.Query filter = 1;
* @return The filter.
*/
public com.yelp.nrtsearch.server.grpc.Query getFilter() {
if (filterBuilder_ == null) {
return filter_ == null ? com.yelp.nrtsearch.server.grpc.Query.getDefaultInstance() : filter_;
} else {
return filterBuilder_.getMessage();
}
}
/**
*
* Apply function only to docs that pass this filter, match all if not specified
*
*
* .luceneserver.Query filter = 1;
*/
public Builder setFilter(com.yelp.nrtsearch.server.grpc.Query value) {
if (filterBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
filter_ = value;
} else {
filterBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Apply function only to docs that pass this filter, match all if not specified
*
*
* .luceneserver.Query filter = 1;
*/
public Builder setFilter(
com.yelp.nrtsearch.server.grpc.Query.Builder builderForValue) {
if (filterBuilder_ == null) {
filter_ = builderForValue.build();
} else {
filterBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Apply function only to docs that pass this filter, match all if not specified
*
*
* .luceneserver.Query filter = 1;
*/
public Builder mergeFilter(com.yelp.nrtsearch.server.grpc.Query value) {
if (filterBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
filter_ != null &&
filter_ != com.yelp.nrtsearch.server.grpc.Query.getDefaultInstance()) {
getFilterBuilder().mergeFrom(value);
} else {
filter_ = value;
}
} else {
filterBuilder_.mergeFrom(value);
}
if (filter_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
* Apply function only to docs that pass this filter, match all if not specified
*
*
* .luceneserver.Query filter = 1;
*/
public Builder clearFilter() {
bitField0_ = (bitField0_ & ~0x00000001);
filter_ = null;
if (filterBuilder_ != null) {
filterBuilder_.dispose();
filterBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Apply function only to docs that pass this filter, match all if not specified
*
*
* .luceneserver.Query filter = 1;
*/
public com.yelp.nrtsearch.server.grpc.Query.Builder getFilterBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getFilterFieldBuilder().getBuilder();
}
/**
*
* Apply function only to docs that pass this filter, match all if not specified
*
*
* .luceneserver.Query filter = 1;
*/
public com.yelp.nrtsearch.server.grpc.QueryOrBuilder getFilterOrBuilder() {
if (filterBuilder_ != null) {
return filterBuilder_.getMessageOrBuilder();
} else {
return filter_ == null ?
com.yelp.nrtsearch.server.grpc.Query.getDefaultInstance() : filter_;
}
}
/**
*
* Apply function only to docs that pass this filter, match all if not specified
*
*
* .luceneserver.Query filter = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.Query, com.yelp.nrtsearch.server.grpc.Query.Builder, com.yelp.nrtsearch.server.grpc.QueryOrBuilder>
getFilterFieldBuilder() {
if (filterBuilder_ == null) {
filterBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.Query, com.yelp.nrtsearch.server.grpc.Query.Builder, com.yelp.nrtsearch.server.grpc.QueryOrBuilder>(
getFilter(),
getParentForChildren(),
isClean());
filter_ = null;
}
return filterBuilder_;
}
private float weight_ ;
/**
*
* Weight to multiply with function score, 1.0 if not specified
*
*
* float weight = 2;
* @return The weight.
*/
@java.lang.Override
public float getWeight() {
return weight_;
}
/**
*
* Weight to multiply with function score, 1.0 if not specified
*
*
* float weight = 2;
* @param value The weight to set.
* @return This builder for chaining.
*/
public Builder setWeight(float value) {
weight_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Weight to multiply with function score, 1.0 if not specified
*
*
* float weight = 2;
* @return This builder for chaining.
*/
public Builder clearWeight() {
bitField0_ = (bitField0_ & ~0x00000002);
weight_ = 0F;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.Script, com.yelp.nrtsearch.server.grpc.Script.Builder, com.yelp.nrtsearch.server.grpc.ScriptOrBuilder> scriptBuilder_;
/**
*
* Produce score with score script definition
*
*
* .luceneserver.Script script = 3;
* @return Whether the script field is set.
*/
@java.lang.Override
public boolean hasScript() {
return functionCase_ == 3;
}
/**
*
* Produce score with score script definition
*
*
* .luceneserver.Script script = 3;
* @return The script.
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.Script getScript() {
if (scriptBuilder_ == null) {
if (functionCase_ == 3) {
return (com.yelp.nrtsearch.server.grpc.Script) function_;
}
return com.yelp.nrtsearch.server.grpc.Script.getDefaultInstance();
} else {
if (functionCase_ == 3) {
return scriptBuilder_.getMessage();
}
return com.yelp.nrtsearch.server.grpc.Script.getDefaultInstance();
}
}
/**
*
* Produce score with score script definition
*
*
* .luceneserver.Script script = 3;
*/
public Builder setScript(com.yelp.nrtsearch.server.grpc.Script value) {
if (scriptBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
function_ = value;
onChanged();
} else {
scriptBuilder_.setMessage(value);
}
functionCase_ = 3;
return this;
}
/**
*
* Produce score with score script definition
*
*
* .luceneserver.Script script = 3;
*/
public Builder setScript(
com.yelp.nrtsearch.server.grpc.Script.Builder builderForValue) {
if (scriptBuilder_ == null) {
function_ = builderForValue.build();
onChanged();
} else {
scriptBuilder_.setMessage(builderForValue.build());
}
functionCase_ = 3;
return this;
}
/**
*
* Produce score with score script definition
*
*
* .luceneserver.Script script = 3;
*/
public Builder mergeScript(com.yelp.nrtsearch.server.grpc.Script value) {
if (scriptBuilder_ == null) {
if (functionCase_ == 3 &&
function_ != com.yelp.nrtsearch.server.grpc.Script.getDefaultInstance()) {
function_ = com.yelp.nrtsearch.server.grpc.Script.newBuilder((com.yelp.nrtsearch.server.grpc.Script) function_)
.mergeFrom(value).buildPartial();
} else {
function_ = value;
}
onChanged();
} else {
if (functionCase_ == 3) {
scriptBuilder_.mergeFrom(value);
} else {
scriptBuilder_.setMessage(value);
}
}
functionCase_ = 3;
return this;
}
/**
*
* Produce score with score script definition
*
*
* .luceneserver.Script script = 3;
*/
public Builder clearScript() {
if (scriptBuilder_ == null) {
if (functionCase_ == 3) {
functionCase_ = 0;
function_ = null;
onChanged();
}
} else {
if (functionCase_ == 3) {
functionCase_ = 0;
function_ = null;
}
scriptBuilder_.clear();
}
return this;
}
/**
*
* Produce score with score script definition
*
*
* .luceneserver.Script script = 3;
*/
public com.yelp.nrtsearch.server.grpc.Script.Builder getScriptBuilder() {
return getScriptFieldBuilder().getBuilder();
}
/**
*
* Produce score with score script definition
*
*
* .luceneserver.Script script = 3;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.ScriptOrBuilder getScriptOrBuilder() {
if ((functionCase_ == 3) && (scriptBuilder_ != null)) {
return scriptBuilder_.getMessageOrBuilder();
} else {
if (functionCase_ == 3) {
return (com.yelp.nrtsearch.server.grpc.Script) function_;
}
return com.yelp.nrtsearch.server.grpc.Script.getDefaultInstance();
}
}
/**
*
* Produce score with score script definition
*
*
* .luceneserver.Script script = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.Script, com.yelp.nrtsearch.server.grpc.Script.Builder, com.yelp.nrtsearch.server.grpc.ScriptOrBuilder>
getScriptFieldBuilder() {
if (scriptBuilder_ == null) {
if (!(functionCase_ == 3)) {
function_ = com.yelp.nrtsearch.server.grpc.Script.getDefaultInstance();
}
scriptBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.Script, com.yelp.nrtsearch.server.grpc.Script.Builder, com.yelp.nrtsearch.server.grpc.ScriptOrBuilder>(
(com.yelp.nrtsearch.server.grpc.Script) function_,
getParentForChildren(),
isClean());
function_ = null;
}
functionCase_ = 3;
onChanged();
return scriptBuilder_;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction, com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction.Builder, com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunctionOrBuilder> decayFunctionBuilder_;
/**
*
* Produce score with a decay function
*
*
* .luceneserver.MultiFunctionScoreQuery.DecayFunction decayFunction = 4;
* @return Whether the decayFunction field is set.
*/
@java.lang.Override
public boolean hasDecayFunction() {
return functionCase_ == 4;
}
/**
*
* Produce score with a decay function
*
*
* .luceneserver.MultiFunctionScoreQuery.DecayFunction decayFunction = 4;
* @return The decayFunction.
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction getDecayFunction() {
if (decayFunctionBuilder_ == null) {
if (functionCase_ == 4) {
return (com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction) function_;
}
return com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction.getDefaultInstance();
} else {
if (functionCase_ == 4) {
return decayFunctionBuilder_.getMessage();
}
return com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction.getDefaultInstance();
}
}
/**
*
* Produce score with a decay function
*
*
* .luceneserver.MultiFunctionScoreQuery.DecayFunction decayFunction = 4;
*/
public Builder setDecayFunction(com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction value) {
if (decayFunctionBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
function_ = value;
onChanged();
} else {
decayFunctionBuilder_.setMessage(value);
}
functionCase_ = 4;
return this;
}
/**
*
* Produce score with a decay function
*
*
* .luceneserver.MultiFunctionScoreQuery.DecayFunction decayFunction = 4;
*/
public Builder setDecayFunction(
com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction.Builder builderForValue) {
if (decayFunctionBuilder_ == null) {
function_ = builderForValue.build();
onChanged();
} else {
decayFunctionBuilder_.setMessage(builderForValue.build());
}
functionCase_ = 4;
return this;
}
/**
*
* Produce score with a decay function
*
*
* .luceneserver.MultiFunctionScoreQuery.DecayFunction decayFunction = 4;
*/
public Builder mergeDecayFunction(com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction value) {
if (decayFunctionBuilder_ == null) {
if (functionCase_ == 4 &&
function_ != com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction.getDefaultInstance()) {
function_ = com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction.newBuilder((com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction) function_)
.mergeFrom(value).buildPartial();
} else {
function_ = value;
}
onChanged();
} else {
if (functionCase_ == 4) {
decayFunctionBuilder_.mergeFrom(value);
} else {
decayFunctionBuilder_.setMessage(value);
}
}
functionCase_ = 4;
return this;
}
/**
*
* Produce score with a decay function
*
*
* .luceneserver.MultiFunctionScoreQuery.DecayFunction decayFunction = 4;
*/
public Builder clearDecayFunction() {
if (decayFunctionBuilder_ == null) {
if (functionCase_ == 4) {
functionCase_ = 0;
function_ = null;
onChanged();
}
} else {
if (functionCase_ == 4) {
functionCase_ = 0;
function_ = null;
}
decayFunctionBuilder_.clear();
}
return this;
}
/**
*
* Produce score with a decay function
*
*
* .luceneserver.MultiFunctionScoreQuery.DecayFunction decayFunction = 4;
*/
public com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction.Builder getDecayFunctionBuilder() {
return getDecayFunctionFieldBuilder().getBuilder();
}
/**
*
* Produce score with a decay function
*
*
* .luceneserver.MultiFunctionScoreQuery.DecayFunction decayFunction = 4;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunctionOrBuilder getDecayFunctionOrBuilder() {
if ((functionCase_ == 4) && (decayFunctionBuilder_ != null)) {
return decayFunctionBuilder_.getMessageOrBuilder();
} else {
if (functionCase_ == 4) {
return (com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction) function_;
}
return com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction.getDefaultInstance();
}
}
/**
*
* Produce score with a decay function
*
*
* .luceneserver.MultiFunctionScoreQuery.DecayFunction decayFunction = 4;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction, com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction.Builder, com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunctionOrBuilder>
getDecayFunctionFieldBuilder() {
if (decayFunctionBuilder_ == null) {
if (!(functionCase_ == 4)) {
function_ = com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction.getDefaultInstance();
}
decayFunctionBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction, com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction.Builder, com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunctionOrBuilder>(
(com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction) function_,
getParentForChildren(),
isClean());
function_ = null;
}
functionCase_ = 4;
onChanged();
return decayFunctionBuilder_;
}
@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.MultiFunctionScoreQuery.FilterFunction)
}
// @@protoc_insertion_point(class_scope:luceneserver.MultiFunctionScoreQuery.FilterFunction)
private static final com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction();
}
public static com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public FilterFunction 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.MultiFunctionScoreQuery.FilterFunction getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
public interface DecayFunctionOrBuilder extends
// @@protoc_insertion_point(interface_extends:luceneserver.MultiFunctionScoreQuery.DecayFunction)
com.google.protobuf.MessageOrBuilder {
/**
*
* Document field name to use
*
*
* string fieldName = 1;
* @return The fieldName.
*/
java.lang.String getFieldName();
/**
*
* Document field name to use
*
*
* string fieldName = 1;
* @return The bytes for fieldName.
*/
com.google.protobuf.ByteString
getFieldNameBytes();
/**
*
* Type of decay function to apply
*
*
* .luceneserver.MultiFunctionScoreQuery.DecayType decayType = 2;
* @return The enum numeric value on the wire for decayType.
*/
int getDecayTypeValue();
/**
*
* Type of decay function to apply
*
*
* .luceneserver.MultiFunctionScoreQuery.DecayType decayType = 2;
* @return The decayType.
*/
com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayType getDecayType();
/**
* .google.type.LatLng geoPoint = 3;
* @return Whether the geoPoint field is set.
*/
boolean hasGeoPoint();
/**
* .google.type.LatLng geoPoint = 3;
* @return The geoPoint.
*/
com.google.type.LatLng getGeoPoint();
/**
* .google.type.LatLng geoPoint = 3;
*/
com.google.type.LatLngOrBuilder getGeoPointOrBuilder();
/**
*
* Currently only distance based scale and offset units are supported
* Distance from origin + offset at which computed score will be equal to decay. Scale should be distance, unit (m, km, mi) with space is optional. Default unit will be meters. Ex: "10", "15 km", "5 m", "7 mi"
*
*
* string scale = 4;
* @return The scale.
*/
java.lang.String getScale();
/**
*
* Currently only distance based scale and offset units are supported
* Distance from origin + offset at which computed score will be equal to decay. Scale should be distance, unit (m, km, mi) with space is optional. Default unit will be meters. Ex: "10", "15 km", "5 m", "7 mi"
*
*
* string scale = 4;
* @return The bytes for scale.
*/
com.google.protobuf.ByteString
getScaleBytes();
/**
*
* Compute decay function for docs with a distance greater than offset, will be 0.0 if none is set. Offset should be distance, unit (m, km, mi) with space is optional. Default unit will be meters. Ex: "10", "15 km", "5 m", "7 mi"
*
*
* string offset = 5;
* @return The offset.
*/
java.lang.String getOffset();
/**
*
* Compute decay function for docs with a distance greater than offset, will be 0.0 if none is set. Offset should be distance, unit (m, km, mi) with space is optional. Default unit will be meters. Ex: "10", "15 km", "5 m", "7 mi"
*
*
* string offset = 5;
* @return The bytes for offset.
*/
com.google.protobuf.ByteString
getOffsetBytes();
/**
*
* Defines decay rate for scoring. Should be between (0, 1)
*
*
* float decay = 6;
* @return The decay.
*/
float getDecay();
com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction.OriginCase getOriginCase();
}
/**
*
* Apply decay function to docs
*
*
* Protobuf type {@code luceneserver.MultiFunctionScoreQuery.DecayFunction}
*/
public static final class DecayFunction extends
com.google.protobuf.GeneratedMessageV3 implements
// @@protoc_insertion_point(message_implements:luceneserver.MultiFunctionScoreQuery.DecayFunction)
DecayFunctionOrBuilder {
private static final long serialVersionUID = 0L;
// Use DecayFunction.newBuilder() to construct.
private DecayFunction(com.google.protobuf.GeneratedMessageV3.Builder> builder) {
super(builder);
}
private DecayFunction() {
fieldName_ = "";
decayType_ = 0;
scale_ = "";
offset_ = "";
}
@java.lang.Override
@SuppressWarnings({"unused"})
protected java.lang.Object newInstance(
UnusedPrivateParameter unused) {
return new DecayFunction();
}
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_MultiFunctionScoreQuery_DecayFunction_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_MultiFunctionScoreQuery_DecayFunction_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction.class, com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction.Builder.class);
}
private int originCase_ = 0;
@SuppressWarnings("serial")
private java.lang.Object origin_;
public enum OriginCase
implements com.google.protobuf.Internal.EnumLite,
com.google.protobuf.AbstractMessage.InternalOneOfEnum {
GEOPOINT(3),
ORIGIN_NOT_SET(0);
private final int value;
private OriginCase(int value) {
this.value = value;
}
/**
* @param value The number of the enum to look for.
* @return The enum associated with the given number.
* @deprecated Use {@link #forNumber(int)} instead.
*/
@java.lang.Deprecated
public static OriginCase valueOf(int value) {
return forNumber(value);
}
public static OriginCase forNumber(int value) {
switch (value) {
case 3: return GEOPOINT;
case 0: return ORIGIN_NOT_SET;
default: return null;
}
}
public int getNumber() {
return this.value;
}
};
public OriginCase
getOriginCase() {
return OriginCase.forNumber(
originCase_);
}
public static final int FIELDNAME_FIELD_NUMBER = 1;
@SuppressWarnings("serial")
private volatile java.lang.Object fieldName_ = "";
/**
*
* Document field name to use
*
*
* string fieldName = 1;
* @return The fieldName.
*/
@java.lang.Override
public java.lang.String getFieldName() {
java.lang.Object ref = fieldName_;
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();
fieldName_ = s;
return s;
}
}
/**
*
* Document field name to use
*
*
* string fieldName = 1;
* @return The bytes for fieldName.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getFieldNameBytes() {
java.lang.Object ref = fieldName_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
fieldName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DECAYTYPE_FIELD_NUMBER = 2;
private int decayType_ = 0;
/**
*
* Type of decay function to apply
*
*
* .luceneserver.MultiFunctionScoreQuery.DecayType decayType = 2;
* @return The enum numeric value on the wire for decayType.
*/
@java.lang.Override public int getDecayTypeValue() {
return decayType_;
}
/**
*
* Type of decay function to apply
*
*
* .luceneserver.MultiFunctionScoreQuery.DecayType decayType = 2;
* @return The decayType.
*/
@java.lang.Override public com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayType getDecayType() {
com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayType result = com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayType.forNumber(decayType_);
return result == null ? com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayType.UNRECOGNIZED : result;
}
public static final int GEOPOINT_FIELD_NUMBER = 3;
/**
* .google.type.LatLng geoPoint = 3;
* @return Whether the geoPoint field is set.
*/
@java.lang.Override
public boolean hasGeoPoint() {
return originCase_ == 3;
}
/**
* .google.type.LatLng geoPoint = 3;
* @return The geoPoint.
*/
@java.lang.Override
public com.google.type.LatLng getGeoPoint() {
if (originCase_ == 3) {
return (com.google.type.LatLng) origin_;
}
return com.google.type.LatLng.getDefaultInstance();
}
/**
* .google.type.LatLng geoPoint = 3;
*/
@java.lang.Override
public com.google.type.LatLngOrBuilder getGeoPointOrBuilder() {
if (originCase_ == 3) {
return (com.google.type.LatLng) origin_;
}
return com.google.type.LatLng.getDefaultInstance();
}
public static final int SCALE_FIELD_NUMBER = 4;
@SuppressWarnings("serial")
private volatile java.lang.Object scale_ = "";
/**
*
* Currently only distance based scale and offset units are supported
* Distance from origin + offset at which computed score will be equal to decay. Scale should be distance, unit (m, km, mi) with space is optional. Default unit will be meters. Ex: "10", "15 km", "5 m", "7 mi"
*
*
* string scale = 4;
* @return The scale.
*/
@java.lang.Override
public java.lang.String getScale() {
java.lang.Object ref = scale_;
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();
scale_ = s;
return s;
}
}
/**
*
* Currently only distance based scale and offset units are supported
* Distance from origin + offset at which computed score will be equal to decay. Scale should be distance, unit (m, km, mi) with space is optional. Default unit will be meters. Ex: "10", "15 km", "5 m", "7 mi"
*
*
* string scale = 4;
* @return The bytes for scale.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getScaleBytes() {
java.lang.Object ref = scale_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
scale_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int OFFSET_FIELD_NUMBER = 5;
@SuppressWarnings("serial")
private volatile java.lang.Object offset_ = "";
/**
*
* Compute decay function for docs with a distance greater than offset, will be 0.0 if none is set. Offset should be distance, unit (m, km, mi) with space is optional. Default unit will be meters. Ex: "10", "15 km", "5 m", "7 mi"
*
*
* string offset = 5;
* @return The offset.
*/
@java.lang.Override
public java.lang.String getOffset() {
java.lang.Object ref = offset_;
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();
offset_ = s;
return s;
}
}
/**
*
* Compute decay function for docs with a distance greater than offset, will be 0.0 if none is set. Offset should be distance, unit (m, km, mi) with space is optional. Default unit will be meters. Ex: "10", "15 km", "5 m", "7 mi"
*
*
* string offset = 5;
* @return The bytes for offset.
*/
@java.lang.Override
public com.google.protobuf.ByteString
getOffsetBytes() {
java.lang.Object ref = offset_;
if (ref instanceof java.lang.String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
offset_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
public static final int DECAY_FIELD_NUMBER = 6;
private float decay_ = 0F;
/**
*
* Defines decay rate for scoring. Should be between (0, 1)
*
*
* float decay = 6;
* @return The decay.
*/
@java.lang.Override
public float getDecay() {
return decay_;
}
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(fieldName_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 1, fieldName_);
}
if (decayType_ != com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayType.DECAY_TYPE_EXPONENTIAL.getNumber()) {
output.writeEnum(2, decayType_);
}
if (originCase_ == 3) {
output.writeMessage(3, (com.google.type.LatLng) origin_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(scale_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 4, scale_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(offset_)) {
com.google.protobuf.GeneratedMessageV3.writeString(output, 5, offset_);
}
if (java.lang.Float.floatToRawIntBits(decay_) != 0) {
output.writeFloat(6, decay_);
}
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(fieldName_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(1, fieldName_);
}
if (decayType_ != com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayType.DECAY_TYPE_EXPONENTIAL.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(2, decayType_);
}
if (originCase_ == 3) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(3, (com.google.type.LatLng) origin_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(scale_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(4, scale_);
}
if (!com.google.protobuf.GeneratedMessageV3.isStringEmpty(offset_)) {
size += com.google.protobuf.GeneratedMessageV3.computeStringSize(5, offset_);
}
if (java.lang.Float.floatToRawIntBits(decay_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(6, decay_);
}
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.MultiFunctionScoreQuery.DecayFunction)) {
return super.equals(obj);
}
com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction other = (com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction) obj;
if (!getFieldName()
.equals(other.getFieldName())) return false;
if (decayType_ != other.decayType_) return false;
if (!getScale()
.equals(other.getScale())) return false;
if (!getOffset()
.equals(other.getOffset())) return false;
if (java.lang.Float.floatToIntBits(getDecay())
!= java.lang.Float.floatToIntBits(
other.getDecay())) return false;
if (!getOriginCase().equals(other.getOriginCase())) return false;
switch (originCase_) {
case 3:
if (!getGeoPoint()
.equals(other.getGeoPoint())) return false;
break;
case 0:
default:
}
if (!getUnknownFields().equals(other.getUnknownFields())) return false;
return true;
}
@java.lang.Override
public int hashCode() {
if (memoizedHashCode != 0) {
return memoizedHashCode;
}
int hash = 41;
hash = (19 * hash) + getDescriptor().hashCode();
hash = (37 * hash) + FIELDNAME_FIELD_NUMBER;
hash = (53 * hash) + getFieldName().hashCode();
hash = (37 * hash) + DECAYTYPE_FIELD_NUMBER;
hash = (53 * hash) + decayType_;
hash = (37 * hash) + SCALE_FIELD_NUMBER;
hash = (53 * hash) + getScale().hashCode();
hash = (37 * hash) + OFFSET_FIELD_NUMBER;
hash = (53 * hash) + getOffset().hashCode();
hash = (37 * hash) + DECAY_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(
getDecay());
switch (originCase_) {
case 3:
hash = (37 * hash) + GEOPOINT_FIELD_NUMBER;
hash = (53 * hash) + getGeoPoint().hashCode();
break;
case 0:
default:
}
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction 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.MultiFunctionScoreQuery.DecayFunction parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction 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.MultiFunctionScoreQuery.DecayFunction parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction 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.MultiFunctionScoreQuery.DecayFunction parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction 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.MultiFunctionScoreQuery.DecayFunction parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction 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.MultiFunctionScoreQuery.DecayFunction 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.MultiFunctionScoreQuery.DecayFunction 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.MultiFunctionScoreQuery.DecayFunction 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;
}
/**
*
* Apply decay function to docs
*
*
* Protobuf type {@code luceneserver.MultiFunctionScoreQuery.DecayFunction}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:luceneserver.MultiFunctionScoreQuery.DecayFunction)
com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunctionOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_MultiFunctionScoreQuery_DecayFunction_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_MultiFunctionScoreQuery_DecayFunction_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction.class, com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction.Builder.class);
}
// Construct using com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction.newBuilder()
private Builder() {
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
fieldName_ = "";
decayType_ = 0;
if (geoPointBuilder_ != null) {
geoPointBuilder_.clear();
}
scale_ = "";
offset_ = "";
decay_ = 0F;
originCase_ = 0;
origin_ = null;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_MultiFunctionScoreQuery_DecayFunction_descriptor;
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction getDefaultInstanceForType() {
return com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction.getDefaultInstance();
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction build() {
com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction buildPartial() {
com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction result = new com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction(this);
if (bitField0_ != 0) { buildPartial0(result); }
buildPartialOneofs(result);
onBuilt();
return result;
}
private void buildPartial0(com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction result) {
int from_bitField0_ = bitField0_;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.fieldName_ = fieldName_;
}
if (((from_bitField0_ & 0x00000002) != 0)) {
result.decayType_ = decayType_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.scale_ = scale_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.offset_ = offset_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.decay_ = decay_;
}
}
private void buildPartialOneofs(com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction result) {
result.originCase_ = originCase_;
result.origin_ = this.origin_;
if (originCase_ == 3 &&
geoPointBuilder_ != null) {
result.origin_ = geoPointBuilder_.build();
}
}
@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.MultiFunctionScoreQuery.DecayFunction) {
return mergeFrom((com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction other) {
if (other == com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction.getDefaultInstance()) return this;
if (!other.getFieldName().isEmpty()) {
fieldName_ = other.fieldName_;
bitField0_ |= 0x00000001;
onChanged();
}
if (other.decayType_ != 0) {
setDecayTypeValue(other.getDecayTypeValue());
}
if (!other.getScale().isEmpty()) {
scale_ = other.scale_;
bitField0_ |= 0x00000008;
onChanged();
}
if (!other.getOffset().isEmpty()) {
offset_ = other.offset_;
bitField0_ |= 0x00000010;
onChanged();
}
if (other.getDecay() != 0F) {
setDecay(other.getDecay());
}
switch (other.getOriginCase()) {
case GEOPOINT: {
mergeGeoPoint(other.getGeoPoint());
break;
}
case ORIGIN_NOT_SET: {
break;
}
}
this.mergeUnknownFields(other.getUnknownFields());
onChanged();
return this;
}
@java.lang.Override
public final boolean isInitialized() {
return true;
}
@java.lang.Override
public Builder mergeFrom(
com.google.protobuf.CodedInputStream input,
com.google.protobuf.ExtensionRegistryLite extensionRegistry)
throws java.io.IOException {
if (extensionRegistry == null) {
throw new java.lang.NullPointerException();
}
try {
boolean done = false;
while (!done) {
int tag = input.readTag();
switch (tag) {
case 0:
done = true;
break;
case 10: {
fieldName_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000001;
break;
} // case 10
case 16: {
decayType_ = input.readEnum();
bitField0_ |= 0x00000002;
break;
} // case 16
case 26: {
input.readMessage(
getGeoPointFieldBuilder().getBuilder(),
extensionRegistry);
originCase_ = 3;
break;
} // case 26
case 34: {
scale_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000008;
break;
} // case 34
case 42: {
offset_ = input.readStringRequireUtf8();
bitField0_ |= 0x00000010;
break;
} // case 42
case 53: {
decay_ = input.readFloat();
bitField0_ |= 0x00000020;
break;
} // case 53
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 originCase_ = 0;
private java.lang.Object origin_;
public OriginCase
getOriginCase() {
return OriginCase.forNumber(
originCase_);
}
public Builder clearOrigin() {
originCase_ = 0;
origin_ = null;
onChanged();
return this;
}
private int bitField0_;
private java.lang.Object fieldName_ = "";
/**
*
* Document field name to use
*
*
* string fieldName = 1;
* @return The fieldName.
*/
public java.lang.String getFieldName() {
java.lang.Object ref = fieldName_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
fieldName_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Document field name to use
*
*
* string fieldName = 1;
* @return The bytes for fieldName.
*/
public com.google.protobuf.ByteString
getFieldNameBytes() {
java.lang.Object ref = fieldName_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
fieldName_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Document field name to use
*
*
* string fieldName = 1;
* @param value The fieldName to set.
* @return This builder for chaining.
*/
public Builder setFieldName(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
fieldName_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Document field name to use
*
*
* string fieldName = 1;
* @return This builder for chaining.
*/
public Builder clearFieldName() {
fieldName_ = getDefaultInstance().getFieldName();
bitField0_ = (bitField0_ & ~0x00000001);
onChanged();
return this;
}
/**
*
* Document field name to use
*
*
* string fieldName = 1;
* @param value The bytes for fieldName to set.
* @return This builder for chaining.
*/
public Builder setFieldNameBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
fieldName_ = value;
bitField0_ |= 0x00000001;
onChanged();
return this;
}
private int decayType_ = 0;
/**
*
* Type of decay function to apply
*
*
* .luceneserver.MultiFunctionScoreQuery.DecayType decayType = 2;
* @return The enum numeric value on the wire for decayType.
*/
@java.lang.Override public int getDecayTypeValue() {
return decayType_;
}
/**
*
* Type of decay function to apply
*
*
* .luceneserver.MultiFunctionScoreQuery.DecayType decayType = 2;
* @param value The enum numeric value on the wire for decayType to set.
* @return This builder for chaining.
*/
public Builder setDecayTypeValue(int value) {
decayType_ = value;
bitField0_ |= 0x00000002;
onChanged();
return this;
}
/**
*
* Type of decay function to apply
*
*
* .luceneserver.MultiFunctionScoreQuery.DecayType decayType = 2;
* @return The decayType.
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayType getDecayType() {
com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayType result = com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayType.forNumber(decayType_);
return result == null ? com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayType.UNRECOGNIZED : result;
}
/**
*
* Type of decay function to apply
*
*
* .luceneserver.MultiFunctionScoreQuery.DecayType decayType = 2;
* @param value The decayType to set.
* @return This builder for chaining.
*/
public Builder setDecayType(com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayType value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000002;
decayType_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Type of decay function to apply
*
*
* .luceneserver.MultiFunctionScoreQuery.DecayType decayType = 2;
* @return This builder for chaining.
*/
public Builder clearDecayType() {
bitField0_ = (bitField0_ & ~0x00000002);
decayType_ = 0;
onChanged();
return this;
}
private com.google.protobuf.SingleFieldBuilderV3<
com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder> geoPointBuilder_;
/**
* .google.type.LatLng geoPoint = 3;
* @return Whether the geoPoint field is set.
*/
@java.lang.Override
public boolean hasGeoPoint() {
return originCase_ == 3;
}
/**
* .google.type.LatLng geoPoint = 3;
* @return The geoPoint.
*/
@java.lang.Override
public com.google.type.LatLng getGeoPoint() {
if (geoPointBuilder_ == null) {
if (originCase_ == 3) {
return (com.google.type.LatLng) origin_;
}
return com.google.type.LatLng.getDefaultInstance();
} else {
if (originCase_ == 3) {
return geoPointBuilder_.getMessage();
}
return com.google.type.LatLng.getDefaultInstance();
}
}
/**
* .google.type.LatLng geoPoint = 3;
*/
public Builder setGeoPoint(com.google.type.LatLng value) {
if (geoPointBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
origin_ = value;
onChanged();
} else {
geoPointBuilder_.setMessage(value);
}
originCase_ = 3;
return this;
}
/**
* .google.type.LatLng geoPoint = 3;
*/
public Builder setGeoPoint(
com.google.type.LatLng.Builder builderForValue) {
if (geoPointBuilder_ == null) {
origin_ = builderForValue.build();
onChanged();
} else {
geoPointBuilder_.setMessage(builderForValue.build());
}
originCase_ = 3;
return this;
}
/**
* .google.type.LatLng geoPoint = 3;
*/
public Builder mergeGeoPoint(com.google.type.LatLng value) {
if (geoPointBuilder_ == null) {
if (originCase_ == 3 &&
origin_ != com.google.type.LatLng.getDefaultInstance()) {
origin_ = com.google.type.LatLng.newBuilder((com.google.type.LatLng) origin_)
.mergeFrom(value).buildPartial();
} else {
origin_ = value;
}
onChanged();
} else {
if (originCase_ == 3) {
geoPointBuilder_.mergeFrom(value);
} else {
geoPointBuilder_.setMessage(value);
}
}
originCase_ = 3;
return this;
}
/**
* .google.type.LatLng geoPoint = 3;
*/
public Builder clearGeoPoint() {
if (geoPointBuilder_ == null) {
if (originCase_ == 3) {
originCase_ = 0;
origin_ = null;
onChanged();
}
} else {
if (originCase_ == 3) {
originCase_ = 0;
origin_ = null;
}
geoPointBuilder_.clear();
}
return this;
}
/**
* .google.type.LatLng geoPoint = 3;
*/
public com.google.type.LatLng.Builder getGeoPointBuilder() {
return getGeoPointFieldBuilder().getBuilder();
}
/**
* .google.type.LatLng geoPoint = 3;
*/
@java.lang.Override
public com.google.type.LatLngOrBuilder getGeoPointOrBuilder() {
if ((originCase_ == 3) && (geoPointBuilder_ != null)) {
return geoPointBuilder_.getMessageOrBuilder();
} else {
if (originCase_ == 3) {
return (com.google.type.LatLng) origin_;
}
return com.google.type.LatLng.getDefaultInstance();
}
}
/**
* .google.type.LatLng geoPoint = 3;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder>
getGeoPointFieldBuilder() {
if (geoPointBuilder_ == null) {
if (!(originCase_ == 3)) {
origin_ = com.google.type.LatLng.getDefaultInstance();
}
geoPointBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.google.type.LatLng, com.google.type.LatLng.Builder, com.google.type.LatLngOrBuilder>(
(com.google.type.LatLng) origin_,
getParentForChildren(),
isClean());
origin_ = null;
}
originCase_ = 3;
onChanged();
return geoPointBuilder_;
}
private java.lang.Object scale_ = "";
/**
*
* Currently only distance based scale and offset units are supported
* Distance from origin + offset at which computed score will be equal to decay. Scale should be distance, unit (m, km, mi) with space is optional. Default unit will be meters. Ex: "10", "15 km", "5 m", "7 mi"
*
*
* string scale = 4;
* @return The scale.
*/
public java.lang.String getScale() {
java.lang.Object ref = scale_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
scale_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Currently only distance based scale and offset units are supported
* Distance from origin + offset at which computed score will be equal to decay. Scale should be distance, unit (m, km, mi) with space is optional. Default unit will be meters. Ex: "10", "15 km", "5 m", "7 mi"
*
*
* string scale = 4;
* @return The bytes for scale.
*/
public com.google.protobuf.ByteString
getScaleBytes() {
java.lang.Object ref = scale_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
scale_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Currently only distance based scale and offset units are supported
* Distance from origin + offset at which computed score will be equal to decay. Scale should be distance, unit (m, km, mi) with space is optional. Default unit will be meters. Ex: "10", "15 km", "5 m", "7 mi"
*
*
* string scale = 4;
* @param value The scale to set.
* @return This builder for chaining.
*/
public Builder setScale(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
scale_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* Currently only distance based scale and offset units are supported
* Distance from origin + offset at which computed score will be equal to decay. Scale should be distance, unit (m, km, mi) with space is optional. Default unit will be meters. Ex: "10", "15 km", "5 m", "7 mi"
*
*
* string scale = 4;
* @return This builder for chaining.
*/
public Builder clearScale() {
scale_ = getDefaultInstance().getScale();
bitField0_ = (bitField0_ & ~0x00000008);
onChanged();
return this;
}
/**
*
* Currently only distance based scale and offset units are supported
* Distance from origin + offset at which computed score will be equal to decay. Scale should be distance, unit (m, km, mi) with space is optional. Default unit will be meters. Ex: "10", "15 km", "5 m", "7 mi"
*
*
* string scale = 4;
* @param value The bytes for scale to set.
* @return This builder for chaining.
*/
public Builder setScaleBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
scale_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
private java.lang.Object offset_ = "";
/**
*
* Compute decay function for docs with a distance greater than offset, will be 0.0 if none is set. Offset should be distance, unit (m, km, mi) with space is optional. Default unit will be meters. Ex: "10", "15 km", "5 m", "7 mi"
*
*
* string offset = 5;
* @return The offset.
*/
public java.lang.String getOffset() {
java.lang.Object ref = offset_;
if (!(ref instanceof java.lang.String)) {
com.google.protobuf.ByteString bs =
(com.google.protobuf.ByteString) ref;
java.lang.String s = bs.toStringUtf8();
offset_ = s;
return s;
} else {
return (java.lang.String) ref;
}
}
/**
*
* Compute decay function for docs with a distance greater than offset, will be 0.0 if none is set. Offset should be distance, unit (m, km, mi) with space is optional. Default unit will be meters. Ex: "10", "15 km", "5 m", "7 mi"
*
*
* string offset = 5;
* @return The bytes for offset.
*/
public com.google.protobuf.ByteString
getOffsetBytes() {
java.lang.Object ref = offset_;
if (ref instanceof String) {
com.google.protobuf.ByteString b =
com.google.protobuf.ByteString.copyFromUtf8(
(java.lang.String) ref);
offset_ = b;
return b;
} else {
return (com.google.protobuf.ByteString) ref;
}
}
/**
*
* Compute decay function for docs with a distance greater than offset, will be 0.0 if none is set. Offset should be distance, unit (m, km, mi) with space is optional. Default unit will be meters. Ex: "10", "15 km", "5 m", "7 mi"
*
*
* string offset = 5;
* @param value The offset to set.
* @return This builder for chaining.
*/
public Builder setOffset(
java.lang.String value) {
if (value == null) { throw new NullPointerException(); }
offset_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* Compute decay function for docs with a distance greater than offset, will be 0.0 if none is set. Offset should be distance, unit (m, km, mi) with space is optional. Default unit will be meters. Ex: "10", "15 km", "5 m", "7 mi"
*
*
* string offset = 5;
* @return This builder for chaining.
*/
public Builder clearOffset() {
offset_ = getDefaultInstance().getOffset();
bitField0_ = (bitField0_ & ~0x00000010);
onChanged();
return this;
}
/**
*
* Compute decay function for docs with a distance greater than offset, will be 0.0 if none is set. Offset should be distance, unit (m, km, mi) with space is optional. Default unit will be meters. Ex: "10", "15 km", "5 m", "7 mi"
*
*
* string offset = 5;
* @param value The bytes for offset to set.
* @return This builder for chaining.
*/
public Builder setOffsetBytes(
com.google.protobuf.ByteString value) {
if (value == null) { throw new NullPointerException(); }
checkByteStringIsUtf8(value);
offset_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
private float decay_ ;
/**
*
* Defines decay rate for scoring. Should be between (0, 1)
*
*
* float decay = 6;
* @return The decay.
*/
@java.lang.Override
public float getDecay() {
return decay_;
}
/**
*
* Defines decay rate for scoring. Should be between (0, 1)
*
*
* float decay = 6;
* @param value The decay to set.
* @return This builder for chaining.
*/
public Builder setDecay(float value) {
decay_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
* Defines decay rate for scoring. Should be between (0, 1)
*
*
* float decay = 6;
* @return This builder for chaining.
*/
public Builder clearDecay() {
bitField0_ = (bitField0_ & ~0x00000020);
decay_ = 0F;
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.MultiFunctionScoreQuery.DecayFunction)
}
// @@protoc_insertion_point(class_scope:luceneserver.MultiFunctionScoreQuery.DecayFunction)
private static final com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction();
}
public static com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.DecayFunction getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public DecayFunction 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.MultiFunctionScoreQuery.DecayFunction getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}
private int bitField0_;
public static final int QUERY_FIELD_NUMBER = 1;
private com.yelp.nrtsearch.server.grpc.Query query_;
/**
*
* Main query to produce recalled docs and scores, which will be modified by the final function score
*
*
* .luceneserver.Query query = 1;
* @return Whether the query field is set.
*/
@java.lang.Override
public boolean hasQuery() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Main query to produce recalled docs and scores, which will be modified by the final function score
*
*
* .luceneserver.Query query = 1;
* @return The query.
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.Query getQuery() {
return query_ == null ? com.yelp.nrtsearch.server.grpc.Query.getDefaultInstance() : query_;
}
/**
*
* Main query to produce recalled docs and scores, which will be modified by the final function score
*
*
* .luceneserver.Query query = 1;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.QueryOrBuilder getQueryOrBuilder() {
return query_ == null ? com.yelp.nrtsearch.server.grpc.Query.getDefaultInstance() : query_;
}
public static final int FUNCTIONS_FIELD_NUMBER = 2;
@SuppressWarnings("serial")
private java.util.List functions_;
/**
*
* Functions to produce final function score
*
*
* repeated .luceneserver.MultiFunctionScoreQuery.FilterFunction functions = 2;
*/
@java.lang.Override
public java.util.List getFunctionsList() {
return functions_;
}
/**
*
* Functions to produce final function score
*
*
* repeated .luceneserver.MultiFunctionScoreQuery.FilterFunction functions = 2;
*/
@java.lang.Override
public java.util.List extends com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunctionOrBuilder>
getFunctionsOrBuilderList() {
return functions_;
}
/**
*
* Functions to produce final function score
*
*
* repeated .luceneserver.MultiFunctionScoreQuery.FilterFunction functions = 2;
*/
@java.lang.Override
public int getFunctionsCount() {
return functions_.size();
}
/**
*
* Functions to produce final function score
*
*
* repeated .luceneserver.MultiFunctionScoreQuery.FilterFunction functions = 2;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction getFunctions(int index) {
return functions_.get(index);
}
/**
*
* Functions to produce final function score
*
*
* repeated .luceneserver.MultiFunctionScoreQuery.FilterFunction functions = 2;
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunctionOrBuilder getFunctionsOrBuilder(
int index) {
return functions_.get(index);
}
public static final int SCORE_MODE_FIELD_NUMBER = 3;
private int scoreMode_ = 0;
/**
*
* Method to combine functions scores
*
*
* .luceneserver.MultiFunctionScoreQuery.FunctionScoreMode score_mode = 3;
* @return The enum numeric value on the wire for scoreMode.
*/
@java.lang.Override public int getScoreModeValue() {
return scoreMode_;
}
/**
*
* Method to combine functions scores
*
*
* .luceneserver.MultiFunctionScoreQuery.FunctionScoreMode score_mode = 3;
* @return The scoreMode.
*/
@java.lang.Override public com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FunctionScoreMode getScoreMode() {
com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FunctionScoreMode result = com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FunctionScoreMode.forNumber(scoreMode_);
return result == null ? com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FunctionScoreMode.UNRECOGNIZED : result;
}
public static final int BOOST_MODE_FIELD_NUMBER = 4;
private int boostMode_ = 0;
/**
*
* Method to modify query document scores with final function score
*
*
* .luceneserver.MultiFunctionScoreQuery.BoostMode boost_mode = 4;
* @return The enum numeric value on the wire for boostMode.
*/
@java.lang.Override public int getBoostModeValue() {
return boostMode_;
}
/**
*
* Method to modify query document scores with final function score
*
*
* .luceneserver.MultiFunctionScoreQuery.BoostMode boost_mode = 4;
* @return The boostMode.
*/
@java.lang.Override public com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.BoostMode getBoostMode() {
com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.BoostMode result = com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.BoostMode.forNumber(boostMode_);
return result == null ? com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.BoostMode.UNRECOGNIZED : result;
}
public static final int MIN_SCORE_FIELD_NUMBER = 5;
private float minScore_ = 0F;
/**
*
* Optional minimal score to match a document. By default, it's 0.
*
*
* float min_score = 5;
* @return The minScore.
*/
@java.lang.Override
public float getMinScore() {
return minScore_;
}
public static final int MIN_EXCLUDED_FIELD_NUMBER = 6;
private boolean minExcluded_ = false;
/**
*
* Determine minimal score is excluded or not. By default, it's false;
*
*
* bool min_excluded = 6;
* @return The minExcluded.
*/
@java.lang.Override
public boolean getMinExcluded() {
return minExcluded_;
}
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 (((bitField0_ & 0x00000001) != 0)) {
output.writeMessage(1, getQuery());
}
for (int i = 0; i < functions_.size(); i++) {
output.writeMessage(2, functions_.get(i));
}
if (scoreMode_ != com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FunctionScoreMode.SCORE_MODE_MULTIPLY.getNumber()) {
output.writeEnum(3, scoreMode_);
}
if (boostMode_ != com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.BoostMode.BOOST_MODE_MULTIPLY.getNumber()) {
output.writeEnum(4, boostMode_);
}
if (java.lang.Float.floatToRawIntBits(minScore_) != 0) {
output.writeFloat(5, minScore_);
}
if (minExcluded_ != false) {
output.writeBool(6, minExcluded_);
}
getUnknownFields().writeTo(output);
}
@java.lang.Override
public int getSerializedSize() {
int size = memoizedSize;
if (size != -1) return size;
size = 0;
if (((bitField0_ & 0x00000001) != 0)) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(1, getQuery());
}
for (int i = 0; i < functions_.size(); i++) {
size += com.google.protobuf.CodedOutputStream
.computeMessageSize(2, functions_.get(i));
}
if (scoreMode_ != com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FunctionScoreMode.SCORE_MODE_MULTIPLY.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(3, scoreMode_);
}
if (boostMode_ != com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.BoostMode.BOOST_MODE_MULTIPLY.getNumber()) {
size += com.google.protobuf.CodedOutputStream
.computeEnumSize(4, boostMode_);
}
if (java.lang.Float.floatToRawIntBits(minScore_) != 0) {
size += com.google.protobuf.CodedOutputStream
.computeFloatSize(5, minScore_);
}
if (minExcluded_ != false) {
size += com.google.protobuf.CodedOutputStream
.computeBoolSize(6, minExcluded_);
}
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.MultiFunctionScoreQuery)) {
return super.equals(obj);
}
com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery other = (com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery) obj;
if (hasQuery() != other.hasQuery()) return false;
if (hasQuery()) {
if (!getQuery()
.equals(other.getQuery())) return false;
}
if (!getFunctionsList()
.equals(other.getFunctionsList())) return false;
if (scoreMode_ != other.scoreMode_) return false;
if (boostMode_ != other.boostMode_) return false;
if (java.lang.Float.floatToIntBits(getMinScore())
!= java.lang.Float.floatToIntBits(
other.getMinScore())) return false;
if (getMinExcluded()
!= other.getMinExcluded()) 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 (hasQuery()) {
hash = (37 * hash) + QUERY_FIELD_NUMBER;
hash = (53 * hash) + getQuery().hashCode();
}
if (getFunctionsCount() > 0) {
hash = (37 * hash) + FUNCTIONS_FIELD_NUMBER;
hash = (53 * hash) + getFunctionsList().hashCode();
}
hash = (37 * hash) + SCORE_MODE_FIELD_NUMBER;
hash = (53 * hash) + scoreMode_;
hash = (37 * hash) + BOOST_MODE_FIELD_NUMBER;
hash = (53 * hash) + boostMode_;
hash = (37 * hash) + MIN_SCORE_FIELD_NUMBER;
hash = (53 * hash) + java.lang.Float.floatToIntBits(
getMinScore());
hash = (37 * hash) + MIN_EXCLUDED_FIELD_NUMBER;
hash = (53 * hash) + com.google.protobuf.Internal.hashBoolean(
getMinExcluded());
hash = (29 * hash) + getUnknownFields().hashCode();
memoizedHashCode = hash;
return hash;
}
public static com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery parseFrom(
java.nio.ByteBuffer data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery 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.MultiFunctionScoreQuery parseFrom(
com.google.protobuf.ByteString data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery 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.MultiFunctionScoreQuery parseFrom(byte[] data)
throws com.google.protobuf.InvalidProtocolBufferException {
return PARSER.parseFrom(data);
}
public static com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery 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.MultiFunctionScoreQuery parseFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseWithIOException(PARSER, input);
}
public static com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery 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.MultiFunctionScoreQuery parseDelimitedFrom(java.io.InputStream input)
throws java.io.IOException {
return com.google.protobuf.GeneratedMessageV3
.parseDelimitedWithIOException(PARSER, input);
}
public static com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery 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.MultiFunctionScoreQuery 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.MultiFunctionScoreQuery 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.MultiFunctionScoreQuery 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 to modify the score of documents with a given set of functions
*
*
* Protobuf type {@code luceneserver.MultiFunctionScoreQuery}
*/
public static final class Builder extends
com.google.protobuf.GeneratedMessageV3.Builder implements
// @@protoc_insertion_point(builder_implements:luceneserver.MultiFunctionScoreQuery)
com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQueryOrBuilder {
public static final com.google.protobuf.Descriptors.Descriptor
getDescriptor() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_MultiFunctionScoreQuery_descriptor;
}
@java.lang.Override
protected com.google.protobuf.GeneratedMessageV3.FieldAccessorTable
internalGetFieldAccessorTable() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_MultiFunctionScoreQuery_fieldAccessorTable
.ensureFieldAccessorsInitialized(
com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.class, com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.Builder.class);
}
// Construct using com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.newBuilder()
private Builder() {
maybeForceBuilderInitialization();
}
private Builder(
com.google.protobuf.GeneratedMessageV3.BuilderParent parent) {
super(parent);
maybeForceBuilderInitialization();
}
private void maybeForceBuilderInitialization() {
if (com.google.protobuf.GeneratedMessageV3
.alwaysUseFieldBuilders) {
getQueryFieldBuilder();
getFunctionsFieldBuilder();
}
}
@java.lang.Override
public Builder clear() {
super.clear();
bitField0_ = 0;
query_ = null;
if (queryBuilder_ != null) {
queryBuilder_.dispose();
queryBuilder_ = null;
}
if (functionsBuilder_ == null) {
functions_ = java.util.Collections.emptyList();
} else {
functions_ = null;
functionsBuilder_.clear();
}
bitField0_ = (bitField0_ & ~0x00000002);
scoreMode_ = 0;
boostMode_ = 0;
minScore_ = 0F;
minExcluded_ = false;
return this;
}
@java.lang.Override
public com.google.protobuf.Descriptors.Descriptor
getDescriptorForType() {
return com.yelp.nrtsearch.server.grpc.SearchResponseProto.internal_static_luceneserver_MultiFunctionScoreQuery_descriptor;
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery getDefaultInstanceForType() {
return com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.getDefaultInstance();
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery build() {
com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery result = buildPartial();
if (!result.isInitialized()) {
throw newUninitializedMessageException(result);
}
return result;
}
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery buildPartial() {
com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery result = new com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery(this);
buildPartialRepeatedFields(result);
if (bitField0_ != 0) { buildPartial0(result); }
onBuilt();
return result;
}
private void buildPartialRepeatedFields(com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery result) {
if (functionsBuilder_ == null) {
if (((bitField0_ & 0x00000002) != 0)) {
functions_ = java.util.Collections.unmodifiableList(functions_);
bitField0_ = (bitField0_ & ~0x00000002);
}
result.functions_ = functions_;
} else {
result.functions_ = functionsBuilder_.build();
}
}
private void buildPartial0(com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery result) {
int from_bitField0_ = bitField0_;
int to_bitField0_ = 0;
if (((from_bitField0_ & 0x00000001) != 0)) {
result.query_ = queryBuilder_ == null
? query_
: queryBuilder_.build();
to_bitField0_ |= 0x00000001;
}
if (((from_bitField0_ & 0x00000004) != 0)) {
result.scoreMode_ = scoreMode_;
}
if (((from_bitField0_ & 0x00000008) != 0)) {
result.boostMode_ = boostMode_;
}
if (((from_bitField0_ & 0x00000010) != 0)) {
result.minScore_ = minScore_;
}
if (((from_bitField0_ & 0x00000020) != 0)) {
result.minExcluded_ = minExcluded_;
}
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.MultiFunctionScoreQuery) {
return mergeFrom((com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery)other);
} else {
super.mergeFrom(other);
return this;
}
}
public Builder mergeFrom(com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery other) {
if (other == com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.getDefaultInstance()) return this;
if (other.hasQuery()) {
mergeQuery(other.getQuery());
}
if (functionsBuilder_ == null) {
if (!other.functions_.isEmpty()) {
if (functions_.isEmpty()) {
functions_ = other.functions_;
bitField0_ = (bitField0_ & ~0x00000002);
} else {
ensureFunctionsIsMutable();
functions_.addAll(other.functions_);
}
onChanged();
}
} else {
if (!other.functions_.isEmpty()) {
if (functionsBuilder_.isEmpty()) {
functionsBuilder_.dispose();
functionsBuilder_ = null;
functions_ = other.functions_;
bitField0_ = (bitField0_ & ~0x00000002);
functionsBuilder_ =
com.google.protobuf.GeneratedMessageV3.alwaysUseFieldBuilders ?
getFunctionsFieldBuilder() : null;
} else {
functionsBuilder_.addAllMessages(other.functions_);
}
}
}
if (other.scoreMode_ != 0) {
setScoreModeValue(other.getScoreModeValue());
}
if (other.boostMode_ != 0) {
setBoostModeValue(other.getBoostModeValue());
}
if (other.getMinScore() != 0F) {
setMinScore(other.getMinScore());
}
if (other.getMinExcluded() != false) {
setMinExcluded(other.getMinExcluded());
}
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: {
input.readMessage(
getQueryFieldBuilder().getBuilder(),
extensionRegistry);
bitField0_ |= 0x00000001;
break;
} // case 10
case 18: {
com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction m =
input.readMessage(
com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction.parser(),
extensionRegistry);
if (functionsBuilder_ == null) {
ensureFunctionsIsMutable();
functions_.add(m);
} else {
functionsBuilder_.addMessage(m);
}
break;
} // case 18
case 24: {
scoreMode_ = input.readEnum();
bitField0_ |= 0x00000004;
break;
} // case 24
case 32: {
boostMode_ = input.readEnum();
bitField0_ |= 0x00000008;
break;
} // case 32
case 45: {
minScore_ = input.readFloat();
bitField0_ |= 0x00000010;
break;
} // case 45
case 48: {
minExcluded_ = input.readBool();
bitField0_ |= 0x00000020;
break;
} // case 48
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.yelp.nrtsearch.server.grpc.Query query_;
private com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.Query, com.yelp.nrtsearch.server.grpc.Query.Builder, com.yelp.nrtsearch.server.grpc.QueryOrBuilder> queryBuilder_;
/**
*
* Main query to produce recalled docs and scores, which will be modified by the final function score
*
*
* .luceneserver.Query query = 1;
* @return Whether the query field is set.
*/
public boolean hasQuery() {
return ((bitField0_ & 0x00000001) != 0);
}
/**
*
* Main query to produce recalled docs and scores, which will be modified by the final function score
*
*
* .luceneserver.Query query = 1;
* @return The query.
*/
public com.yelp.nrtsearch.server.grpc.Query getQuery() {
if (queryBuilder_ == null) {
return query_ == null ? com.yelp.nrtsearch.server.grpc.Query.getDefaultInstance() : query_;
} else {
return queryBuilder_.getMessage();
}
}
/**
*
* Main query to produce recalled docs and scores, which will be modified by the final function score
*
*
* .luceneserver.Query query = 1;
*/
public Builder setQuery(com.yelp.nrtsearch.server.grpc.Query value) {
if (queryBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
query_ = value;
} else {
queryBuilder_.setMessage(value);
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Main query to produce recalled docs and scores, which will be modified by the final function score
*
*
* .luceneserver.Query query = 1;
*/
public Builder setQuery(
com.yelp.nrtsearch.server.grpc.Query.Builder builderForValue) {
if (queryBuilder_ == null) {
query_ = builderForValue.build();
} else {
queryBuilder_.setMessage(builderForValue.build());
}
bitField0_ |= 0x00000001;
onChanged();
return this;
}
/**
*
* Main query to produce recalled docs and scores, which will be modified by the final function score
*
*
* .luceneserver.Query query = 1;
*/
public Builder mergeQuery(com.yelp.nrtsearch.server.grpc.Query value) {
if (queryBuilder_ == null) {
if (((bitField0_ & 0x00000001) != 0) &&
query_ != null &&
query_ != com.yelp.nrtsearch.server.grpc.Query.getDefaultInstance()) {
getQueryBuilder().mergeFrom(value);
} else {
query_ = value;
}
} else {
queryBuilder_.mergeFrom(value);
}
if (query_ != null) {
bitField0_ |= 0x00000001;
onChanged();
}
return this;
}
/**
*
* Main query to produce recalled docs and scores, which will be modified by the final function score
*
*
* .luceneserver.Query query = 1;
*/
public Builder clearQuery() {
bitField0_ = (bitField0_ & ~0x00000001);
query_ = null;
if (queryBuilder_ != null) {
queryBuilder_.dispose();
queryBuilder_ = null;
}
onChanged();
return this;
}
/**
*
* Main query to produce recalled docs and scores, which will be modified by the final function score
*
*
* .luceneserver.Query query = 1;
*/
public com.yelp.nrtsearch.server.grpc.Query.Builder getQueryBuilder() {
bitField0_ |= 0x00000001;
onChanged();
return getQueryFieldBuilder().getBuilder();
}
/**
*
* Main query to produce recalled docs and scores, which will be modified by the final function score
*
*
* .luceneserver.Query query = 1;
*/
public com.yelp.nrtsearch.server.grpc.QueryOrBuilder getQueryOrBuilder() {
if (queryBuilder_ != null) {
return queryBuilder_.getMessageOrBuilder();
} else {
return query_ == null ?
com.yelp.nrtsearch.server.grpc.Query.getDefaultInstance() : query_;
}
}
/**
*
* Main query to produce recalled docs and scores, which will be modified by the final function score
*
*
* .luceneserver.Query query = 1;
*/
private com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.Query, com.yelp.nrtsearch.server.grpc.Query.Builder, com.yelp.nrtsearch.server.grpc.QueryOrBuilder>
getQueryFieldBuilder() {
if (queryBuilder_ == null) {
queryBuilder_ = new com.google.protobuf.SingleFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.Query, com.yelp.nrtsearch.server.grpc.Query.Builder, com.yelp.nrtsearch.server.grpc.QueryOrBuilder>(
getQuery(),
getParentForChildren(),
isClean());
query_ = null;
}
return queryBuilder_;
}
private java.util.List functions_ =
java.util.Collections.emptyList();
private void ensureFunctionsIsMutable() {
if (!((bitField0_ & 0x00000002) != 0)) {
functions_ = new java.util.ArrayList(functions_);
bitField0_ |= 0x00000002;
}
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction, com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction.Builder, com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunctionOrBuilder> functionsBuilder_;
/**
*
* Functions to produce final function score
*
*
* repeated .luceneserver.MultiFunctionScoreQuery.FilterFunction functions = 2;
*/
public java.util.List getFunctionsList() {
if (functionsBuilder_ == null) {
return java.util.Collections.unmodifiableList(functions_);
} else {
return functionsBuilder_.getMessageList();
}
}
/**
*
* Functions to produce final function score
*
*
* repeated .luceneserver.MultiFunctionScoreQuery.FilterFunction functions = 2;
*/
public int getFunctionsCount() {
if (functionsBuilder_ == null) {
return functions_.size();
} else {
return functionsBuilder_.getCount();
}
}
/**
*
* Functions to produce final function score
*
*
* repeated .luceneserver.MultiFunctionScoreQuery.FilterFunction functions = 2;
*/
public com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction getFunctions(int index) {
if (functionsBuilder_ == null) {
return functions_.get(index);
} else {
return functionsBuilder_.getMessage(index);
}
}
/**
*
* Functions to produce final function score
*
*
* repeated .luceneserver.MultiFunctionScoreQuery.FilterFunction functions = 2;
*/
public Builder setFunctions(
int index, com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction value) {
if (functionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFunctionsIsMutable();
functions_.set(index, value);
onChanged();
} else {
functionsBuilder_.setMessage(index, value);
}
return this;
}
/**
*
* Functions to produce final function score
*
*
* repeated .luceneserver.MultiFunctionScoreQuery.FilterFunction functions = 2;
*/
public Builder setFunctions(
int index, com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction.Builder builderForValue) {
if (functionsBuilder_ == null) {
ensureFunctionsIsMutable();
functions_.set(index, builderForValue.build());
onChanged();
} else {
functionsBuilder_.setMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Functions to produce final function score
*
*
* repeated .luceneserver.MultiFunctionScoreQuery.FilterFunction functions = 2;
*/
public Builder addFunctions(com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction value) {
if (functionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFunctionsIsMutable();
functions_.add(value);
onChanged();
} else {
functionsBuilder_.addMessage(value);
}
return this;
}
/**
*
* Functions to produce final function score
*
*
* repeated .luceneserver.MultiFunctionScoreQuery.FilterFunction functions = 2;
*/
public Builder addFunctions(
int index, com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction value) {
if (functionsBuilder_ == null) {
if (value == null) {
throw new NullPointerException();
}
ensureFunctionsIsMutable();
functions_.add(index, value);
onChanged();
} else {
functionsBuilder_.addMessage(index, value);
}
return this;
}
/**
*
* Functions to produce final function score
*
*
* repeated .luceneserver.MultiFunctionScoreQuery.FilterFunction functions = 2;
*/
public Builder addFunctions(
com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction.Builder builderForValue) {
if (functionsBuilder_ == null) {
ensureFunctionsIsMutable();
functions_.add(builderForValue.build());
onChanged();
} else {
functionsBuilder_.addMessage(builderForValue.build());
}
return this;
}
/**
*
* Functions to produce final function score
*
*
* repeated .luceneserver.MultiFunctionScoreQuery.FilterFunction functions = 2;
*/
public Builder addFunctions(
int index, com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction.Builder builderForValue) {
if (functionsBuilder_ == null) {
ensureFunctionsIsMutable();
functions_.add(index, builderForValue.build());
onChanged();
} else {
functionsBuilder_.addMessage(index, builderForValue.build());
}
return this;
}
/**
*
* Functions to produce final function score
*
*
* repeated .luceneserver.MultiFunctionScoreQuery.FilterFunction functions = 2;
*/
public Builder addAllFunctions(
java.lang.Iterable extends com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction> values) {
if (functionsBuilder_ == null) {
ensureFunctionsIsMutable();
com.google.protobuf.AbstractMessageLite.Builder.addAll(
values, functions_);
onChanged();
} else {
functionsBuilder_.addAllMessages(values);
}
return this;
}
/**
*
* Functions to produce final function score
*
*
* repeated .luceneserver.MultiFunctionScoreQuery.FilterFunction functions = 2;
*/
public Builder clearFunctions() {
if (functionsBuilder_ == null) {
functions_ = java.util.Collections.emptyList();
bitField0_ = (bitField0_ & ~0x00000002);
onChanged();
} else {
functionsBuilder_.clear();
}
return this;
}
/**
*
* Functions to produce final function score
*
*
* repeated .luceneserver.MultiFunctionScoreQuery.FilterFunction functions = 2;
*/
public Builder removeFunctions(int index) {
if (functionsBuilder_ == null) {
ensureFunctionsIsMutable();
functions_.remove(index);
onChanged();
} else {
functionsBuilder_.remove(index);
}
return this;
}
/**
*
* Functions to produce final function score
*
*
* repeated .luceneserver.MultiFunctionScoreQuery.FilterFunction functions = 2;
*/
public com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction.Builder getFunctionsBuilder(
int index) {
return getFunctionsFieldBuilder().getBuilder(index);
}
/**
*
* Functions to produce final function score
*
*
* repeated .luceneserver.MultiFunctionScoreQuery.FilterFunction functions = 2;
*/
public com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunctionOrBuilder getFunctionsOrBuilder(
int index) {
if (functionsBuilder_ == null) {
return functions_.get(index); } else {
return functionsBuilder_.getMessageOrBuilder(index);
}
}
/**
*
* Functions to produce final function score
*
*
* repeated .luceneserver.MultiFunctionScoreQuery.FilterFunction functions = 2;
*/
public java.util.List extends com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunctionOrBuilder>
getFunctionsOrBuilderList() {
if (functionsBuilder_ != null) {
return functionsBuilder_.getMessageOrBuilderList();
} else {
return java.util.Collections.unmodifiableList(functions_);
}
}
/**
*
* Functions to produce final function score
*
*
* repeated .luceneserver.MultiFunctionScoreQuery.FilterFunction functions = 2;
*/
public com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction.Builder addFunctionsBuilder() {
return getFunctionsFieldBuilder().addBuilder(
com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction.getDefaultInstance());
}
/**
*
* Functions to produce final function score
*
*
* repeated .luceneserver.MultiFunctionScoreQuery.FilterFunction functions = 2;
*/
public com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction.Builder addFunctionsBuilder(
int index) {
return getFunctionsFieldBuilder().addBuilder(
index, com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction.getDefaultInstance());
}
/**
*
* Functions to produce final function score
*
*
* repeated .luceneserver.MultiFunctionScoreQuery.FilterFunction functions = 2;
*/
public java.util.List
getFunctionsBuilderList() {
return getFunctionsFieldBuilder().getBuilderList();
}
private com.google.protobuf.RepeatedFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction, com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction.Builder, com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunctionOrBuilder>
getFunctionsFieldBuilder() {
if (functionsBuilder_ == null) {
functionsBuilder_ = new com.google.protobuf.RepeatedFieldBuilderV3<
com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction, com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunction.Builder, com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FilterFunctionOrBuilder>(
functions_,
((bitField0_ & 0x00000002) != 0),
getParentForChildren(),
isClean());
functions_ = null;
}
return functionsBuilder_;
}
private int scoreMode_ = 0;
/**
*
* Method to combine functions scores
*
*
* .luceneserver.MultiFunctionScoreQuery.FunctionScoreMode score_mode = 3;
* @return The enum numeric value on the wire for scoreMode.
*/
@java.lang.Override public int getScoreModeValue() {
return scoreMode_;
}
/**
*
* Method to combine functions scores
*
*
* .luceneserver.MultiFunctionScoreQuery.FunctionScoreMode score_mode = 3;
* @param value The enum numeric value on the wire for scoreMode to set.
* @return This builder for chaining.
*/
public Builder setScoreModeValue(int value) {
scoreMode_ = value;
bitField0_ |= 0x00000004;
onChanged();
return this;
}
/**
*
* Method to combine functions scores
*
*
* .luceneserver.MultiFunctionScoreQuery.FunctionScoreMode score_mode = 3;
* @return The scoreMode.
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FunctionScoreMode getScoreMode() {
com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FunctionScoreMode result = com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FunctionScoreMode.forNumber(scoreMode_);
return result == null ? com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FunctionScoreMode.UNRECOGNIZED : result;
}
/**
*
* Method to combine functions scores
*
*
* .luceneserver.MultiFunctionScoreQuery.FunctionScoreMode score_mode = 3;
* @param value The scoreMode to set.
* @return This builder for chaining.
*/
public Builder setScoreMode(com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.FunctionScoreMode value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000004;
scoreMode_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Method to combine functions scores
*
*
* .luceneserver.MultiFunctionScoreQuery.FunctionScoreMode score_mode = 3;
* @return This builder for chaining.
*/
public Builder clearScoreMode() {
bitField0_ = (bitField0_ & ~0x00000004);
scoreMode_ = 0;
onChanged();
return this;
}
private int boostMode_ = 0;
/**
*
* Method to modify query document scores with final function score
*
*
* .luceneserver.MultiFunctionScoreQuery.BoostMode boost_mode = 4;
* @return The enum numeric value on the wire for boostMode.
*/
@java.lang.Override public int getBoostModeValue() {
return boostMode_;
}
/**
*
* Method to modify query document scores with final function score
*
*
* .luceneserver.MultiFunctionScoreQuery.BoostMode boost_mode = 4;
* @param value The enum numeric value on the wire for boostMode to set.
* @return This builder for chaining.
*/
public Builder setBoostModeValue(int value) {
boostMode_ = value;
bitField0_ |= 0x00000008;
onChanged();
return this;
}
/**
*
* Method to modify query document scores with final function score
*
*
* .luceneserver.MultiFunctionScoreQuery.BoostMode boost_mode = 4;
* @return The boostMode.
*/
@java.lang.Override
public com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.BoostMode getBoostMode() {
com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.BoostMode result = com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.BoostMode.forNumber(boostMode_);
return result == null ? com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.BoostMode.UNRECOGNIZED : result;
}
/**
*
* Method to modify query document scores with final function score
*
*
* .luceneserver.MultiFunctionScoreQuery.BoostMode boost_mode = 4;
* @param value The boostMode to set.
* @return This builder for chaining.
*/
public Builder setBoostMode(com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery.BoostMode value) {
if (value == null) {
throw new NullPointerException();
}
bitField0_ |= 0x00000008;
boostMode_ = value.getNumber();
onChanged();
return this;
}
/**
*
* Method to modify query document scores with final function score
*
*
* .luceneserver.MultiFunctionScoreQuery.BoostMode boost_mode = 4;
* @return This builder for chaining.
*/
public Builder clearBoostMode() {
bitField0_ = (bitField0_ & ~0x00000008);
boostMode_ = 0;
onChanged();
return this;
}
private float minScore_ ;
/**
*
* Optional minimal score to match a document. By default, it's 0.
*
*
* float min_score = 5;
* @return The minScore.
*/
@java.lang.Override
public float getMinScore() {
return minScore_;
}
/**
*
* Optional minimal score to match a document. By default, it's 0.
*
*
* float min_score = 5;
* @param value The minScore to set.
* @return This builder for chaining.
*/
public Builder setMinScore(float value) {
minScore_ = value;
bitField0_ |= 0x00000010;
onChanged();
return this;
}
/**
*
* Optional minimal score to match a document. By default, it's 0.
*
*
* float min_score = 5;
* @return This builder for chaining.
*/
public Builder clearMinScore() {
bitField0_ = (bitField0_ & ~0x00000010);
minScore_ = 0F;
onChanged();
return this;
}
private boolean minExcluded_ ;
/**
*
* Determine minimal score is excluded or not. By default, it's false;
*
*
* bool min_excluded = 6;
* @return The minExcluded.
*/
@java.lang.Override
public boolean getMinExcluded() {
return minExcluded_;
}
/**
*
* Determine minimal score is excluded or not. By default, it's false;
*
*
* bool min_excluded = 6;
* @param value The minExcluded to set.
* @return This builder for chaining.
*/
public Builder setMinExcluded(boolean value) {
minExcluded_ = value;
bitField0_ |= 0x00000020;
onChanged();
return this;
}
/**
*
* Determine minimal score is excluded or not. By default, it's false;
*
*
* bool min_excluded = 6;
* @return This builder for chaining.
*/
public Builder clearMinExcluded() {
bitField0_ = (bitField0_ & ~0x00000020);
minExcluded_ = false;
onChanged();
return this;
}
@java.lang.Override
public final Builder setUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.setUnknownFields(unknownFields);
}
@java.lang.Override
public final Builder mergeUnknownFields(
final com.google.protobuf.UnknownFieldSet unknownFields) {
return super.mergeUnknownFields(unknownFields);
}
// @@protoc_insertion_point(builder_scope:luceneserver.MultiFunctionScoreQuery)
}
// @@protoc_insertion_point(class_scope:luceneserver.MultiFunctionScoreQuery)
private static final com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery DEFAULT_INSTANCE;
static {
DEFAULT_INSTANCE = new com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery();
}
public static com.yelp.nrtsearch.server.grpc.MultiFunctionScoreQuery getDefaultInstance() {
return DEFAULT_INSTANCE;
}
private static final com.google.protobuf.Parser
PARSER = new com.google.protobuf.AbstractParser() {
@java.lang.Override
public MultiFunctionScoreQuery 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.MultiFunctionScoreQuery getDefaultInstanceForType() {
return DEFAULT_INSTANCE;
}
}