New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Les majuscules impactent les résultats de recherche #4223
Comments
Du coup, petit devoir pour @vhf : exécuter ces deux commandes et me donner les retours: curl "localhost:9200/zds_search/_search?explain&pretty" -d '{"from":0, "size": 10, "query": {"function_score": {"query": {"bool": {"should": [{"bool": {"must": [{"match": {"_type": "chapter"}}, {"multi_match": {"fields": ["title", "text"], "query": "nazara"}}]}}, {"function_score": {"query": {"bool": {"must": [{"match": {"_type": "publishedcontent"}}, {"multi_match": {"fields": ["title", "description", "categories", "tags", "text"], "query": "nazara"}}]}}, "functions": [{"filter": {"match": {"content_type": "TUTORIAL"}}, "weight": 1.0}, {"filter": {"match": {"content_type": "ARTICLE"}}, "weight": 1.0}], "boost_mode": "multiply"}}, {"function_score": {"query": {"bool": {"must": [{"match": {"_type": "topic"}}, {"terms": {"forum_pk": [1, 2, 3, 16, 17, 18, 19, 20, 21, 22, 23, 24]}}, {"multi_match": {"fields": ["title", "subtitle", "tags"], "query": "nazara"}}]}}, "functions": [{"filter": {"match": {"is_solved": true}}, "weight": 1.1}, {"filter": {"match": {"is_sticky": true}}, "weight": 1.2}, {"filter": {"match": {"is_locked": true}}, "weight": 0.1}], "boost_mode": "multiply"}}, {"function_score": {"query": {"bool": {"must": [{"match": {"_type": "post"}}, {"terms": {"forum_pk": [1, 2, 3, 16, 17, 18, 19, 20, 21, 22, 23, 24]}}, {"term": {"is_visible": true}}, {"multi_match": {"fields": ["text_html"], "query": "nazara"}}]}}, "functions": [{"filter": {"match": {"position": 1}}, "weight": 1.2}, {"filter": {"match": {"is_useful": true}}, "weight": 1.5}, {"filter": {"range": {"like_dislike_ratio": {"gt": 1}}}, "weight": 1.05}, {"filter": {"range": {"like_dislike_ratio": {"lt": 1}}}, "weight": 0.95}], "boost_mode": "multiply"}}]}}, "functions": [{"filter": {"match": {"_type": "topic"}}, "weight": 2.0}, {"filter": {"match": {"_type": "publishedcontent"}}, "weight": 3.0}, {"filter": {"match": {"_type": "post"}}, "weight": 1.0}, {"filter": {"match": {"_type": "chapter"}}, "weight": 1.5}], "boost_mode": "multiply"}}}' curl "localhost:9200/zds_search/_search?explain&pretty" -d '{"from":0, "size": 10, "query": {"function_score": {"query": {"bool": {"should": [{"bool": {"must": [{"match": {"_type": "chapter"}}, {"multi_match": {"fields": ["title", "text"], "query": "Nazara"}}]}}, {"function_score": {"query": {"bool": {"must": [{"match": {"_type": "publishedcontent"}}, {"multi_match": {"fields": ["title", "description", "categories", "tags", "text"], "query": "Nazara"}}]}}, "functions": [{"filter": {"match": {"content_type": "TUTORIAL"}}, "weight": 1.0}, {"filter": {"match": {"content_type": "ARTICLE"}}, "weight": 1.0}], "boost_mode": "multiply"}}, {"function_score": {"query": {"bool": {"must": [{"match": {"_type": "topic"}}, {"terms": {"forum_pk": [1, 2, 3, 16, 17, 18, 19, 20, 21, 22, 23, 24]}}, {"multi_match": {"fields": ["title", "subtitle", "tags"], "query": "Nazara"}}]}}, "functions": [{"filter": {"match": {"is_solved": true}}, "weight": 1.1}, {"filter": {"match": {"is_sticky": true}}, "weight": 1.2}, {"filter": {"match": {"is_locked": true}}, "weight": 0.1}], "boost_mode": "multiply"}}, {"function_score": {"query": {"bool": {"must": [{"match": {"_type": "post"}}, {"terms": {"forum_pk": [1, 2, 3, 16, 17, 18, 19, 20, 21, 22, 23, 24]}}, {"term": {"is_visible": true}}, {"multi_match": {"fields": ["text_html"], "query": "Nazara"}}]}}, "functions": [{"filter": {"match": {"position": 1}}, "weight": 1.2}, {"filter": {"match": {"is_useful": true}}, "weight": 1.5}, {"filter": {"range": {"like_dislike_ratio": {"gt": 1}}}, "weight": 1.05}, {"filter": {"range": {"like_dislike_ratio": {"lt": 1}}}, "weight": 0.95}], "boost_mode": "multiply"}}]}}, "functions": [{"filter": {"match": {"_type": "topic"}}, "weight": 2.0}, {"filter": {"match": {"_type": "publishedcontent"}}, "weight": 3.0}, {"filter": {"match": {"_type": "post"}}, "weight": 1.0}, {"filter": {"match": {"_type": "chapter"}}, "weight": 1.5}], "boost_mode": "multiply"}}}' Bon, ça va générer BEAUCOUP de texte, donc on fait comme la fois passée, utilise des gists. D'avance merci :) Note pour le futur: la liste des forums en local et en live ne matchent évidement pas. Pas oublier de la changer par |
Trouvé : https://www.elastic.co/guide/en/elasticsearch/reference/5.2/keyword.html#keyword
|
Est-ce qu'on n'a pas oublié de fermer ? |
Du forum:
Et en effet : nazara vs Nazara.
Ce qui est bizarre, parce que Elasticsearch est configuré chez nous pour être case insensitive. De plus, Elasticsearch comprend à priori la même chose:
The text was updated successfully, but these errors were encountered: