---
schema_version: "1"
id: f41db3ffb47ffa60c88516228e63ca85974d1900b61c5549b010b311875e47ae
title: Run Hybrid Search Queries with Query API
collection: admin
version: current
locale: en-us
portal_url: https://docs.salesforce.com/admin/current/en-us/data/264-0-0/c360_a_hybridsearch_index_query.md
canonical_url: https://help.salesforce.com/s/articleView?id=data.c360_a_hybridsearch_index_query.htm&release=264.0.0&type=5
source_site: help.salesforce.com
content_type: documentation
content_hash: f4445ba7118e684c7d86738d28219afa8268ce14467d256736d1c310b559fa14
description: Use Query API to run hybrid searches in Data 360. Use these examples as starting points.
products:
  - Data 360
release: "264"
---
# Run Hybrid Search Queries with Query API

Use Query API to run hybrid searches in Data 360. Use these examples as starting points.

![Example](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-data-data_cloud-264-0-0-production-enus/f3569962-3c9b-4f83-9d0c-b6a574e785da/images/icon_example.png)

Example

This syntax runs a hybrid search in the Query Editor.

```sql
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.

```sql
select * from hybrid_search(
       table(Knowledge_full_index__dlm),
       'How to input special mark/character when using keyboard input data field','', 2)
```

Query Result

![Image shows results from running the query in Data 360 Query Editor.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-data-data_cloud-264-0-0-production-enus/f3569962-3c9b-4f83-9d0c-b6a574e785da/data_cloud/images/hs-Q1-results.png)

This syntax runs a hybrid search with pre-filter conditions.

```sql
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

![Image shows results from running the query in Data 360 Query Editor.](https://sf-zdocs-cdn-prod.zoominsoftware.com/tdta-data-data_cloud-264-0-0-production-enus/f3569962-3c9b-4f83-9d0c-b6a574e785da/data_cloud/images/hs-Q2-results.png)