Class QueryOptions.Builder

java.lang.Object
com.ibm.watson.discovery.v1.model.QueryOptions.Builder
Enclosing class:
QueryOptions

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

    • Builder

      public Builder()
      Instantiates a new builder.
    • Builder

      public Builder​(String environmentId, String collectionId)
      Instantiates a new builder with required properties.
      Parameters:
      environmentId - the environmentId
      collectionId - the collectionId
  • Method Details

    • build

      public QueryOptions build()
      Builds a QueryOptions.
      Returns:
      the new QueryOptions instance
    • environmentId

      public QueryOptions.Builder environmentId​(String environmentId)
      Set the environmentId.
      Parameters:
      environmentId - the environmentId
      Returns:
      the QueryOptions builder
    • collectionId

      public QueryOptions.Builder collectionId​(String collectionId)
      Set the collectionId.
      Parameters:
      collectionId - the collectionId
      Returns:
      the QueryOptions builder
    • filter

      public QueryOptions.Builder filter​(String filter)
      Set the filter.
      Parameters:
      filter - the filter
      Returns:
      the QueryOptions builder
    • query

      public QueryOptions.Builder query​(String query)
      Set the query.
      Parameters:
      query - the query
      Returns:
      the QueryOptions builder
    • naturalLanguageQuery

      public QueryOptions.Builder naturalLanguageQuery​(String naturalLanguageQuery)
      Set the naturalLanguageQuery.
      Parameters:
      naturalLanguageQuery - the naturalLanguageQuery
      Returns:
      the QueryOptions builder
    • passages

      public QueryOptions.Builder passages​(Boolean passages)
      Set the passages.
      Parameters:
      passages - the passages
      Returns:
      the QueryOptions builder
    • aggregation

      public QueryOptions.Builder aggregation​(String aggregation)
      Set the aggregation.
      Parameters:
      aggregation - the aggregation
      Returns:
      the QueryOptions builder
    • count

      public QueryOptions.Builder count​(long count)
      Set the count.
      Parameters:
      count - the count
      Returns:
      the QueryOptions builder
    • xReturn

      public QueryOptions.Builder xReturn​(String xReturn)
      Set the xReturn.
      Parameters:
      xReturn - the xReturn
      Returns:
      the QueryOptions builder
    • offset

      public QueryOptions.Builder offset​(long offset)
      Set the offset.
      Parameters:
      offset - the offset
      Returns:
      the QueryOptions builder
    • sort

      public QueryOptions.Builder sort​(String sort)
      Set the sort.
      Parameters:
      sort - the sort
      Returns:
      the QueryOptions builder
    • highlight

      public QueryOptions.Builder highlight​(Boolean highlight)
      Set the highlight.
      Parameters:
      highlight - the highlight
      Returns:
      the QueryOptions builder
    • passagesFields

      public QueryOptions.Builder passagesFields​(String passagesFields)
      Set the passagesFields.
      Parameters:
      passagesFields - the passagesFields
      Returns:
      the QueryOptions builder
    • passagesCount

      public QueryOptions.Builder passagesCount​(long passagesCount)
      Set the passagesCount.
      Parameters:
      passagesCount - the passagesCount
      Returns:
      the QueryOptions builder
    • passagesCharacters

      public QueryOptions.Builder passagesCharacters​(long passagesCharacters)
      Set the passagesCharacters.
      Parameters:
      passagesCharacters - the passagesCharacters
      Returns:
      the QueryOptions builder
    • deduplicate

      public QueryOptions.Builder deduplicate​(Boolean deduplicate)
      Set the deduplicate.
      Parameters:
      deduplicate - the deduplicate
      Returns:
      the QueryOptions builder
    • deduplicateField

      public QueryOptions.Builder deduplicateField​(String deduplicateField)
      Set the deduplicateField.
      Parameters:
      deduplicateField - the deduplicateField
      Returns:
      the QueryOptions builder
    • similar

      public QueryOptions.Builder similar​(Boolean similar)
      Set the similar.
      Parameters:
      similar - the similar
      Returns:
      the QueryOptions builder
    • similarDocumentIds

      public QueryOptions.Builder similarDocumentIds​(String similarDocumentIds)
      Set the similarDocumentIds.
      Parameters:
      similarDocumentIds - the similarDocumentIds
      Returns:
      the QueryOptions builder
    • similarFields

      public QueryOptions.Builder similarFields​(String similarFields)
      Set the similarFields.
      Parameters:
      similarFields - the similarFields
      Returns:
      the QueryOptions builder
    • bias

      public QueryOptions.Builder bias​(String bias)
      Set the bias.
      Parameters:
      bias - the bias
      Returns:
      the QueryOptions builder
    • spellingSuggestions

      public QueryOptions.Builder spellingSuggestions​(Boolean spellingSuggestions)
      Set the spellingSuggestions.
      Parameters:
      spellingSuggestions - the spellingSuggestions
      Returns:
      the QueryOptions builder
    • xWatsonLoggingOptOut

      public QueryOptions.Builder xWatsonLoggingOptOut​(Boolean xWatsonLoggingOptOut)
      Set the xWatsonLoggingOptOut.
      Parameters:
      xWatsonLoggingOptOut - the xWatsonLoggingOptOut
      Returns:
      the QueryOptions builder