Search based on percentage of similarity

Hello, I am trying to find one or more names in a field of an index, but I need to indicate two values ​​in the search that reduce the results.
These two child values:
Percentage of similarity between searched and found words.
And percentage between words found and searched.
Example:
If I look for the names "Juan Perez"
and the possible results are:
Juan perez
Juan Saúl Pérez
Perez Roberto
The first case will have the values ​​100% and 100%
the second 100% and 66% * because more words were found than were searched.
And the third case will be 50% and 50%

The search would be: search for "Juan Perez" 100% 60%

With which I would return the first two results since the last one does not have percentages greater than those required.

I have several doubts:
The first is if you can add these parameters in the search for two percentage data.
The second is if I can perform this percentage calculation with some aggregation, script, etc.

I appreciate any collaboration
regards,
Joaquin

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