/** * Adds a boolean clause with a * {@link org.apache.lucene.search.BooleanClause.Occur#MUST_NOT} operator. * <p> * Use this method for clauses that must not appear in the matching documents. * * @see {@link org.apache.lucene.search.BooleanClause.Occur#MUST_NOT} */ public AbstractBooleanQuery without(final AbstractNodeQuery node) { clauses.add(new BasicQueryClause(node, Occur.MUST_NOT)); return this; }
/** * Adds a boolean clause with a * {@link org.apache.lucene.search.BooleanClause.Occur#SHOULD} operator. * <p> * Use this method for clauses that should appear in the matching documents. * * @see {@link org.apache.lucene.search.BooleanClause.Occur#SHOULD} */ public AbstractBooleanQuery optional(final AbstractNodeQuery node) { clauses.add(new BasicQueryClause(node, Occur.SHOULD)); return this; }
/** * Adds a boolean clause with a * {@link org.apache.lucene.search.BooleanClause.Occur#MUST} operator. * <p> * Use this method for clauses that must appear in the matching documents. * * @see {@link org.apache.lucene.search.BooleanClause.Occur#MUST} */ public AbstractBooleanQuery with(final AbstractNodeQuery node) { clauses.add(new BasicQueryClause(node, Occur.MUST)); return this; }
/** * Adds a child clause with a * {@link NodeBooleanClause.Occur#MUST} operator. * <p> * Use this method for child clauses that must appear in the matching twigs. * * @see NodeBooleanClause.Occur#MUST * @see com.sindicetech.siren.search.node.TwigQuery#addChild(NodeQuery, NodeBooleanClause.Occur) */ public TwigQuery with(final AbstractNodeQuery child) { clauses.add(new BasicQueryClause(child, Occur.MUST)); return this; }
/** * Adds a child clause with a * {@link NodeBooleanClause.Occur#MUST_NOT} operator. * <p> * Use this method for child clauses that must not appear in the matching * twigs. * * @see NodeBooleanClause.Occur#MUST_NOT * @see com.sindicetech.siren.search.node.TwigQuery#addChild(NodeQuery, NodeBooleanClause.Occur) */ public TwigQuery without(final AbstractNodeQuery child) { clauses.add(new BasicQueryClause(child, Occur.MUST_NOT)); return this; }
/** * Adds a child clause with a * {@link NodeBooleanClause.Occur#SHOULD} operator. * <p> * Use this method for child clauses that should appear in the matching * twigs. * * @see NodeBooleanClause.Occur#SHOULD * @see com.sindicetech.siren.search.node.TwigQuery#addChild(NodeQuery, NodeBooleanClause.Occur) */ public TwigQuery optional(final AbstractNodeQuery child) { clauses.add(new BasicQueryClause(child, Occur.SHOULD)); return this; }