MCPcopy Create free account
hub / github.com/BaseXdb/basex / textNode

Method textNode

basex-core/src/main/java/org/basex/util/ft/Scoring.java:57–60  ·  view source on GitHub ↗

Calculates the score for a text node. Used if no index score is available. @param number number of pos values @param size total number of index entries @param token token length @param length text length @return score

(final int number, final int size, final int token,
      final int length)

Source from the content-addressed store, hash-verified

55 * @return score
56 */
57 public static double textNode(final int number, final int size, final int token,
58 final int length) {
59 return max((double) number / size, log(token * number + 1) / log(length + 1));
60 }
61}

Callers 1

scoreMethod · 0.95

Calls 2

maxMethod · 0.45
logMethod · 0.45

Tested by

no test coverage detected