Tabnine Logo
StreamInput.readFloat
Code IndexAdd Tabnine to your IDE (free)

How to use
readFloat
method
in
org.elasticsearch.common.io.stream.StreamInput

Best Java code snippets using org.elasticsearch.common.io.stream.StreamInput.readFloat (Showing top 20 results out of 315)

origin: org.elasticsearch/elasticsearch

/**
 * Read from a stream.
 */
public QueryRescorerBuilder(StreamInput in) throws IOException {
  super(in);
  queryBuilder = in.readNamedWriteable(QueryBuilder.class);
  scoreMode = QueryRescoreMode.readFromStream(in);
  rescoreQueryWeight = in.readFloat();
  queryWeight = in.readFloat();
}
origin: org.elasticsearch/elasticsearch

public float[] readFloatArray() throws IOException {
  int length = readArraySize();
  float[] values = new float[length];
  for (int i = 0; i < length; i++) {
    values[i] = readFloat();
  }
  return values;
}
origin: org.elasticsearch/elasticsearch

/**
 * Read from a stream.
 */
public DisMaxQueryBuilder(StreamInput in) throws IOException {
  super(in);
  queries.addAll(readQueries(in));
  tieBreaker = in.readFloat();
}
origin: org.elasticsearch/elasticsearch

IndexBoost(StreamInput in) throws IOException {
  index = in.readString();
  boost = in.readFloat();
}
origin: org.elasticsearch/elasticsearch

protected AbstractQueryBuilder(StreamInput in) throws IOException {
  boost = in.readFloat();
  queryName = in.readOptionalString();
}
origin: org.elasticsearch/elasticsearch

/**
 * Read from a stream.
 */
public BoostingQueryBuilder(StreamInput in) throws IOException {
  super(in);
  positiveQuery = in.readNamedWriteable(QueryBuilder.class);
  negativeQuery = in.readNamedWriteable(QueryBuilder.class);
  negativeBoost = in.readFloat();
}
origin: org.elasticsearch/elasticsearch

@Nullable
public Float readOptionalFloat() throws IOException {
  if (readBoolean()) {
    return readFloat();
  }
  return null;
}
origin: org.elasticsearch/elasticsearch

public static ScoreDoc readScoreDoc(StreamInput in) throws IOException {
  return new ScoreDoc(in.readVInt(), in.readFloat());
}
origin: org.elasticsearch/elasticsearch

/**
 * Read from a stream.
 */
public TermSuggestionBuilder(StreamInput in) throws IOException {
  super(in);
  suggestMode = SuggestMode.readFromStream(in);
  accuracy = in.readFloat();
  sort = SortBy.readFromStream(in);
  stringDistance = StringDistanceImpl.readFromStream(in);
  maxEdits = in.readVInt();
  maxInspections = in.readVInt();
  maxTermFreq = in.readFloat();
  prefixLength = in.readVInt();
  minWordLength = in.readVInt();
  minDocFreq = in.readFloat();
}
origin: org.elasticsearch/elasticsearch

/**
 * Read from a stream.
 */
public FieldValueFactorFunctionBuilder(StreamInput in) throws IOException {
  super(in);
  field = in.readString();
  factor = in.readFloat();
  missing = in.readOptionalDouble();
  modifier = FieldValueFactorFunction.Modifier.readFromStream(in);
}
origin: org.elasticsearch/elasticsearch

@Override
public void readFrom(StreamInput in) throws IOException {
  text = in.readText();
  score = in.readFloat();
  highlighted = in.readOptionalText();
  collateMatch = in.readOptionalBoolean();
}
origin: org.elasticsearch/elasticsearch

/**
 * Read from a stream.
 */
public FunctionScoreQueryBuilder(StreamInput in) throws IOException {
  super(in);
  query = in.readNamedWriteable(QueryBuilder.class);
  filterFunctionBuilders = in.readList(FilterFunctionBuilder::new).toArray(new FilterFunctionBuilder[0]);
  maxBoost = in.readFloat();
  minScore = in.readOptionalFloat();
  boostMode = in.readOptionalWriteable(CombineFunction::readFromStream);
  scoreMode = FunctionScoreQuery.ScoreMode.readFromStream(in);
}
origin: org.elasticsearch/elasticsearch

