# Synonym Search example using GraphQL query

**URL:** <https://forum.weaviate.io/t/synonym-search-example-using-graphql-query/7691>\
**Category:** Support\
**Created:** [November 19, 2024, 7:31am UTC](https://forum.weaviate.io/t/synonym-search-example-using-graphql-query/7691 "2024-11-19T07:31:47Z")\
**Posts on this page:** 5\
**Page:** 1

<div class="post-metadata">

**Author:** ![Praveenkasani](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/praveenkasani/32/2402_2.png) [@Praveenkasani](https://forum.weaviate.io/u/Praveenkasani)\
**Post date:** [November 19, 2024, 7:31am UTC](https://forum.weaviate.io/t/synonym-search-example-using-graphql-query/7691/1 "2024-11-19T07:31:47Z")

</div>

### Description

Can you please provide an example GraphQL query for synonym search in weaviate. I wanted to know the vectorizers that can be used.

My example is simple as below:

When a user search for ‘phone’, he has to see results such Mobile, smartphones, ‘call’ etc..

Thanks for the Help in Advance!!!

### Server Setup Information

- Weaviate Server Version:
- Deployment Method: 
- Multi Node? Number of Running Nodes:
- Client Language and Version:
- Multitenancy?:

### Any additional Information

---

<div class="post-metadata">

**Author:** ![Shahin](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/shahin/32/7944_2.png) [@Shahin](https://forum.weaviate.io/u/Shahin)\
**Post date:** [November 19, 2024, 11:48am UTC](https://forum.weaviate.io/t/synonym-search-example-using-graphql-query/7691/2 "2024-11-19T11:48:34Z")

</div>

Hi @Praveenkasani, how are you doing?

You can use a basic hybrid search example like this:

> {  
> Get {  
> JeopardyQuestion(  
> limit: 3  
> hybrid: {  
> query: “food”  
> }  
> ) {  
> question  
> answer  
> }  
> }  
> }

Or a more advanced example with additional control:

> {  
> Get {  
> JeopardyQuestion(  
> limit: 3  
> hybrid: {  
> query: “food”  
> properties: [“question^2”, “answer”]  
> alpha: 0.25  
> }  
> ) {  
> question  
> answer  
> }  
> }  
> }

Have you seen Hybrid search documentation? it will help you greatly for this.

> **[Hybrid search | Weaviate](https://weaviate.io/developers/weaviate/search/hybrid)**
>
> Hybrid search combines the results of a vector search and a keyword (BM25F) search by fusing the two result sets.

Regards,  
Mohamed Shahin,  
Weaviate Support

---

<div class="post-metadata">

**Author:** ![Praveenkasani](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/praveenkasani/32/2402_2.png) [@Praveenkasani](https://forum.weaviate.io/u/Praveenkasani)\
**Post date:** [November 19, 2024, 12:13pm UTC](https://forum.weaviate.io/t/synonym-search-example-using-graphql-query/7691/3 "2024-11-19T12:13:39Z")

</div>

Hi Shahnin,

Thanks for the reply, I will go through the queries and Hybrid search documentation.

Regards,  
Praveen

---

<div class="post-metadata">

**Author:** ![Praveenkasani](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/praveenkasani/32/2402_2.png) [@Praveenkasani](https://forum.weaviate.io/u/Praveenkasani)\
**Post date:** [November 25, 2024, 6:51am UTC](https://forum.weaviate.io/t/synonym-search-example-using-graphql-query/7691/4 "2024-11-25T06:51:30Z")

</div>

Hi Shahnin,

I tried with the above query but looks like search is happening on all fields in my dictionary.

Below is my hybrid query and under the property I have only question and answers but the results are fetched with respect to subjects or topics also i.e. ‘Car’ word doesn’t exist in question or answers but exist in subjects/topics.

Can you help me with the exact synonym search query on the select fields i.e. I should query only on question & answer fields but should be able to retrieve all other fields of that document.

Also, Please provide the modules that can be used for synonym’s. As of now we are using the below modules for our dictionary:

 ![image](https://canada1.discourse-cdn.com/flex027/uploads/weaviate/original/2X/e/ec731048bf2aefc8fe97c727896a80f8d3d5eede.png)  
Thanks in Advance!!!

{  
Get {  
MyDictionary\_1(  
where: {  
operator: And,  
operands: [  
{ path: [“attribute3”],  
operator: Equal,  
valueString: “abcd”  
}  
{ path: [“attribute1”],  
operator: Equal,  
valueString: “xyz”  
}  
{ path: [“attribute2”],  
operator: Equal,  
valueString: “subject”  
}  
]  
}  
hybrid: {  
query:“car”,  
properties: [“question”, “answers”]  
alpha:0.25  
}  
limit:100  
) {  
answers  
question  
subjects  
topics

```
}

```

}  
}

---

<div class="post-metadata">

**Author:** ![Shahin](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/shahin/32/7944_2.png) [@Shahin](https://forum.weaviate.io/u/Shahin)\
**Post date:** [November 25, 2024, 3:14pm UTC](https://forum.weaviate.io/t/synonym-search-example-using-graphql-query/7691/5 "2024-11-25T15:14:15Z")

</div>

Hi @Praveenkasani,

I’m not familiar with your schema; the example I shared was a general one to illustrate how to structure a hybrid search. Could you share your schema with me?

Additionally, regarding the modules you’re referring to, are you using OpenAI, Google Palm, or Cohere APIs for vectorization? Weaviate can integrate with these providers to leverage their capabilities.

Have you seen this guide if you are using our Cloud services?

Regards,  
Mohamed Shahin  
Weaviate Support
