DEFINEMERGE

Use the DEFINEMERGE operator to define how the score of child nodes of the AND and OR should be merged.

The DEFINEMERGE operator can be used as operand(s) of any operators that allow AND or OR as operands. The score can be merged in three ways: picking the minimum value, picking the maximum value, or calculating the average score of all child nodes.

Use DEFINESCORE before using DEFINEMERGE.

Syntax

DEFINEMERGE ( (  (text_query1), (text_query2), ... )  , operator, merge_method )
Syntax Description

| — | — |

text_query1,2 … Defines the search criteria. These parameters can have any value that is valid for the AND/OR operator.
operator Defines the relationship between the two text_query parameters.
merge_method Defines how the score of the text_query should be merged. Possible values: MIN, MAX, AVG, ADD

Example for DEFINEMERGE Operator

'DEFINEMERGE (((dog , cat) , (blue or green)), AND, MIN )'

Queries for the expression “dog ACCUM cat” and “blue OR green,” using the default scoring schemes and then using the minimum score of the two as the merged-score.

'DEFINEMERGE( ((DEFINESCORE(dog, DISCRETE)) , (cat)), AND, MAX)'

Queries for the term “dog” using the DISCRETE scoring, and for the term “cat” using the default relevant scoring, and then using the maximum score of the two as the merged-score.

Example 3-1 DEFINEMERGE and text_query

The following examples show only the text_query part of a CONTAINS query:

'DEFINEMERGE ( ((dog), (cat)), OR, AVG)'

Queries for the term “dog” or “cat,” using the average relevance score of both terms as the merged score.

DEFINESCORE.