# Different query weightings on properties inside one collection

**URL:** <https://forum.weaviate.io/t/different-query-weightings-on-properties-inside-one-collection/1471>\
**Category:** Support\
**Created:** [February 13, 2024, 7:25pm UTC](https://forum.weaviate.io/t/different-query-weightings-on-properties-inside-one-collection/1471 "2024-02-13T19:25:46Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Lawrence\_Hope](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/lawrence_hope/32/926_2.png) [@Lawrence\_Hope](https://forum.weaviate.io/u/Lawrence_Hope)\
**Post date:** [February 13, 2024, 7:25pm UTC](https://forum.weaviate.io/t/different-query-weightings-on-properties-inside-one-collection/1471/1 "2024-02-13T19:25:46Z")

</div>

For example, I have title, description and review in one book collection. When do the near text query, is there any way to assign different weights of each field? like title is 5, description is 2, review is 1.

I know there is rerank, but the weighting results will get the CORRECT set of first query results. I think this is better than increase the limit range to 3 or 5 times then use rerank to focus back on the best query results.

Thanks,

---

<div class="post-metadata">

**Author:** ![sebawita](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/sebawita/32/5_2.png) [@sebawita](https://forum.weaviate.io/u/sebawita)\
**Post date:** [February 15, 2024, 11:11am UTC](https://forum.weaviate.io/t/different-query-weightings-on-properties-inside-one-collection/1471/2 "2024-02-15T11:11:58Z")

</div>

Hi @Lawrence_Hope,

## Yes, Weights for keyword-based queries

You can add weights to a query that uses keyword search – bm25, or hybrid (which combines keyword and vector search).

Here is a python example from [docs - hybrid search](https://weaviate.io/developers/weaviate/search/hybrid#set-weights-on-property-values):

```python
jeopardy = client.collections.get("JeopardyQuestion")
    response = jeopardy.query.hybrid(
        query="food",
        query_properties=["question^2", "answer"],
        alpha=0.25,
        limit=3
    )

```

The key element is the `^2` part, which tells Weaviat to 2x the score for a match on that property. You can add more of these values:

```auto
query_properties=["title^3", "genre", "author^2"],

```

## No weights for vector search (yet… see below)

However, for vector search like `near_text`, you cannot give extra weights for matching to specific properties.  
This is because, each object has one vector embedding. When you run a vector search, there is no way to distinguish between a match on a specific field, as we search on the whole embedding.

## NamedVectors coming soon

As an FYI, we are working to add support for multiple vector embeddings per object, so you could have a separate embedding for a title, and another one for description, and a third one that combines multiple properties.

Note, in the first release, we will only allow you to search on one named vector, so you won’t be able to add weights to it just yet. But we are planning to add mixed vector search next.

I hope this helps 🙂

---

<div class="post-metadata">

**Author:** ![Lawrence\_Hope](https://yyz1.discourse-cdn.com/flex027/user_avatar/forum.weaviate.io/lawrence_hope/32/926_2.png) [@Lawrence\_Hope](https://forum.weaviate.io/u/Lawrence_Hope)\
**Post date:** [February 22, 2024, 6:00pm UTC](https://forum.weaviate.io/t/different-query-weightings-on-properties-inside-one-collection/1471/3 "2024-02-22T18:00:59Z")

</div>

Great to know this feature is in plan. This will help Weaviate jumps out from other vector DB.
