Class SearchFilter


public final class SearchFilter extends Object
This class is used to help construct valid OData filter expressions by automatically replacing, quoting, and escaping string parameters.

The constructed OData filter expression is used by AutocompleteOptions.setFilter(String), SearchOptions.setFilter(String), and SuggestOptions.setFilter(String).

For more information, see Filters in Azure Cognitive Search.

  • Method Details

    • create

      public static String create(String formattableString, Object... args)
      Create an OData filter expression from a formattable string.

      The format argument values will be quoted and escaped as necessary.

      formattableString - The formattable string.
      args - The arguments for the formattable string.
      A valid OData filter expression.