# How to add exact text search to vector search

**Assumed Knowledge**: Vectors\
**Target Audience:** General Audience / Python developers\
**Reading Time:** 3 minutes

There are sometimes search cases where pure vector search often does not provide the best solution. For example - we can take the simple case of product SKUs in retail e-commerce. Product SKUs are the name of the products.&#x20;

### E-Commerce Case Study

**Weakness Of Vector Search**

Below, we use an example of vector search where an individual searches for an SKU. However, the search results encode the letters and fail to realize/return the right SKU. We also attach a code example using the Vector AI client for those interested in trying this out.&#x20;

```
search_results = vi_client.search(
collection_name, 
text_encoder.encode('R170NZKAXSA'), 'name_vector_', page_size=3)
vi_client.show_json(search_results, selected_fields=['_id', 'name', 'sku'],
    image_fields=['image_url'], image_width=150)
```

![Result from pure vector search](https://1051526003-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MTAoGc3QCIn04xUpURg%2F-MUlpyatwu8ZaSl1FAFQ%2F-MUlq7lbqkBxc8NTmPzU%2Fimage.png?alt=media\&token=30505b46-6155-40fb-b591-11ce6d98c6b1)

In these situations, our search should properly return the right value when given the SKU. In turn, hybrid search can return the right result.

```
search_results = vi_client.hybrid_search(collection_name, 'R170NZKAXSA',
      text_encoder.encode('R170NZKAXSA'),
      fields=['name_vector_'], text_fields=['name'],
      traditional_weight=0.015,
      page_size=3)
vi_client.show_json(search_results, selected_fields=['_id', 'name', 'sku'],
    image_fields=['image_url'], image_width=150)
```

![Hybrid search example](https://1051526003-files.gitbook.io/~/files/v0/b/gitbook-legacy-files/o/assets%2F-MTAoGc3QCIn04xUpURg%2F-MUm7_2U3f8BtIut459O%2F-MUm85UjzzaLkCT5uWIO%2Fimage.png?alt=media\&token=ca03e9e9-b421-42bd-a9ae-c8b3b1047a38)

From above, we realize that the value of hybrid search allows us to match items/products when exact values are known by the searcher.&#x20;

If you are interested in exploring documentation around hybrid search, you can find that [here.](https://vector-ai.github.io/vectorai/vector_search.html?highlight=hybrid_search#vectorai.api.search.ViSearchClient.hybrid_search)
