@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;
      }
    };
  }
 @Override
 public void plan(final Serializer ser) throws IOException {
   ser.openElement(this, DATA, token(ictx.data.meta.name));
   ftexpr.plan(ser);
   ser.closeElement();
 }
 @Override
 public Expr remove(final Var v) {
   ftexpr.remove(v);
   return this;
 }
 @Override
 public boolean removable(final Var v) {
   return ftexpr.removable(v);
 }
 @Override
 public int count(final Var v) {
   return ftexpr.count(v);
 }
 @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;
 }