Table of Contents

Method Boolean

Namespace
TantivyDotNet
Assembly
TantivyDotNet.dll

Boolean(IEnumerable<Query>?, IEnumerable<Query>?, IEnumerable<Query>?)

Combines clauses, like +a b -c in the query language.

public static BooleanQuery Boolean(IEnumerable<Query>? must = null, IEnumerable<Query>? should = null, IEnumerable<Query>? mustNot = null)

Parameters

must IEnumerable<Query>

Every one of these must match.

should IEnumerable<Query>

If there are no must clauses, at least one of these must match. Otherwise they are optional and only raise the score of documents they match.

mustNot IEnumerable<Query>

None of these may match. If these are the only clauses, the query matches every other document.

Returns

BooleanQuery

Remarks

A query with no clauses at all matches nothing.