Class PostSearchOptions.Builder

java.lang.Object
com.ibm.cloud.cloudant.v1.model.PostSearchOptions.Builder
Enclosing class:
PostSearchOptions

public static class PostSearchOptions.Builder extends Object
Builder.
  • Constructor Details

    • Builder

      public Builder()
      Instantiates a new builder.
    • Builder

      public Builder(String db, String ddoc, String index, String query)
      Instantiates a new builder with required properties.
      Parameters:
      db - the db
      ddoc - the ddoc
      index - the index
      query - the query
  • Method Details

    • build

      public PostSearchOptions build()
      Builds a PostSearchOptions.
      Returns:
      the new PostSearchOptions instance
    • addHighlightFields

      public PostSearchOptions.Builder addHighlightFields(String highlightFields)
      Adds a new element to highlightFields.
      Parameters:
      highlightFields - the new element to be added
      Returns:
      the PostSearchOptions builder
    • addIncludeFields

      public PostSearchOptions.Builder addIncludeFields(String includeFields)
      Adds a new element to includeFields.
      Parameters:
      includeFields - the new element to be added
      Returns:
      the PostSearchOptions builder
    • addSort

      public PostSearchOptions.Builder addSort(String sort)
      Adds a new element to sort.
      Parameters:
      sort - the new element to be added
      Returns:
      the PostSearchOptions builder
    • addCounts

      public PostSearchOptions.Builder addCounts(String counts)
      Adds a new element to counts.
      Parameters:
      counts - the new element to be added
      Returns:
      the PostSearchOptions builder
    • addDrilldown

      public PostSearchOptions.Builder addDrilldown(List<String> drilldown)
      Adds a new element to drilldown.
      Parameters:
      drilldown - the new element to be added
      Returns:
      the PostSearchOptions builder
    • addGroupSort

      public PostSearchOptions.Builder addGroupSort(String groupSort)
      Adds a new element to groupSort.
      Parameters:
      groupSort - the new element to be added
      Returns:
      the PostSearchOptions builder
    • db

      Set the db.
      Parameters:
      db - the db
      Returns:
      the PostSearchOptions builder
    • ddoc

      public PostSearchOptions.Builder ddoc(String ddoc)
      Set the ddoc.
      Parameters:
      ddoc - the ddoc
      Returns:
      the PostSearchOptions builder
    • index

      public PostSearchOptions.Builder index(String index)
      Set the index.
      Parameters:
      index - the index
      Returns:
      the PostSearchOptions builder
    • query

      public PostSearchOptions.Builder query(String query)
      Set the query.
      Parameters:
      query - the query
      Returns:
      the PostSearchOptions builder
    • bookmark

      public PostSearchOptions.Builder bookmark(String bookmark)
      Set the bookmark.
      Parameters:
      bookmark - the bookmark
      Returns:
      the PostSearchOptions builder
    • highlightFields

      public PostSearchOptions.Builder highlightFields(List<String> highlightFields)
      Set the highlightFields. Existing highlightFields will be replaced.
      Parameters:
      highlightFields - the highlightFields
      Returns:
      the PostSearchOptions builder
    • highlightNumber

      public PostSearchOptions.Builder highlightNumber(long highlightNumber)
      Set the highlightNumber.
      Parameters:
      highlightNumber - the highlightNumber
      Returns:
      the PostSearchOptions builder
    • highlightPostTag

      public PostSearchOptions.Builder highlightPostTag(String highlightPostTag)
      Set the highlightPostTag.
      Parameters:
      highlightPostTag - the highlightPostTag
      Returns:
      the PostSearchOptions builder
    • highlightPreTag

      public PostSearchOptions.Builder highlightPreTag(String highlightPreTag)
      Set the highlightPreTag.
      Parameters:
      highlightPreTag - the highlightPreTag
      Returns:
      the PostSearchOptions builder
    • highlightSize

      public PostSearchOptions.Builder highlightSize(long highlightSize)
      Set the highlightSize.
      Parameters:
      highlightSize - the highlightSize
      Returns:
      the PostSearchOptions builder
    • includeDocs

      public PostSearchOptions.Builder includeDocs(Boolean includeDocs)
      Set the includeDocs.
      Parameters:
      includeDocs - the includeDocs
      Returns:
      the PostSearchOptions builder
    • includeFields

      public PostSearchOptions.Builder includeFields(List<String> includeFields)
      Set the includeFields. Existing includeFields will be replaced.
      Parameters:
      includeFields - the includeFields
      Returns:
      the PostSearchOptions builder
    • limit

      public PostSearchOptions.Builder limit(long limit)
      Set the limit.
      Parameters:
      limit - the limit
      Returns:
      the PostSearchOptions builder
    • sort

      public PostSearchOptions.Builder sort(List<String> sort)
      Set the sort. Existing sort will be replaced.
      Parameters:
      sort - the sort
      Returns:
      the PostSearchOptions builder
    • stale

      public PostSearchOptions.Builder stale(String stale)
      Set the stale.
      Parameters:
      stale - the stale
      Returns:
      the PostSearchOptions builder
    • counts

      public PostSearchOptions.Builder counts(List<String> counts)
      Set the counts. Existing counts will be replaced.
      Parameters:
      counts - the counts
      Returns:
      the PostSearchOptions builder
    • drilldown

      public PostSearchOptions.Builder drilldown(List<List<String>> drilldown)
      Set the drilldown. Existing drilldown will be replaced.
      Parameters:
      drilldown - the drilldown
      Returns:
      the PostSearchOptions builder
    • groupField

      public PostSearchOptions.Builder groupField(String groupField)
      Set the groupField.
      Parameters:
      groupField - the groupField
      Returns:
      the PostSearchOptions builder
    • groupLimit

      public PostSearchOptions.Builder groupLimit(long groupLimit)
      Set the groupLimit.
      Parameters:
      groupLimit - the groupLimit
      Returns:
      the PostSearchOptions builder
    • groupSort

      public PostSearchOptions.Builder groupSort(List<String> groupSort)
      Set the groupSort. Existing groupSort will be replaced.
      Parameters:
      groupSort - the groupSort
      Returns:
      the PostSearchOptions builder
    • ranges

      Set the ranges.
      Parameters:
      ranges - the ranges
      Returns:
      the PostSearchOptions builder