Class SummarizeArgs

java.lang.Object
io.quarkus.redis.datasource.search.SummarizeArgs
All Implemented Interfaces:
RedisCommandExtraArguments

public class SummarizeArgs extends Object implements RedisCommandExtraArguments
Allows configuring the summarizing.
  • Constructor Details

    • SummarizeArgs

      public SummarizeArgs()
  • Method Details

    • fields

      public SummarizeArgs fields(String... fields)
      Each field passed in fields is summarized. If no FIELDS directive is passed, then all fields returned are summarized.
      Parameters:
      fields - the fields
      Returns:
      the current SummarizeArgs
    • fragments

      public SummarizeArgs fragments(int fragments)
      How many fragments should be returned. If not specified, a default of 3 is used.
      Parameters:
      fragments - the number of fragment
      Returns:
      the current SummarizeArgs
    • length

      public SummarizeArgs length(int length)
      The number of context words each fragment should contain. Context words surround the found term. A higher value will return a larger block of text. If not specified, the default value is 20.
      Parameters:
      length - the length of each fragment
      Returns:
      the current SummarizeArgs
    • separator

      public SummarizeArgs separator(String separator)
      The string used to divide between individual summary snippets. The default is ... which is common among search engines; but you may override this with any other string if you desire to programmatically divide them later on. You may use a newline sequence, as newlines are stripped from the result body anyway (thus, it will not be conflated with an embedded newline in the text)
      Parameters:
      separator - the separator
      Returns:
      the current SummarizeArgs
    • toArgs

      public List<Object> toArgs()
      Specified by:
      toArgs in interface RedisCommandExtraArguments
      Returns:
      the list of arguments.