public static Explanation readExplanation(StreamInput in) throws IOException {
  boolean match = in.readBoolean();
  String description = in.readString();
  final Explanation[] subExplanations = new Explanation[in.readVInt()];
  for (int i = 0; i < subExplanations.length; ++i) {
    subExplanations[i] = readExplanation(in);
  }
  if (match) {
    return Explanation.match(in.readFloat(), description, subExplanations);
  } else {
    return Explanation.noMatch(description, subExplanations);
  }
}
origin: org.elasticsearch/elasticsearch

public static FieldDoc readFieldDoc(StreamInput in) throws IOException {
  Comparable[] cFields = new Comparable[in.readVInt()];
  for (int j = 0; j < cFields.length; j++) {
    byte type = in.readByte();
    if (type == 0) {
      cFields[j] = null;
    } else if (type == 1) {
      cFields[j] = in.readString();
    } else if (type == 2) {
      cFields[j] = in.readInt();
    } else if (type == 3) {
      cFields[j] = in.readLong();
    } else if (type == 4) {
      cFields[j] = in.readFloat();
    } else if (type == 5) {
      cFields[j] = in.readDouble();
    } else if (type == 6) {
      cFields[j] = in.readByte();
    } else if (type == 7) {
      cFields[j] = in.readShort();
    } else if (type == 8) {
      cFields[j] = in.readBoolean();
    } else if (type == 9) {
      cFields[j] = in.readBytesRef();
    } else {
      throw new IOException("Can't match type [" + type + "]");
    }
  }
  return new FieldDoc(in.readVInt(), in.readFloat(), cFields);
}
origin: org.elasticsearch/elasticsearch

public static Comparable readSortValue(StreamInput in) throws IOException {
  byte type = in.readByte();
  if (type == 0) {
    return null;
  } else if (type == 1) {
    return in.readString();
  } else if (type == 2) {
    return in.readInt();
  } else if (type == 3) {
    return in.readLong();
  } else if (type == 4) {
    return in.readFloat();
  } else if (type == 5) {
    return in.readDouble();
  } else if (type == 6) {
    return in.readByte();
  } else if (type == 7) {
    return in.readShort();
  } else if (type == 8) {
    return in.readBoolean();
  } else if (type == 9) {
    return in.readBytesRef();
  } else {
    throw new IOException("Can't match type [" + type + "]");
  }
}
origin: org.elasticsearch/elasticsearch

