Class SearchSettings


  • public class SearchSettings
    extends Object
    Represents the search settings for an engine in AppSearch
    • Constructor Detail

      • SearchSettings

        public SearchSettings()
    • Method Detail

      • getResults

        public Collection<ResultField> getResults()
        Get the result fields
        Returns:
        the result fields
      • addResultField

        public SearchSettings addResultField​(ResultField resultField)
        Add a result field to the settings
        Parameters:
        resultField - the result field
        Returns:
        this search settings
      • addSearchField

        public SearchSettings addSearchField​(SearchField searchField)
        Adds a search field to the settings
        Parameters:
        searchField - the search field
        Returns:
        this search settings
      • getSearchFields

        public Collection<SearchField> getSearchFields()
        Get the search fields
        Returns:
        the search fields
      • getBoosts

        public List<Boost> getBoosts()
        Get the boosts
        Returns:
        the boosts
      • addBoost

        public SearchSettings addBoost​(Boost boost)
        Add Boost to the search settings
        Parameters:
        boost - the boost
        Returns:
        this search settings
      • getPrecision

        public Integer getPrecision()
        The value of the precision parameter must be an integer between 1 and 11, inclusive. The range of values represents a sliding scale that manages the inherent tradeoff between precision and recall. Lower values favor recall, while higher values favor precision.
        Returns:
        the precision
      • getPrecisionEnabled

        public Boolean getPrecisionEnabled()
        Whether precision is enabled on this engine
        Returns:
        true if precision is enabled, otherwise false
      • setPrecision

        public SearchSettings setPrecision​(Integer precision)
        The value of the precision parameter must be an integer between 1 and 11, inclusive. The range of values represents a sliding scale that manages the inherent tradeoff between precision and recall. Lower values favor recall, while higher values favor precision.
        Parameters:
        precision - the precision
        Returns:
        this.
      • setPrecisionEnabled

        public SearchSettings setPrecisionEnabled​(Boolean precisionEnabled)
        Whether precision is enabled on this engine
        Parameters:
        precisionEnabled - whether precision is enabled
        Returns:
        this.