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 Summary
Constructors Constructor Description SummarizeArgs()
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method Description SummarizeArgs
fields(String... fields)
Each field passed infields
is summarized.SummarizeArgs
fragments(int fragments)
How many fragments should be returned.SummarizeArgs
length(int length)
The number of context words each fragment should contain.SummarizeArgs
separator(String separator)
The string used to divide between individual summary snippets.List<String>
toArgs()
-
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
-
Methods inherited from interface io.quarkus.redis.datasource.RedisCommandExtraArguments
toArgs
-
-
-
-
Method Detail
-
fields
public SummarizeArgs fields(String... fields)
Each field passed infields
is summarized. If noFIELDS
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<String> toArgs()
- Specified by:
toArgs
in interfaceRedisCommandExtraArguments
- Returns:
- the list of arguments, encoded as a list of String.
-
-