Build constant score as sum of fields matching

i have documents that have the following fields:
title, gender,brand, category
i want to run an exact query and score each hit with a constant score, lets say:
title = 100,
gender = 50,
color = 200,
category = 300.

so if i search "red dress"
i would like to get as a score:
300 for red in color and dress in the title.
500 for red in color and dress in the category.
600 for red and dress in the title and dress in the category.
and so on.
the constant score is important because i need to scale it later to a score between 0-100 or 0-1
i can set up boosting per query but i cant set different boosting per different fields, only "^", but i am using constant_score query hence "^" doesn' matter.
what would be the best approach to have score like the following:
score = sum(term is in title)*100 +sum(term is in gender)*50+sum(term is in color)*200+sum(term is in category)*300
or even without sum, just bool
score = bool(term is in title)*100 +bool(term is in gender)*50+bool(term is in color)*200+bool(term is in category)*300


Hi @Maor_Nissan!

Is it possible that you are using elasticsearch rather than Enterprise Search (which includes App Search and Workplace Search)? If so, the Elastic Stack subforum would be a better place to ask this question.

If you are indeed using Enterprise Search, you can use Relevance Tuning (which is part of App Search) to better control the scoring of documents. However, I'm sorry to say there is no way to control the exact scores.