Commit Graph

7927 Commits

Author SHA1 Message Date
bors[bot]
66f55e3e6a
Merge #255
255: Fix facet distribution error r=Kerollmops a=Kerollmops

This PR fixes two invalid behaviors and fixes #253:
 - We were ignoring the list of fields for which the user wanted a facet distribution.
 - We were not raising any error for when a non-filterable field was requested a facet distribution.

~For the latter behavior I need the help of @curquiza to help me choose the right error type.~

Co-authored-by: Kerollmops <clement@meilisearch.com>
2021-06-23 12:03:05 +00:00
Kerollmops
a6218a20ae
Introduce a new InvalidFacetsDistribution user error 2021-06-23 13:56:19 +02:00
Kerollmops
2364777838
Return an error for when a field distribution cannot be done 2021-06-23 11:50:49 +02:00
Kerollmops
aeaac743ff
Replace an if let some by a match 2021-06-23 11:33:30 +02:00
bors[bot]
0ebe3900e0
Merge #229
229: Add exhaustiveFacetsCount r=MarinPostma a=curquiza

I completely forgot this one 😅

Co-authored-by: Clémentine Urquizar <clementine@meilisearch.com>
2021-06-23 09:29:54 +00:00
Clémentine Urquizar
ec3140a29e
Fix clippy 2021-06-23 11:23:57 +02:00
Clémentine Urquizar
00b0a00fc5
Add exhaustiveFacetsCount 2021-06-23 11:05:30 +02:00
Tamo
5099192c44
update bors.toml 2021-06-23 10:22:40 +02:00
Tamo
d8695da1d1
improve the ci 2021-06-23 10:22:40 +02:00
bors[bot]
adb970edcc
Merge #226
226: Make facetsDistribution name iso r=MarinPostma a=curquiza

Even if there is an English mistake in `facets_distribution` (because of the `s`) @gmourier asked me to keep the typo: the name of `facetsDistribution` might change completely in the future, he wants to avoid two breakings.

@gmourier can you confirm before we merge this PR?