/**
 * 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();
  if (in.getVersion().before(Version.V_6_0_0_alpha1)) {
    in.readBoolean(); // disable_coord
  }
  cutoffFrequency = in.readFloat();
}
origin: org.elasticsearch/elasticsearch

@Override
public void readFrom(StreamInput in) throws IOException {
  super.readFrom(in);
  searchRequest = new SearchRequest();
  searchRequest.readFrom(in);
  abortOnVersionConflict = in.readBoolean();
  size = in.readVInt();
  refresh = in.readBoolean();
  timeout = in.readTimeValue();
  activeShardCount = ActiveShardCount.readFrom(in);
  retryBackoffInitialTime = in.readTimeValue();
  maxRetries = in.readVInt();
  requestsPerSecond = in.readFloat();
  slices = in.readVInt();
}
origin: org.elasticsearch/elasticsearch

@Override
public void readFrom(StreamInput in) throws IOException {
  final boolean hasTotalHits;
  if (in.getVersion().onOrAfter(Version.V_6_0_0_beta1)) {
    hasTotalHits = in.readBoolean();
  } else {
    hasTotalHits = true;
  }
  if (hasTotalHits) {
    totalHits = in.readVLong();
  } else {
    totalHits = -1;
  }
  maxScore = in.readFloat();
  int size = in.readVInt();
  if (size == 0) {
    hits = EMPTY;
  } else {
    hits = new SearchHit[size];
    for (int i = 0; i < hits.length; i++) {
      hits[i] = SearchHit.readSearchHit(in);
    }
  }
  if (in.getVersion().onOrAfter(Version.V_6_6_0)) {
    sortFields = in.readOptionalArray(Lucene::readSortField, SortField[]::new);
    collapseField = in.readOptionalString();
    collapseValues = in.readOptionalArray(Lucene::readSortValue, Object[]::new);
  }
}
origin: org.elasticsearch/elasticsearch

boostAtt.setBoost(perFieldTermVectorInput.readFloat());
origin: org.elasticsearch/elasticsearch

public Status(StreamInput in) throws IOException {
  if (in.getVersion().onOrAfter(Version.V_5_1_1)) {
    sliceId = in.readOptionalVInt();
  } else {
    sliceId = null;
  }
  total = in.readVLong();
  updated = in.readVLong();
  created = in.readVLong();
  deleted = in.readVLong();
  batches = in.readVInt();
  versionConflicts = in.readVLong();
  noops = in.readVLong();
  bulkRetries = in.readVLong();
  searchRetries = in.readVLong();
  throttled = in.readTimeValue();
  requestsPerSecond = in.readFloat();
  reasonCancelled = in.readOptionalString();
  throttledUntil = in.readTimeValue();
  if (in.getVersion().onOrAfter(Version.V_5_1_1)) {
    sliceStatuses = in.readList(stream -> stream.readOptionalWriteable(StatusOrException::new));
  } else {
    sliceStatuses = emptyList();
  }
}
org.elasticsearch.common.io.streamStreamInputreadFloat

Popular methods of StreamInput

  • readString
  • readVInt
    Reads an int stored in variable-length format. Reads between one and five bytes. Smaller values take
  • readBoolean
  • readOptionalString
  • readVLong
    Reads a long stored in variable-length format. Reads between one and ten bytes. Smaller values take
  • readInt
    Reads four bytes and returns an int.
  • readBytesReference
    Reads a bytes reference from this stream, might hold an actual reference to the underlying bytes of
  • getVersion
    The version of the node on the other side of this stream.
  • readLong
    Reads eight bytes and returns a long.
  • readMap
  • readOptionalWriteable
  • readStringArray
  • readOptionalWriteable,
  • readStringArray,
  • readByte,
  • readGenericValue,
  • readNamedWriteable,
  • readBytesRef,
  • readOptionalBytesReference,
  • read,
  • readList

Popular in Java

  • Reading from database using SQL prepared statement
  • setContentView (Activity)
  • getResourceAsStream (ClassLoader)
  • getExternalFilesDir (Context)
  • HttpServer (com.sun.net.httpserver)
    This class implements a simple HTTP server. A HttpServer is bound to an IP address and port number a
  • BorderLayout (java.awt)
    A border layout lays out a container, arranging and resizing its components to fit in five regions:
  • OutputStream (java.io)
    A writable sink for bytes.Most clients will use output streams that write data to the file system (
  • URLConnection (java.net)
    A connection to a URL for reading or writing. For HTTP connections, see HttpURLConnection for docume
  • LinkedList (java.util)
    Doubly-linked list implementation of the List and Dequeinterfaces. Implements all optional list oper
  • Reflections (org.reflections)
    Reflections one-stop-shop objectReflections scans your classpath, indexes the metadata, allows you t
  • Best IntelliJ plugins
Tabnine Logo
  • Products

    Search for Java codeSearch for JavaScript code
  • IDE Plugins

    IntelliJ IDEAWebStormVisual StudioAndroid StudioEclipseVisual Studio CodePyCharmSublime TextPhpStormVimGoLandRubyMineEmacsJupyter NotebookJupyter LabRiderDataGripAppCode
  • Company

    About UsContact UsCareers
  • Resources

    FAQBlogTabnine AcademyTerms of usePrivacy policyJava Code IndexJavascript Code Index
Get Tabnine for your IDE now