本文整理汇总了Java中org.elasticsearch.common.io.stream.StreamInput.readOptionalBoolean方法的典型用法代码示例。如果您正苦于以下问题:Java StreamInput.readOptionalBoolean方法的具体用法?Java StreamInput.readOptionalBoolean怎么用?Java StreamInput.readOptionalBoolean使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类org.elasticsearch.common.io.stream.StreamInput
的用法示例。
在下文中一共展示了StreamInput.readOptionalBoolean方法的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Java代码示例。
示例1: 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);
}
示例2: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
name = in.readString();
generation = Long.parseLong(name.substring(1), Character.MAX_RADIX);
committed = in.readBoolean();
search = in.readBoolean();
docCount = in.readInt();
delDocCount = in.readInt();
sizeInBytes = in.readLong();
version = Lucene.parseVersionLenient(in.readOptionalString(), null);
compound = in.readOptionalBoolean();
mergeId = in.readOptionalString();
memoryInBytes = in.readLong();
if (in.readBoolean()) {
// verbose mode
ramTree = readRamTree(in);
}
}
示例3: MappingMetaData
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
public MappingMetaData(StreamInput in) throws IOException {
type = in.readString();
source = CompressedXContent.readCompressedString(in);
// routing
routing = new Routing(in.readBoolean());
if (in.getVersion().before(Version.V_6_0_0_alpha1_UNRELEASED)) {
// timestamp
boolean enabled = in.readBoolean();
if (enabled) {
throw new IllegalArgumentException("_timestamp may not be enabled");
}
in.readString(); // format
in.readOptionalString(); // defaultTimestamp
in.readOptionalBoolean(); // ignoreMissing
}
hasParentField = in.readBoolean();
}
示例4: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public IndexWarmersMetaData readFrom(StreamInput in) throws IOException {
Entry[] entries = new Entry[in.readVInt()];
for (int i = 0; i < entries.length; i++) {
String name = in.readString();
String[] types = in.readStringArray();
BytesReference source = null;
if (in.readBoolean()) {
source = in.readBytesReference();
}
Boolean queryCache;
queryCache = in.readOptionalBoolean();
entries[i] = new Entry(name, types, queryCache, source);
}
return new IndexWarmersMetaData(entries);
}
示例5: MovAvgPipelineAggregationBuilder
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
* Read from a stream.
*/
public MovAvgPipelineAggregationBuilder(StreamInput in) throws IOException {
super(in, NAME);
format = in.readOptionalString();
gapPolicy = GapPolicy.readFrom(in);
window = in.readVInt();
model = in.readNamedWriteable(MovAvgModel.class);
predict = in.readVInt();
minimize = in.readOptionalBoolean();
}
示例6: readFromWithId
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
public void readFromWithId(long id, StreamInput in) throws IOException {
this.id = id;
from = in.readVInt();
size = in.readVInt();
int numSortFieldsPlus1 = in.readVInt();
if (numSortFieldsPlus1 == 0) {
sortValueFormats = null;
} else {
sortValueFormats = new DocValueFormat[numSortFieldsPlus1 - 1];
for (int i = 0; i < sortValueFormats.length; ++i) {
sortValueFormats[i] = in.readNamedWriteable(DocValueFormat.class);
}
}
topDocs = readTopDocs(in);
if (hasAggs = in.readBoolean()) {
aggregations = InternalAggregations.readAggregations(in);
}
pipelineAggregators = in.readNamedWriteableList(PipelineAggregator.class).stream().map(a -> (SiblingPipelineAggregator) a)
.collect(Collectors.toList());
if (in.readBoolean()) {
suggest = Suggest.readSuggest(in);
}
searchTimedOut = in.readBoolean();
terminatedEarly = in.readOptionalBoolean();
profileShardResults = in.readOptionalWriteable(ProfileShardResult::new);
hasProfileResults = profileShardResults != null;
}
示例7: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
text = in.readText();
score = in.readFloat();
highlighted = in.readOptionalText();
collateMatch = in.readOptionalBoolean();
}
示例8: PhraseSuggestionBuilder
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
* Read from a stream.
*/
public PhraseSuggestionBuilder(StreamInput in) throws IOException {
super(in);
maxErrors = in.readFloat();
realWordErrorLikelihood = in.readFloat();
confidence = in.readFloat();
gramSize = in.readOptionalVInt();
model = in.readOptionalNamedWriteable(SmoothingModel.class);
forceUnigrams = in.readBoolean();
tokenLimit = in.readVInt();
preTag = in.readOptionalString();
postTag = in.readOptionalString();
separator = in.readString();
if (in.readBoolean()) {
collateQuery = new Script(in);
}
collateParams = in.readMap();
collatePrune = in.readOptionalBoolean();
int generatorsEntries = in.readVInt();
for (int i = 0; i < generatorsEntries; i++) {
String type = in.readString();
int numberOfGenerators = in.readVInt();
List<CandidateGenerator> generatorsList = new ArrayList<>(numberOfGenerators);
for (int g = 0; g < numberOfGenerators; g++) {
DirectCandidateGeneratorBuilder generator = new DirectCandidateGeneratorBuilder(in);
generatorsList.add(generator);
}
generators.put(type, generatorsList);
}
}
示例9: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
hits = SearchHits.readSearchHits(in);
if (in.readBoolean()) {
aggregations = InternalAggregations.readAggregations(in);
}
if (in.readBoolean()) {
suggest = Suggest.readSuggest(in);
}
timedOut = in.readBoolean();
terminatedEarly = in.readOptionalBoolean();
profileResults = in.readOptionalWriteable(SearchProfileShardResults::new);
numReducePhases = in.readVInt();
}
示例10: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
path = in.readOptionalString();
mount = in.readOptionalString();
type = in.readOptionalString();
total = in.readLong();
free = in.readLong();
available = in.readLong();
spins = in.readOptionalBoolean();
limit = in.readLong();
limitFree = in.readLong();
esUsed = in.readLong();
}
示例11: SimpleQueryStringBuilder
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
* Read from a stream.
*/
public SimpleQueryStringBuilder(StreamInput in) throws IOException {
super(in);
queryText = in.readString();
int size = in.readInt();
Map<String, Float> fields = new HashMap<>();
for (int i = 0; i < size; i++) {
String field = in.readString();
Float weight = in.readFloat();
fields.put(field, weight);
}
fieldsAndWeights.putAll(fields);
flags = in.readInt();
analyzer = in.readOptionalString();
defaultOperator = Operator.readFromStream(in);
if (in.getVersion().before(Version.V_5_1_1_UNRELEASED)) {
in.readBoolean(); // lowercase_expanded_terms
}
settings.lenient(in.readBoolean());
if (in.getVersion().onOrAfter(Version.V_5_1_1_UNRELEASED)) {
this.lenientSet = in.readBoolean();
}
settings.analyzeWildcard(in.readBoolean());
if (in.getVersion().before(Version.V_5_1_1_UNRELEASED)) {
in.readString(); // locale
}
minimumShouldMatch = in.readOptionalString();
if (in.getVersion().onOrAfter(Version.V_5_1_1_UNRELEASED)) {
settings.quoteFieldSuffix(in.readOptionalString());
useAllFields = in.readOptionalBoolean();
}
}
示例12: Path
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
/**
* Read from a stream.
*/
public Path(StreamInput in) throws IOException {
path = in.readOptionalString();
mount = in.readOptionalString();
type = in.readOptionalString();
total = in.readLong();
free = in.readLong();
available = in.readLong();
spins = in.readOptionalBoolean();
}
示例13: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
checkVersion(in.getVersion());
super.readFrom(in);
this.index = in.readOptionalString();
this.shard = in.readOptionalVInt();
this.primary = in.readOptionalBoolean();
this.currentNode = in.readOptionalString();
this.includeYesDecisions = in.readBoolean();
this.includeDiskInfo = in.readBoolean();
}
示例14: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
public MappingMetaData readFrom(StreamInput in) throws IOException {
String type = in.readString();
CompressedXContent source = CompressedXContent.readCompressedString(in);
// id
Id id = new Id(in.readBoolean() ? in.readString() : null);
// routing
Routing routing = new Routing(in.readBoolean(), in.readBoolean() ? in.readString() : null);
// timestamp
boolean enabled = in.readBoolean();
String path = in.readOptionalString();
String format = in.readString();
String defaultTimestamp = in.readOptionalString();
Boolean ignoreMissing = null;
ignoreMissing = in.readOptionalBoolean();
final Timestamp timestamp = new Timestamp(enabled, path, format, defaultTimestamp, ignoreMissing);
final boolean hasParentField = in.readBoolean();
final long mappingVersion = in.readLong();
ParsedVersion version = new ParsedVersion(null, VersionType.INTERNAL);
boolean hasVersionPath = in.readBoolean();
if (hasVersionPath) {
String versionPath = in.readString();
VersionType versionType = VersionType.fromValue(in.readByte());
version = new ParsedVersion(versionPath, versionType);
}
return new MappingMetaData(type, source, id, routing, timestamp, hasParentField, version, mappingVersion);
}
示例15: readFrom
import org.elasticsearch.common.io.stream.StreamInput; //导入方法依赖的package包/类
@Override
public void readFrom(StreamInput in) throws IOException {
offset = in.readVInt();
limit = in.readVInt();
outputs = Symbol.listFromStream(in);
int numOrderBy = in.readVInt();
if (numOrderBy > 0) {
reverseFlags = new boolean[numOrderBy];
for (int i = 0; i < reverseFlags.length; i++) {
reverseFlags[i] = in.readBoolean();
}
orderBy = new ArrayList<>(numOrderBy);
for (int i = 0; i < reverseFlags.length; i++) {
orderBy.add(Symbol.fromStream(in));
}
nullsFirst = new Boolean[numOrderBy];
for (int i = 0; i < numOrderBy; i++) {
nullsFirst[i] = in.readOptionalBoolean();
}
}
}