本文整理汇总了Java中org.elasticsearch.common.io.stream.StreamInput.readGenericValue方法的典型用法代码示例。如果您正苦于以下问题:Java StreamInput.readGenericValue方法的具体用法?Java StreamInput.readGenericValue怎么用?Java StreamInput.readGenericValue使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.elasticsearch.common.io.stream.StreamInput
的用法示例。
在下文中一共展示了StreamInput.readGenericValue方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: RunningStats
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/** Ctor to create an instance of running statistics */
@SuppressWarnings("unchecked")
public RunningStats(StreamInput in) throws IOException {
this();
// read doc count
docCount = (Long)in.readGenericValue();
// read fieldSum
fieldSum = (HashMap<String, Double>)in.readGenericValue();
// counts
counts = (HashMap<String, Long>)in.readGenericValue();
// means
means = (HashMap<String, Double>)in.readGenericValue();
// variances
variances = (HashMap<String, Double>)in.readGenericValue();
// skewness
skewness = (HashMap<String, Double>)in.readGenericValue();
// kurtosis
kurtosis = (HashMap<String, Double>)in.readGenericValue();
// read covariances
covariances = (HashMap<String, HashMap<String, Double>>)in.readGenericValue();
}
示例2: MultiMatchQueryBuilder
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
* Read from a stream.
*/
public MultiMatchQueryBuilder(StreamInput in) throws IOException {
super(in);
value = in.readGenericValue();
int size = in.readVInt();
fieldsBoosts = new TreeMap<>();
for (int i = 0; i < size; i++) {
fieldsBoosts.put(in.readString(), in.readFloat());
}
type = Type.readFromStream(in);
operator = Operator.readFromStream(in);
analyzer = in.readOptionalString();
slop = in.readVInt();
fuzziness = in.readOptionalWriteable(Fuzziness::new);
prefixLength = in.readVInt();
maxExpansions = in.readVInt();
minimumShouldMatch = in.readOptionalString();
fuzzyRewrite = in.readOptionalString();
useDisMax = in.readOptionalBoolean();
tieBreaker = in.readOptionalFloat();
lenient = in.readBoolean();
cutoffFrequency = in.readOptionalFloat();
zeroTermsQuery = MatchQuery.ZeroTermsQuery.readFromStream(in);
}
示例3: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
int bulkArgsLength = in.readVInt();
if (bulkArgsLength == 0) {
bulkArgs = EMPTY_BULK_ARGS;
} else {
bulkArgs = new Object[bulkArgsLength][];
for (int i = 0; i < bulkArgsLength; i++) {
int bulkArgLength = in.readVInt();
bulkArgs[i] = new Object[bulkArgLength];
for (int j = 0; j < bulkArgLength; j++) {
bulkArgs[i][j] = in.readGenericValue();
}
}
}
}
示例4: MatchQueryBuilder
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
* Read from a stream.
*/
public MatchQueryBuilder(StreamInput in) throws IOException {
super(in);
fieldName = in.readString();
value = in.readGenericValue();
type = MatchQuery.Type.readFromStream(in);
operator = Operator.readFromStream(in);
slop = in.readVInt();
prefixLength = in.readVInt();
maxExpansions = in.readVInt();
fuzzyTranspositions = in.readBoolean();
lenient = in.readBoolean();
zeroTermsQuery = MatchQuery.ZeroTermsQuery.readFromStream(in);
// optional fields
analyzer = in.readOptionalString();
minimumShouldMatch = in.readOptionalString();
fuzzyRewrite = in.readOptionalString();
fuzziness = in.readOptionalWriteable(Fuzziness::new);
cutoffFrequency = in.readOptionalFloat();
}
示例5: MatrixStatsResults
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/** creates a results object from the given stream */
@SuppressWarnings("unchecked")
protected MatrixStatsResults(StreamInput in) {
try {
results = new RunningStats(in);
correlation = (Map<String, HashMap<String, Double>>) in.readGenericValue();
} catch (IOException e) {
throw new ElasticsearchException("Error trying to create multifield_stats results from stream input", e);
}
}
示例6: read
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
* Read from a stream.
*/
@SuppressWarnings("unchecked")
private void read(StreamInput in) throws IOException {
fields = (ArrayList<String>)in.readGenericValue();
valueType = in.readOptionalWriteable(ValueType::readFromStream);
format = in.readOptionalString();
missingMap = in.readMap();
}
示例7: readMissingValue
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
private static Object readMissingValue(StreamInput in) throws IOException {
final byte id = in.readByte();
switch (id) {
case 0:
return in.readGenericValue();
case 1:
return SortField.STRING_FIRST;
case 2:
return SortField.STRING_LAST;
default:
throw new IOException("Unknown missing value id: " + id);
}
}
示例8: doReadFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@SuppressWarnings("unchecked")
@Override
protected void doReadFrom(StreamInput in) throws IOException {
script = Script.readScript(in);
gapPolicy = GapPolicy.readFrom(in);
bucketsPathsMap = (Map<String, String>) in.readGenericValue();
}
示例9: SearchAfterBuilder
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
* Read from a stream.
*/
public SearchAfterBuilder(StreamInput in) throws IOException {
int size = in.readVInt();
sortValues = new Object[size];
for (int i = 0; i < size; i++) {
sortValues[i] = in.readGenericValue();
}
}
示例10: FieldSortBuilder
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
* Read from a stream.
*/
public FieldSortBuilder(StreamInput in) throws IOException {
fieldName = in.readString();
nestedFilter = in.readOptionalNamedWriteable(QueryBuilder.class);
nestedPath = in.readOptionalString();
missing = in.readGenericValue();
order = in.readOptionalWriteable(SortOrder::readFromStream);
sortMode = in.readOptionalWriteable(SortMode::readFromStream);
unmappedType = in.readOptionalString();
}
示例11: MatchPhrasePrefixQueryBuilder
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
* Read from a stream.
*/
public MatchPhrasePrefixQueryBuilder(StreamInput in) throws IOException {
super(in);
fieldName = in.readString();
value = in.readGenericValue();
slop = in.readVInt();
maxExpansions = in.readVInt();
analyzer = in.readOptionalString();
}
示例12: read
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
* Read from a stream.
*/
@SuppressWarnings("unchecked")
private void read(StreamInput in) throws IOException {
fields = (ArrayList<String>) in.readGenericValue();
valueType = in.readOptionalWriteable(ValueType::readFromStream);
format = in.readOptionalString();
missingMap = in.readMap();
}
开发者ID:scaleborn,项目名称:elasticsearch-linear-regression,代码行数:11,代码来源:MultiValuesSourceAggregationBuilder.java
示例13: doReadFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
protected void doReadFrom(StreamInput in) throws IOException {
if (in.readBoolean()) {
reduceScript = Script.readScript(in);
}
aggregation = in.readGenericValue();
}
示例14: CommonTermsQueryBuilder
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
* Read from a stream.
*/
public CommonTermsQueryBuilder(StreamInput in) throws IOException {
super(in);
fieldName = in.readString();
text = in.readGenericValue();
highFreqOperator = Operator.readFromStream(in);
lowFreqOperator = Operator.readFromStream(in);
analyzer = in.readOptionalString();
lowFreqMinimumShouldMatch = in.readOptionalString();
highFreqMinimumShouldMatch = in.readOptionalString();
disableCoord = in.readBoolean();
cutoffFrequency = in.readFloat();
}
示例15: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
super.readFrom(in);
int length = in.readVInt();
args = new Object[length];
for (int i = 0; i < length; i++) {
args[i] = in.readGenericValue();
}
}