Elastic score decay if field tokens are in another field

Hi! Me need decrease score of document if in "field1" has tokens of "field2".
Tell me how can this be done?

That sounds more like an Elasticsearch question and I'll move the post. Also, how would the formula for the score look like? If that's a frequent query, I think you want to do some calculation at index-time already for that overlap (if it's independent of the query — your details are a bit vague there).

I do search for organizations.
The organization has a field with name of company and a field with the founders.
Search is conducted together on these fields. But name of founder can contain the same tokens as the name of the company. In this case, I do not need to increase the assessment of the document for the founder field. Therefore, the parent company will be valued lower than the companies in which it is the founder

When you say "parent company", does that mean we are talking across documents? Because that would be a totally different problem again than making that decision within a single document.

No, all this data is in one document.
Example of part document:

company: {
 shortName: "OOO Ivan"
 ceo: "Ivan Ivanov"

If shortName tokens has in ceo tokens, then score ceo not needed.

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