Commit Graph

3442 Commits

Author SHA1 Message Date
ad hoc
e9f66b8766
feat(all): introduce disable typo on words 2022-04-06 19:16:36 +02:00
ad hoc
dd43ba6234
feat(all): introduce disable typos 2022-04-06 19:10:12 +02:00
ad hoc
27a88bcd47
feat(all): introduce minWordLengthForTypo
fix typo in settting

skip serializing not set typo settings
2022-04-06 19:03:24 +02:00
ad hoc
981fba5b44
feat(all): introduce disable typos 2022-04-06 15:47:48 +02:00
bors[bot]
09734f0732
Merge #2294
2294: chore(lib): bump milli to 0.25.0 r=MarinPostma a=MarinPostma

bump milli


Co-authored-by: ad hoc <postma.marin@protonmail.com>
2022-04-06 13:19:20 +00:00
ad hoc
a523828f61
chore(lib): bump milli to 0.25.0 2022-04-06 15:03:10 +02:00
bors[bot]
7f7958f815
Merge #2277
2277: fix(http): fix panic when sending document update without content type header r=MarinPostma a=MarinPostma

I found a panic when pushing documents without a content-type. This fixes is by returning unknown instead of crashing.


Co-authored-by: ad hoc <postma.marin@protonmail.com>
2022-04-05 12:07:17 +00:00
bors[bot]
9e344f6576
Merge #2207
2207: Fix: avoid embedding the user input into the error response. r=Kerollmops a=CNLHC

# Pull Request

## What does this PR do?
Fix #2107. 

The problem is meilisearch embeds the user input to the error message. 

The reason for this problem is `milli` throws a `serde_json: Error` whose `Display` implementation will do this embedding.  

I tried to solve this problem in this PR by manually implementing the `Display` trait for `DocumentFormatError` instead of deriving automatically.

<!-- Please link the issue you're trying to fix with this PR, if none then please create an issue first. -->

## PR checklist
Please check if your PR fulfills the following requirements:
- [x] Does this PR fix an existing issue?
- [x] Have you read the contributing guidelines?
- [x] Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!


Co-authored-by: Liu Hancheng <cn_lhc@qq.com>
Co-authored-by: LiuHanCheng <2463765697@qq.com>
2022-04-04 17:35:17 +00:00
bors[bot]
09a72cee03
Merge #2281
2281: Hard limit the number of results returned by a search r=Kerollmops a=Kerollmops

This PR fixes #2133 by hard-limiting the number of results that a search request can return at any time. I would like the guidance of `@MarinPostma` to test that, should I use a mocking test here? Or should I do anything else?

I talked about touching the _nb_hits_ value with `@qdequele` and we concluded that it was not correct to do so.

Could you please confirm that it is the right place to change that?

Co-authored-by: Kerollmops <clement@meilisearch.com>
2022-04-04 17:19:05 +00:00
LiuHanCheng
6fc6b83632
Update meilisearch-http/tests/documents/add_documents.rs
Co-authored-by: Clément Renault <renault.cle@gmail.com>
2022-04-01 09:30:40 +08:00
LiuHanCheng
eee2cd5abf
Update meilisearch-http/tests/documents/add_documents.rs
Co-authored-by: Clément Renault <renault.cle@gmail.com>
2022-04-01 09:30:32 +08:00
bors[bot]
87e4125875
Merge #2267
2267: Add instance options for RAM and CPU usage r=Kerollmops a=2shiori17

# Pull Request

## What does this PR do?
Fixes #2212 
<!-- Please link the issue you're trying to fix with this PR, if none then please create an issue first. -->

## PR checklist
Please check if your PR fulfills the following requirements:
- [x] Does this PR fix an existing issue?
- [x] Have you read the contributing guidelines?
- [x] Have you made sure that the title is accurate and descriptive of the changes?

Thank you so much for contributing to Meilisearch!


