CombinedFieldQuery.Builder (Lucene 10.5.1 sandbox API)
Description: declaration: package: org.apache.lucene.sandbox.search, class: CombinedFieldQuery, class: Builder

Package org.apache.lucene.sandbox.search

# Class CombinedFieldQuery.Builder

java.lang.Object
org.apache.lucene.sandbox.search.CombinedFieldQuery.Builder

Enclosing class:
  `CombinedFieldQuery`

public static class CombinedFieldQuery.Builder extends Object
A builder for `CombinedFieldQuery`.

- ## Constructor Summary

  Constructors
  Constructor
  Description
  `Builder()`

- ## Method Summary

  Modifier and Type
  Method
  Description
  `CombinedFieldQuery.Builder`
  `addField(String field)`
  Adds a field to this builder.
  `CombinedFieldQuery.Builder`
  `addField(String field, float weight)`
  Adds a field to this builder.
  `CombinedFieldQuery.Builder`
  `addTerm(BytesRef term)`
  Adds a term to this builder.
  `CombinedFieldQuery`
  `build()`
  Builds the `CombinedFieldQuery`.

  ### Methods inherited from class java.lang.Object

  `clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

- ## Constructor Details

  - ### Builder

    public Builder()

- ## Method Details

  - ### addField

    public CombinedFieldQuery.Builder addField(String field)
    Adds a field to this builder.
    Parameters:
      `field` - The field name.

  - ### addField

    public CombinedFieldQuery.Builder addField(String field, float weight)
    Adds a field to this builder.
    Parameters:
      `field` - The field name.
      `weight` - The weight associated to this field.

  - ### addTerm

    public CombinedFieldQuery.Builder addTerm(BytesRef term)
    Adds a term to this builder.

  - ### build

    public CombinedFieldQuery build()
    Builds the `CombinedFieldQuery`.