We use API to index our documents and store tags in our documents. Use tags as filters to search for the documents. We have a requirement to show documents with more tags from the user filter list that need to be displayed first.
Doc1 has tags A, B
Doc2 has tags A, C
Doc3 has tags A, B, C, D
User searches using filters A, C, D
Search results should be displayed in the sorted order with docs which have more -> less user filter tags
Doc3(A, C, D),
Any suggestions or ideas will be greatly appreciated.