- Improve sort by relevancy of search results with several words
- At now search results have strange order, when we type several words. For example, I type
brick-prod rootand see results in this order:
- Брик: площадка prod - staging.brick
- Брик: сервер brick-prod: mysql user - brick
- Брик: brick-osm2 - root
- Брик: сервер brick-prod: linux user - brick
- [email protected]
- Брик: сервер brick-prod: linux user - root
- Брик: сервер brick-prod: mysql user - root
- Брик: сервер brick-prod: solr user - brick
- Брик: сервер brick-dev - root
- Брик: сервер brick-osm - root
- Брик: сервер brick-osm - brick
- Брик: сервер brick-dev mysql - root
The searched item is bold.
- Why needed item have only 6’th place, instead of first, if it have best relevancy to typed search string?
- And why on 3 place there is item, that even don’t have “prod” or “brick-prod” word, not in name or in any other field, and not have any substring match?
- Does the search algorithm add some boost to name field, comparing to other fields?
Can anybody please describe, why current ordering of search results so terrible?
Solution for this problem can be improving search ordering algorithm, that will order results by those rules:
- Boost full word matches first, than part-word.
- Boost matches in “Name” field, comparing to other field.
- If typed word have hypens (
brick-prodin my example) - boost the exact match.
- Boost full substring match. And, maybe, also allow to type exact phrase (in quotes) to make full subsrtring search, instead of fulltext search.
What do you think about proposed idea?