Skip to content

Commit 2fe53e0

Browse files
authored
Merge pull request #1 from meilisearch/config
Fix config and rankingOrder
2 parents c5ac650 + 6505d53 commit 2fe53e0

File tree

5 files changed

+68
-10
lines changed

5 files changed

+68
-10
lines changed

.editorconfig

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
# This file is for unifying the coding style for different editors and IDEs
2+
# editorconfig.org
3+
4+
root = true
5+
6+
[*]
7+
end_of_line = lf
8+
charset = utf-8
9+
trim_trailing_whitespace = true
10+
insert_final_newline = true
11+
12+
[**.py]
13+
indent_style = space
14+
indent_size = 4
15+
16+
[**.html]
17+
indent_style = space
18+
indent_size = 4

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,9 @@ _Will be generalized soon for all documentations_
88

99
This project supports Python 3.6+.
1010

11+
Set both environment variables `APPLICATION_ID` and `API_KEY`.
12+
13+
Then, run:
1114
```bash
1215
$ pipenv install
1316
$ pipenv shell

config/config.json

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,8 @@
66
"stop_urls": [],
77
"selectors": {
88
"lvl0": {
9-
"selector": ".sidebar-heading",
10-
"global": false,
9+
"selector": ".sidebar-heading.open",
10+
"global": true,
1111
"default_value": "Documentation"
1212
},
1313
"lvl1": ".theme-default-content h1",
@@ -31,9 +31,6 @@
3131
"lang"
3232
]
3333
},
34-
"conversation_id": [
35-
"1067906698"
36-
],
3734
"scrap_start_urls": true,
38-
"nb_hits": 998
35+
"nb_hits": 920
3936
}

config/config_original.json

Lines changed: 40 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,40 @@
1+
{
2+
"index_name": "9tz3lqoi",
3+
"start_urls": [
4+
"https://docs.meilisearch.com"
5+
],
6+
"stop_urls": [],
7+
"selectors": {
8+
"lvl0": {
9+
"selector": "p.sidebar-heading.open",
10+
"global": true,
11+
"default_value": "Documentation"
12+
},
13+
"lvl1": ".theme-default-content h1",
14+
"lvl2": ".theme-default-content h2",
15+
"lvl3": ".theme-default-content h3",
16+
"lvl4": ".theme-default-content h4",
17+
"lvl5": ".theme-default-content h5",
18+
"text": ".theme-default-content p, .theme-default-content li",
19+
"lang": {
20+
"selector": "/html/@lang",
21+
"type": "xpath",
22+
"global": true,
23+
"default_value": "en-US"
24+
}
25+
},
26+
"selectors_exclude": [
27+
".table-of-contents"
28+
],
29+
"strip_chars": " .,;:#",
30+
"custom_settings": {
31+
"attributesForFaceting": [
32+
"lang"
33+
]
34+
},
35+
"conversation_id": [
36+
"1067906698"
37+
],
38+
"scrap_start_urls": false,
39+
"nb_hits": 898
40+
}

scraper/src/meilisearch_helper.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -45,10 +45,10 @@ class MeiliSearchHelper:
4545
# Go to the end of this file to understand criteria order
4646
SETTINGS = {
4747
"rankingOrder": [
48-
"_number_of_words",
49-
"_sum_of_typos",
50-
"_sum_of_words_attribute",
51-
"_word_proximity",
48+
"_words",
49+
"_typo",
50+
"_attribute",
51+
"_proximity",
5252
"_exact",
5353
"page_rank",
5454
"level",

0 commit comments

Comments
 (0)