You are here:
Run Hybrid Search Queries with Query API
Use Query API to run hybrid searches in Data 360. Use these examples as starting points.
This syntax runs a hybrid search in the Query Editor.
select * from hybrid_search(
table(<Search_Index_DMO>),
'<Search String>',
'<PreFilteringColumn><Operator><Value>',
'<Limit Results>)';
Input Parameters
- <Search_Index_DMO> is the API name of the index DMO.
- <Search String> is the search text for the hybrid search.
- <PreFilteringColumn> is the pre-filter condition.
- <Limit Results> is the number of results to return.
Result Parameters
- RecordId__c is a unique identifier for the result. This parameter has the same value as the SourceRecordId__c field.
- SourceRecordId__c is the identifier for the source (Chunk DMO) record associated with this result. You can use it in a join expression with the Chunk DMO table.
- vector_score__c is the similarity score returned by the underlying vector search index.
- keyword_score__c is the similarity score returned by the underlying keyword search index.
- hybrid_score__c is the derived score from combining the keyword and vector scores. This score takes ranking factors, such as popularity and recency, into account, which influences the rank of the results.
This syntax runs a hybrid search without pre-filter conditions.
select * from hybrid_search(
table(Knowledge_full_index__dlm),
'How to input special mark/character when using keyboard input data field','', 2)Query Result

This syntax runs a hybrid search with pre-filter conditions.
select * from hybrid_search(
table(Knowledge_full_index__dlm),
'How to input special mark/character when using keyboard input data field',
'RecordId__c=''b7e66a34-15e3-43c6-8d84-9af80cd121d6''', 5);Query Result


