Product Selector

Fusion 5.12
    Fusion 5.12

    Hybrid Query Stage

    Table of Contents

    The Hybrid Query stage performs hybrid lexical-semantic search that combines BM25-type lexical search with KNN dense vector search via Solr.

    This feature is only available in Fusion 5.9.5 and later versions of Fusion 5.9.

    Configuration

    When entering configuration values in the UI, use unescaped characters, such as \t for the tab character. When entering configuration values in the API, use escaped characters, such as \\t for the tab character.

    Hybrid of Vector and Lexical Search. Will be skipped if query string is blank or wildcard (* or *:*). Note this will not work well if the incoming q parameter is a Solr query parser string (e.g. field_t:foo) rather than a raw user query string. Note: The resulting query will ALWAYS be written to <request.params.q>.

    skip - boolean

    Set to true to skip this stage.

    Default: false

    label - string

    A unique label for this stage.

    <= 255 characters

    condition - string

    Define a conditional script that must result in true or false. This can be used to determine if the stage should process or not.

    lexicalQuery - stringrequired

    The lexical query itself is retrieved from here. This field supports Template Expressions such as '<request.params.q>' to evaluate the original user query.

    Default: <request.params.q>

    lexicalWeight - numberrequired

    Relative weight of the lexical query. If this value is 0, no re-ranking will be applied using the lexical query scores.

    <= 10

    exclusiveMaximum: false

    Default: 0.3

    lexicalDepth - integerrequired

    The number of lexical search results to include in re-ranking. This value is ignored if "Lexical Query Weight" is 0.

    Default: 1000

    vectorQueryField - stringrequired

    The name of the Solr field for knn vector search.

    vector - stringrequired

    The Vector itself is retrieved from here. This field supports Template Expressions such as '<ctx.vector>' to evaluate the context variable resulting from a previous stage, such as the Vectorize Query via Lucidworks AI stage.

    Default: <ctx.vector>

    vectorWeight - numberrequired

    Relative weight of the vector query.

    >= 0.001

    <= 10

    exclusiveMinimum: false

    exclusiveMaximum: false

    Default: 0.7

    knn - Use KNN Query

    Select this option if you wish to use the 'knn' query parser and configure its options. This option may not be selected if 'Use VecSim Query' is selected. Using 'knn' is the default if neither option is selected

    vectorDepth - integer

    The number of vector search results to include in re-ranking. Also known as topK.

    Default: 1000

    vecSim - Use VecSim Query

    Select this option if you wish to use the 'vecSim' query parser and configure its options. This option may not be selected if 'Use KNN Query' is selected. Using 'knn' is the default if neither option is selected

    minReturnSim - number

    The minimum vector similarity value to qualify as a match from the Vector portion of the hybrid query.

    <= 1

    exclusiveMaximum: false

    Default: 0.85

    minTraverseSim - number

    The minimum vector similarity value to use when walking the graph during the Vector portion of the hybrid query. Must be lower than, or equal to, the Min Return Vector Similarity

    <= 1

    exclusiveMaximum: false

    Default: 0.5

    minSimFilter - number

    Select this option if you wish to apply a minimum similarity threshold for filtering documents. This option will apply to all documents, regardless of other score boosting such as rules or signals.

    <= 1

    exclusiveMaximum: false