Пример #1
0
  @Override
  public NodeIter iter(final QueryContext ctx) throws QueryException {
    final FTIter ir = ftexpr.iter(ctx);

    return new NodeIter() {
      @Override
      public ANode next() throws QueryException {
        final FTNode it = ir.next();
        if (it != null) {
          // add entry to visualization
          if (ctx.ftpos != null) ctx.ftpos.add(it.data, it.pre, it.all);
          // assign scoring, if not done yet
          it.score();
          // remove matches reference to save memory
          it.all = null;
        }
        return it;
      }
    };
  }
Пример #2
0
 @Override
 public void plan(final Serializer ser) throws IOException {
   ser.openElement(this, DATA, token(ictx.data.meta.name));
   ftexpr.plan(ser);
   ser.closeElement();
 }
Пример #3
0
 @Override
 public Expr remove(final Var v) {
   ftexpr.remove(v);
   return this;
 }
Пример #4
0
 @Override
 public boolean removable(final Var v) {
   return ftexpr.removable(v);
 }
Пример #5
0
 @Override
 public int count(final Var v) {
   return ftexpr.count(v);
 }
Пример #6
0
 @Override
 public boolean uses(final Use u) {
   return ftexpr.uses(u);
 }
Пример #7
0
 @Override
 public boolean has(final Flag flag) {
   for (final FTExpr e : exprs) if (e.has(flag)) return true;
   return false;
 }
Пример #8
0
 /**
  * Checks if sub expressions of a mild not operator violate the grammar.
  *
  * @return result of check
  */
 boolean usesExclude() {
   for (final FTExpr e : exprs) if (e.usesExclude()) return true;
   return false;
 }