Class: Ferret::Search::BooleanQuery::BooleanClause

Inherits:
Object
  • Object
show all
Defined in:
ext/r_search.c

Overview

Summary

A BooleanClause holes a single query within a BooleanQuery specifying wither the query :must match, :should match or :must_not match. BooleanClauses can be used to pass a clause from one BooleanQuery to another although it is generally easier just to add a query directly to a BooleanQuery using the BooleanQuery#add_query method.

Example

clause1 = BooleanClause.new(query1, :should)
clause2 = BooleanClause.new(query2, :should)

query = BooleanQuery.new
query << clause1 << clause2