WIP: prototype a global document search rank
The goal is to improve all searches which do not have any explicit sort order.
Assign a search rank based on the document categories.
This already give good result when search a person name. If this person has many documents (task, order, ...) linked to it, the Person document will be returned in the first results.
We could imagine to also use the document workflow state to help validated document to be returned before archived one or stateless documents.
There are 2 main blocking points currently:
- how to ensure the rank sorting is efficient with millions of documents
- calculating the rank needs to crawl all documents, which is too slow with millions of documents