Beispiel #1
0
  @Override
  public FTNode item(final QueryContext qc, final InputInfo ii) throws QueryException {
    if (pos == 0) pos = ++qc.ftPos;
    matches.reset(pos);

    final int c = contains(qc);
    if (c == 0) matches.size(0);

    // scoring: include number of tokens for calculations
    return new FTNode(matches, c == 0 ? 0 : Scoring.word(c, qc.ftToken.count()));
  }