BM25: How not to add up document lengths for each element in array field

One of the fields in our search is an array of person names. We see that when searching for a the name of a single person, documents with several people attached score lower. From what I can tell this is because the document length dl in the BM25 algorithm is accumulated over the whole list of people.

Is there a way not to score documents with several people lower? For now my only idea is to set b=0 for the person field and so discount document length altogether, although I expect this not to be ideal – we’d still like to take into account document length within each person name.

Note that our full search is a bool search with several multimatch queries etc, but the behaviour described above is retained when paring it down to searching the person field only.

You could consider modeling your person field as a nested field, which would probably get you what you want scoring but increase query complexity.

You could also look at a function_score query.