Package com.tnsai.annotations
Enum Class Search.FallbackAction
- All Implemented Interfaces:
Serializable,Comparable<Search.FallbackAction>,Constable
- Enclosing class:
Search
Fallback actions on retrieval failure.
-
Nested Class Summary
Nested classes/interfaces inherited from class java.lang.Enum
Enum.EnumDesc<E extends Enum<E>> -
Enum Constant Summary
Enum ConstantsEnum ConstantDescriptionContinue without contextThrow exceptionRetry once with a punctuation-normalized query againstSearch.Strategy.KEYWORD, without reranking.Fall back to the expired cached result for the identical retrieval, rethrowing the failure when there is none. -
Method Summary
Modifier and TypeMethodDescriptionstatic Search.FallbackActionReturns the enum constant of this class with the specified name.static Search.FallbackAction[]values()Returns an array containing the constants of this enum class, in the order they are declared.Methods inherited from class java.lang.Enum
compareTo, describeConstable, equals, getDeclaringClass, hashCode, name, ordinal, toString, valueOf
-
Enum Constant Details
-
CONTINUE
Continue without context -
FAIL
Throw exception -
USE_CACHE
Fall back to the expired cached result for the identical retrieval, rethrowing the failure when there is none. RequiresSearch.cache(), and only serves an entry still withinSearch.maxStaleness()of its expiry — past that the original failure is rethrown, so a prolonged outage cannot keep answering from ever-older grounding. -
RETRY_SIMPLE
Retry once with a punctuation-normalized query againstSearch.Strategy.KEYWORD, without reranking.When
Search.rerank()is enabled the retry is still capped atSearch.topN()even though no reranker runs, so losing the reranker cannot widen the injected context beyond what the healthy path would have delivered. WithSearch.rerank()disabledSearch.topN()is unvalidated and applies to no path, primary or fallback, so the retry is bounded only bySearch.topK().
-
-
Method Details
-
values
Returns an array containing the constants of this enum class, in the order they are declared.- Returns:
- an array containing the constants of this enum class, in the order they are declared
-
valueOf
Returns the enum constant of this class with the specified name. The string must match exactly an identifier used to declare an enum constant in this class. (Extraneous whitespace characters are not permitted.)- Parameters:
name- the name of the enum constant to be returned.- Returns:
- the enum constant with the specified name
- Throws:
IllegalArgumentException- if this enum class has no constant with the specified nameNullPointerException- if the argument is null
-