Skip to content

Fix config and rankingOrder #1

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

Merged
merged 1 commit into from
Feb 28, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# This file is for unifying the coding style for different editors and IDEs
# editorconfig.org

root = true

[*]
end_of_line = lf
charset = utf-8
trim_trailing_whitespace = true
insert_final_newline = true

[**.py]
indent_style = space
indent_size = 4

[**.html]
indent_style = space
indent_size = 4
3 changes: 3 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,9 @@ _Will be generalized soon for all documentations_

This project supports Python 3.6+.

Set both environment variables `APPLICATION_ID` and `API_KEY`.

Then, run:
```bash
$ pipenv install
$ pipenv shell
Expand Down
9 changes: 3 additions & 6 deletions config/config.json
Original file line number Diff line number Diff line change
Expand Up @@ -6,8 +6,8 @@
"stop_urls": [],
"selectors": {
"lvl0": {
"selector": ".sidebar-heading",
"global": false,
"selector": ".sidebar-heading.open",
"global": true,
"default_value": "Documentation"
},
"lvl1": ".theme-default-content h1",
Expand All @@ -31,9 +31,6 @@
"lang"
]
},
"conversation_id": [
"1067906698"
],
"scrap_start_urls": true,
"nb_hits": 998
"nb_hits": 920
}
40 changes: 40 additions & 0 deletions config/config_original.json
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
{
"index_name": "9tz3lqoi",
"start_urls": [
"https://docs.meilisearch.com"
],
"stop_urls": [],
"selectors": {
"lvl0": {
"selector": "p.sidebar-heading.open",
"global": true,
"default_value": "Documentation"
},
"lvl1": ".theme-default-content h1",
"lvl2": ".theme-default-content h2",
"lvl3": ".theme-default-content h3",
"lvl4": ".theme-default-content h4",
"lvl5": ".theme-default-content h5",
"text": ".theme-default-content p, .theme-default-content li",
"lang": {
"selector": "/html/@lang",
"type": "xpath",
"global": true,
"default_value": "en-US"
}
},
"selectors_exclude": [
".table-of-contents"
],
"strip_chars": " .,;:#",
"custom_settings": {
"attributesForFaceting": [
"lang"
]
},
"conversation_id": [
"1067906698"
],
"scrap_start_urls": false,
"nb_hits": 898
}
8 changes: 4 additions & 4 deletions scraper/src/meilisearch_helper.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,10 +45,10 @@ class MeiliSearchHelper:
# Go to the end of this file to understand criteria order
SETTINGS = {
"rankingOrder": [
"_number_of_words",
"_sum_of_typos",
"_sum_of_words_attribute",
"_word_proximity",
"_words",
"_typo",
"_attribute",
"_proximity",
"_exact",
"page_rank",
"level",
Expand Down