# Relevance Issues in Vector Search

**URL:** https://discuss.elastic.co/t/relevance-issues-in-vector-search/352180
**Category:** Elasticsearch
**Tags:** vector-search
**Created:** [January 31, 2024, 11:14am UTC](https://discuss.elastic.co/t/relevance-issues-in-vector-search/352180 "2024-01-31T11:14:31Z")
**Posts on this page:** 2
**Page:** 1

<div class="post-metadata">

### Author: ![Adrien\_Corb](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/adrien_corb/32/131263_2.png) [@Adrien\_Corb](https://discuss.elastic.co/u/Adrien_Corb)
#### Post date: [January 31, 2024, 11:14am UTC](https://discuss.elastic.co/t/relevance-issues-in-vector-search/352180/1 "2024-01-31T11:14:31Z")

</div>

Hello,

I am in the process of testing self-hosted solutions. I'm encountering an issue with vector search. My goal is to index pages of a website that mainly consists of a title and content. I have created two dense\_vector fields for the title and content:

```auto
["mappings"]["properties"]["title_vector"] = [
"type" => "dense_vector",
"dims" => 512,
"index" => true,
];
["mappings"]["properties"]["content_vector"] = [
"type" => "dense_vector",
"dims" => 512,
"index" => true,
];

```

I am using the "FlaubertModel" transformer to convert the title and content into vectors. However, when using KNN for search, I am getting inconsistent results.

I'm not sure if this is due to improper use of dimensions, the model used to obtain the vectors not being suitable, or if my strategy is not sound. For example, it might not be appropriate to convert the entire content of a page into a vector, and instead, it might be better to convert a summary of a page for more consistent results.

Example of search:

```auto
[
"field" => "title_vector",
"query_vector" => $searchVector,
"k" => 5,
"num_candidates" => 10,
"boost" => 0.8
],
[
"field" => "content_vector",
"query_vector" => $searchVector,
"k" => 20,
"num_candidates" => 100,
"similarity" => 20,
"boost" => 0.5
]

```

thank you

---

<div class="post-metadata">

### Author: ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)
#### Post date: [February 28, 2024, 11:15am UTC](https://discuss.elastic.co/t/relevance-issues-in-vector-search/352180/2 "2024-02-28T11:15:25Z")

</div>

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