Co-authored-by: 2shiori17 <98276492+2shiori17@users.noreply.github.com>
Co-authored-by: shiori <98276492+2shiori17@users.noreply.github.com>
2022-03-31 15:29:18 +00:00
Liu Hancheng
7ece7a9d9e change truncate strategy and coresponding test 2022-03-31 10:39:21 +08:00
LiuHanCheng
403f03cb2c
Update meilisearch-http/tests/documents/add_documents.rs
Co-authored-by: Clément Renault <renault.cle@gmail.com>
2022-03-31 10:14:22 +08:00
LiuHanCheng
b28aa8e666
Update meilisearch-lib/src/document_formats.rs
Co-authored-by: Clément Renault <renault.cle@gmail.com>
2022-03-31 10:14:13 +08:00
2shiori17
98107565c0 Add more detailed comments for max_indexing_threads 2022-03-31 09:32:45 +09:00
2shiori17
a2d7c16f91 Remove indexing_jobs option 2022-03-31 09:27:29 +09:00
Kerollmops
ffafd5b976
Add tests for the hard limit 2022-03-30 16:36:02 -07:00
shiori
9f1c88680d
Fix my mistake when resolving conflicts 2022-03-31 02:48:41 +09:00
shiori
9edd407a88
Merge branch 'main' into add-instance-options 2022-03-31 02:38:07 +09:00
Kerollmops
8bc6e8dcf9
Make sure that offsets are clamped too 2022-03-30 10:06:15 -07:00
bors[bot]
2624c76517
Merge #2254
2254: Test with default CLI opts r=Kerollmops a=Kerollmops

Fixes #2252.

This PR makes sure that we test the HTTP engine with the default CLI parameters and removes some useless internal CLI options.

Co-authored-by: Kerollmops <clement@meilisearch.com>
2022-03-29 22:39:40 +00:00
Kerollmops
891d042164
Remove the memory limit to let Windows tests pass 2022-03-29 11:37:08 -07:00
Kerollmops
b3a11e04af
Implement Default on IndexerOpts again 2022-03-29 11:37:08 -07:00
Kerollmops
acdb10a307
Remove some useless indexer options 2022-03-29 11:37:08 -07:00
Kerollmops
8fecc6238d
Make the test use the default CLI options 2022-03-29 11:37:08 -07:00
Kerollmops
405af09fc8
Hard limit the number of results returned by a search 2022-03-29 11:27:53 -07:00
bors[bot]
0d6be2efab
Merge #2280
2280: Bump the milli dependency to 0.24.1 r=curquiza a=Kerollmops

