
BooleanQuery.Builder
- Namespace
- Rowles.LeanCorpus.Search.Queries
- Assembly
- Rowles.LeanCorpus.dll
Builds an immutable BooleanQuery.
public sealed class BooleanQuery.Builder
BooleanQuery.Builder
Examples
var query = new BooleanQuery.Builder()
.Add(new TermQuery("title", "corpus"), Occur.Must)
.Add(new TermQuery("status", "active"), Occur.Should)
.Build();
Add(Query, Occur)
Adds a sub-query with the specified occurrence type.
Build()
Builds and returns a frozen (immutable) BooleanQuery.
WithBoost(float)
Sets the boost factor applied to the whole query.