The search algorithm is currently made of a single bloc. It should become modularised, with the full-text search just one of the features.
The search algorithm could be as follows:
Perform the (Xapian-based) full-text search, as currently done. That full-text search returns:
a list of main/idempotent matches, i.e., matches with the same match percentage, usually 100%, for instance when the search is done for a given country such as 'fr';
potentially a list of alternative matches, i.e., matches with lower match percentages.
All the matches are returned with their full details:
The search algorithm is currently made of a single bloc. It should become modularised, with the full-text search just one of the features.
The search algorithm could be as follows: