App Search Conditional boost?

Hi,

As the title said, I am using app search and would like to stick to it so I mean also not using the elasticsearch endpoint it has.

Is it possible to create a conditional boost, meaning. Only boost if the document has both.

Example:
doc: field1: 1,233 , field2: "ONE" , field3: "ACTIVE" ...

I want to boost this document on field1; because it has both field2 as ONE and field3 as ACTIVE.
If this were to have field3 as INACTIVE I would not want to boost this document at all.

Currently what I see is that this cannot be done in the Kibana UI/Relevance Tuning.

I was hoping that this could be done using the API.

Kind Regards,
Chenko

Hi @Chenko unfortunately the App Search API is simpler and thus not as fine-tuneable as the larger Elasticsearch query DSL.

Depending on what your data looks like, you could potentially look at adding additional fields to your index that have the combined value that you want - e.g. something like combinedField: 1233_ACTIVE and then boost on that value. But since value boosts require an exact match, that could be a nonstarter if you have a lot of unique values.

1 Like

Thanks, as we thought, what you suggested is something we might use!