Sorry I left this update in the code (I'm confused because no issues was open to update `facetsDistribution`), there might have been a confusion with `fieldsDistribution` that has been renamed into `fieldDistribution`. Sorry!

Co-authored-by: Clémentine Urquizar <clementine@meilisearch.com>
2021-06-23 08:14:12 +00:00
Clémentine Urquizar
6d24a4744f
Roll back facetsDistribution 2021-06-23 10:04:01 +02:00
marin postma
b1a5ef0aab
improve mini dashboard routing 2021-06-22 21:49:05 +02:00
bors[bot]
7ec752ed1c
Merge #224
224: Update version for alpha 6 r=MarinPostma a=curquiza



Co-authored-by: Clémentine Urquizar <clementine@meilisearch.com>
2021-06-22 18:20:09 +00:00
Clémentine Urquizar
0de696feaf
Update version for alpha 6 2021-06-22 18:40:51 +02:00
bors[bot]
d6b53c5e7a
Merge #220
220: Implement `matches` r=irevoire a=MarinPostma

implement `_matchesInfo`. I initially thought we could factor it inside the highlighting, but they are unrelated features after all, and needed a dedicated pass too handle.

Co-authored-by: marin postma <postma.marin@protonmail.com>
2021-06-22 16:29:07 +00:00
marin postma
3456a78552
refactor formatter
share the analyzer instance between the formatter and the
compute_matches function
2021-06-22 18:28:20 +02:00
marin postma
eb3d63691a
add tests 2021-06-22 18:12:53 +02:00
marin postma
c4ee937635
optimize fromat string 2021-06-22 18:12:53 +02:00
marin postma
f6d1fb7ac2
fmt 2021-06-22 18:12:53 +02:00
marin postma
97ef4a6c22
implement matches 2021-06-22 18:12:52 +02:00
bors[bot]
db7215eaa9
Merge #213
213: Implement all the CLI options r=MarinPostma a=irevoire

closes #206 
And I looked into #204, I fixed some default values and tried to test as many options as possible, and I think the cli is already mostly working.
If someone knows any issues about it, I would like to hear more 🙂 

Co-authored-by: Tamo <tamo@meilisearch.com>
2021-06-22 15:04:05 +00:00
bors[bot]
4b37a4a415
Merge #211 #218
211: fix index deletion race condition r=MarinPostma a=MarinPostma

Make update store block if the currently processing update is from an index we are trying to delete. This ensure that no write to the index can occur after it has been deleted.

218: Update milli version to v0.5.0 r=MarinPostma a=curquiza



Co-authored-by: marin postma <postma.marin@protonmail.com>
Co-authored-by: Clémentine Urquizar <clementine@meilisearch.com>
2021-06-22 14:36:34 +00:00
bors[bot]
d1ad23e2d8
Merge #221
221: fix get search crop len r=irevoire a=MarinPostma

Fix bug where crop length was mandatory when performing a GET search.


Co-authored-by: marin postma <postma.marin@protonmail.com>
2021-06-22 14:13:52 +00:00
marin postma
caa231aebe
fix race condition 2021-06-22 16:09:07 +02:00
marin postma
9cc31c2258
fix get search crop len 2021-06-22 16:01:40 +02:00
Clémentine Urquizar
e2844f3a92
Update tokenizer version to v0.2.3 2021-06-22 15:57:47 +02:00
Clémentine Urquizar
2e3d85c31a
Update milli version to v0.5.0 2021-06-22 15:57:46 +02:00
bors[bot]
28197b2435
Merge #252
252: Run the formatter on the whole project a second time r=Kerollmops a=irevoire



Co-authored-by: Tamo <tamo@meilisearch.com>
2021-06-22 13:56:09 +00:00
Tamo
8d2a0b43ff
run the formatter on the whole project a second time 2021-06-22 15:36:22 +02:00
bors[bot]
25af262e79
Merge #210
210: Error handling r=MarinPostma a=MarinPostma

This pr implements the error handling for meilisearch.

Rather than grouping errors by types, this implementation groups them by scope, each scope enclosing errors from a scope further down, or new errors within this scope. This makes the tracking of the origins of errors easier , and error handling easier at the module level.

All errors that are eventually returned to the user implement the `Into<ResponseError>` trait. `ReponseError` in turn implements the `ErrorCode` trait from `meilisearch-error`.

Some new errors have been introduced with the new engine for which we haven't defined error codes yet. It has been decided with @gmourier that those would return the `internal-error` code until the correct error code is specified.


Co-authored-by: marin postma <postma.marin@protonmail.com>
2021-06-22 13:21:33 +00:00
bors[bot]
634201244c
Merge #250 #251
250: Add the limit field to http-ui r=Kerollmops a=irevoire



251: Fix the limit r=Kerollmops a=irevoire

There was no check on the limit and thus if a user specified a very large number this line could cause a panic.

Co-authored-by: Tamo <tamo@meilisearch.com>
2021-06-22 13:00:52 +00:00
Tamo
3d90b03d7b
fix the limit
There was no check on the limit and thus, if a user especified a very large number this line could causes a panic
2021-06-22 14:52:13 +02:00
Tamo
81643e6d70
add the limit field to http-ui 2021-06-22 14:47:23 +02:00
bors[bot]
5aea8dd75b
Merge #249
249: Enable the jemallocator dependencies only when we are running on linux r=Kerollmops a=irevoire



Co-authored-by: Tamo <tamo@meilisearch.com>
2021-06-22 12:32:44 +00:00
Tamo
77eb37934f
add jemalloc to http-ui and the benchmarks 2021-06-22 14:17:56 +02:00
bors[bot]
5b6adc6d96
Merge #245
245: Warn for when a key is too large for LMDB r=Kerollmops a=Kerollmops

Closes #191, and resolves #140.

Co-authored-by: Kerollmops <clement@meilisearch.com>
2021-06-22 12:10:52 +00:00
Tamo
d53df8a002
enable the jemallocator dependencies only when we are running on linux 2021-06-22 14:04:16 +02:00
bors[bot]
ca9fa329d1
Merge #247
247: Return a `MissingDocumentId` error when a document doesn't have one r=Kerollmops a=Kerollmops

We were wrongly returning a `MissingPrimaryKey` instead of a `MissingDocumentId` error for when a document was missing a document id. We also improved the error message for when a document id is invalid (wrong type or wrong format).

Co-authored-by: Kerollmops <clement@meilisearch.com>
2021-06-22 10:07:54 +00:00
marin postma
d0ef1ef174
change errors codes 2021-06-22 11:58:01 +02:00
Kerollmops
51dbb2e06d
Warn for when a key is too large for LMDB 2021-06-22 11:51:36 +02:00
Kerollmops
aecbd14761
Improve the error message for InvalidDocumentId 2021-06-22 11:31:58 +02:00
Kerollmops
0cca2ea24f
Return a MissingDocumentId when a document doesn't have one 2021-06-22 11:22:33 +02:00
marin postma
905ace3e13
fix test 2021-06-22 11:10:57 +02:00
Kerollmops
481b0bf277
Warn for when a facet key is too large for LMDB 2021-06-22 10:57:46 +02:00
marin postma
9092d35a3c
fix payload error handler 2021-06-21 21:51:38 +02:00
marin postma
2bdaa70f31
invalid update payload returns bad_request 2021-06-21 18:56:22 +02:00
marin postma
f91a3bc6ab
set error content type to json 2021-06-21 18:48:05 +02:00
marin postma
1e4592dd7e
enable errors in updates 2021-06-21 18:42:47 +02:00
bors[bot]
50dc2fc7a5
Merge #219
219: Run cargo flaky only 100 times r=irevoire a=irevoire

Look like the CI was not able to run cargo flaky 1000 times in 6 hours, so I guess, for now, we can come back to 100 times.

https://github.com/meilisearch/transplant/runs/2858159390


Co-authored-by: Tamo <tamo@meilisearch.com>
2021-06-21 16:29:27 +00:00
Tamo
76727455ca
ignore all the options related to the indexer 2021-06-21 18:13:00 +02:00