Table of Contents

Public classSealed 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();

Public method Add(Query, Occur)

Adds a sub-query with the specified occurrence type.

Public method Build()

Builds and returns a frozen (immutable) BooleanQuery.

Public method WithBoost(float)

Sets the boost factor applied to the whole query.