We had issues with lindera recently, it was unable to download the official dictionaries from Google Drive and this was causing issues with our CIs (and other users' CIs too). The maintainer changed the source to download the dictionaries to get it from Sourceforge and it is much better and stable now.

This PR bumps the milli dependency to the latest version which includes the latest version of the tokenizer which, itself, includes the latest version of lindera, I advise that we rebase the currently opened pull requests to include this PR when it is merged on main.

Co-authored-by: Kerollmops <clement@meilisearch.com>
2022-03-29 17:39:03 +00:00
Kerollmops
94f04e79eb
Bump the milli dependency to 0.24.1 2022-03-29 09:17:25 -07:00
bors[bot]
381e98053f
Merge #2263
2263: Upgrade the config of the issue management r=curquiza a=curquiza

To reduce the feature feedback in the meilisearch repo

Co-authored-by: Clémentine Urquizar - curqui <clementine@meilisearch.com>
2022-03-29 09:11:06 +00:00
ad hoc
6c2fdc7743
fix(http): fix panic when sending document update without content type header 2022-03-29 09:48:25 +02:00
bors[bot]
513b37e245
Merge #2253
2253: refactor authentication key extraction r=ManyTheFish a=MarinPostma

I am concerned that the part of the code that performs the key prefix extraction from the jwt token migh be misused in the future. Since this is a critical part of the code, I moved it into it's own function. Since we deserialized the payload twice anyway, I reordered the verifications, and we now use the data from the validated token.


Co-authored-by: ad hoc <postma.marin@protonmail.com>
2022-03-28 08:53:13 +00:00
LiuHanCheng
13a0e78d3f
Update meilisearch-lib/src/document_formats.rs
Co-authored-by: Clément Renault <renault.cle@gmail.com>
2022-03-28 14:58:00 +08:00
LiuHanCheng
80d8ac40af
Update meilisearch-lib/src/document_formats.rs
Co-authored-by: Clément Renault <renault.cle@gmail.com>
2022-03-28 14:57:51 +08:00
Liu Hancheng
c7b489f8cb tidy 2022-03-25 21:36:11 +08:00
Liu Hancheng
ce12000af3 add some comments 2022-03-25 21:33:47 +08:00
Liu Hancheng
3c72f4dc51 fix test and add truncate test. 2022-03-25 21:31:23 +08:00
Liu Hancheng
ce85981a4e add truncate logic 2022-03-25 20:53:28 +08:00
Liu Hancheng
193c666bf9 Merge branch 'main' of github.com:meilisearch/meilisearch into CNLHC/change_json_error_message 2022-03-25 19:53:13 +08:00
2shiori17
705d10a96d Add instance options for RAM and CPU usage 2022-03-24 18:52:36 +00:00
bors[bot]
c0056ab73f
Merge #2264
2264: Import milli from meilisearch-lib r=Kerollmops a=Kerollmops

This PR directly imports the milli dependency used in _meilisearch-http_ from _meilisearch-lib_. I can't import _meilisearch-lib_ in _meiliserach-auth_ and that _meilisearch-auth_ can't use the milli exported by _meilisearch-lib_ 😞

Co-authored-by: Kerollmops <clement@meilisearch.com>
2022-03-24 16:28:54 +00:00
Kerollmops
3df542f072
Export milli's heed from meilisearch-lib 2022-03-24 15:30:10 +01:00
Kerollmops
09212abdf7
Update the cargo lock 2022-03-24 14:53:08 +01:00
Kerollmops
ee6be4f6b9
Import milli from meilisearch-lib in meilisearch-http 2022-03-24 14:45:37 +01:00
Clémentine Urquizar - curqui
4e3b20ed73
Update config.yml 2022-03-24 12:13:30 +01:00
ad hoc
6a82a055d3
chore(auth): refactor token validation 2022-03-21 11:18:51 +01:00
bors[bot]
7e65816d63
Merge #2237
2237: Update dependencies r=MarinPostma a=Kerollmops

This PR upgrade and updates the dependencies of meilisearch, but first I removed three unused dependencies. I used [cargo udeps](https://github.com/est31/cargo-udeps) to detect those and [cargo upgrade](https://github.com/killercup/cargo-edit/blob/master/README.md#available-subcommands) to upgrade ⬆️

~This PR **must** be merged when https://github.com/meilisearch/milli/pull/465 is merged and then must be updated accordingly i.e. using the latest version of milli.~

Co-authored-by: Kerollmops <clement@meilisearch.com>
Co-authored-by: ManyTheFish <many@meilisearch.com>
2022-03-17 17:15:19 +00:00
Kerollmops
5bffa4b7f9
Tenant token validation is now created by a function 2022-03-17 17:55:50 +01:00
bors[bot]
d1c0ecceb9
Merge #2245
2245: Add test to validate cli r=irevoire a=MarinPostma

followup on #2242 and #2243

Add a test to make sure the cli is valid, and add a CI task to run the tests in debug to make sure we hit debug assertions.

FYI `@curquiza,` because of CI changes

Co-authored-by: ad hoc <postma.marin@protonmail.com>
2022-03-17 16:14:31 +00:00
ad hoc
1d683865cf
chore(CI): add debug test to CI 2022-03-17 12:40:20 +01:00