Identify promoted documents in curated search response

Hi, how can I identify promoted documents in a curated search response? I had a check for result["_meta"]["score"] === 1 which seemed to work, but with the recent upgrade to 7.15, now the promoted documents have "score": 1.7014122e+38

I need to be able to identify in my app which results in a curated search are promoted - how can I do this?

Thanks!

Hi @brentonkbrn ! Welcome to the Elastic community!

As you said, on 7.15 score for curated results is calculated differently. Score for curated results is now a very high value.

I'm trying to find an exact answer for a threshold value that you can use to determine if a result is curated or not. But you can start using this information to start building your solution.

Pick a very high score value (for instance, 1.0e+20) and check that every non-curated result has a score lower than that value.

Hopefully this helps. I'll come back when I get a more definitive solution.

Hi @Carlos_D , that does help - thanks! Right now my check to identify promoted documents is "score" > 1000 but I probably need to increase that value right?

I believe it will be safe to do so. You can experiment with the returned scores for the promoted documents.

Maybe 1.0e+15 would be safe? Seems high enough for any score returned by organic documents. Your mileage may vary depending on boosts and weights.

Ok I'm using that - thanks!