Commit Graph

407 Commits

Author SHA1 Message Date
Clément Renault
f49a01703a
Show the filterable and not the faceted attributes in the settings 2021-07-09 16:11:37 +02:00
mpostma
a71fa25ebe auth tests 2021-07-07 17:47:48 +02:00
mpostma
83725a1330 fix search permissions 2021-07-07 10:39:04 +02:00
mpostma
41e271974a add tests 2021-07-06 16:21:15 +02:00
mpostma
066085f6f5 fix index deletion bug 2021-07-05 18:42:13 +02:00
mpostma
9681ffca52 change index create http code 2021-07-05 16:31:51 +02:00
bors[bot]
0f024cc225
Merge #1478
1478: refactor routes r=irevoire a=MarinPostma

refactor the route directory, so the module tree follows the route structure


Co-authored-by: mpostma <postma.marin@protonmail.com>
2021-07-05 12:55:39 +00:00
mpostma
575ec2a06f refactor routes 2021-07-05 14:33:48 +02:00
mpostma
bc85d30076
add test 2021-07-05 12:33:28 +02:00
mpostma
bc417726fc
fix update loop bug 2021-07-05 12:33:22 +02:00
bors[bot]
71e1cb472f
Merge #1457
1457: Hotfix highlight on emojis panic r=Kerollmops a=ManyTheFish

When the highlight bound is in the middle of a character
or if we are out of bounds, we highlight the complete matching word.

note: we should enhance the tokenizer and the Highlighter to match char indices.

Fix #1368

Co-authored-by: many <maxime@meilisearch.com>
2021-07-01 14:48:18 +00:00
many
38161ede33
Add test with special characters 2021-07-01 16:44:17 +02:00
Kerollmops
fa5f8f9531
Fix an issue with the update loop falsely breaking 2021-07-01 14:53:31 +02:00
many
acfe31151e
Hotfix panic for unicode characters
When the highlight bound is in the middle of a character
or if we are out of bounds, we highlight the complete matching word.

note: we should enhance the tokenizer and the Highlighter to match char indices.

Fix #1368
2021-07-01 14:49:22 +02:00
bors[bot]
768987583a
Merge #1428
1428: Accept any content type as json r=curquiza a=irevoire



Co-authored-by: Tamo <tamo@meilisearch.com>
2021-06-30 18:29:57 +00:00
Tamo
a95c44193d
Do not block when sending update notifications 2021-06-30 17:29:22 +02:00
Tamo
2830853665
accept any content type as json 2021-06-30 17:05:59 +02:00
Tamo
29bf6a8d42
run rustfmt one the whole project and add it to the CI 2021-06-29 15:25:18 +02:00
Tamo
fe7640555d
fix the content-type 2021-06-29 13:16:56 +02:00
Tamo
1dc99ea451
accept no content-type as json 2021-06-29 11:59:25 +02:00
bors[bot]
f12ace3fbf
Merge #256
256: Update heed and milli r=irevoire a=curquiza



Co-authored-by: Clémentine Urquizar <clementine@meilisearch.com>
2021-06-29 08:49:22 +00:00
Clémentine Urquizar
c09e610bb5
Update heed and milli 2021-06-29 10:25:47 +02:00
bors[bot]
712abf4c5f
Merge #246
246: Stop logging the no space left on device error r=curquiza a=irevoire

closes #208
@qdequele what do you think of that?
Are there any other errors we need to ignore?

As you can see in the code, once we are in `Sentry` the error has already been converted to a `String` so the only thing we can do to see if we need to send the error or not is to match the `String` against our error message. 
If we have a lot of other logs we want to ignore I would suggest prefixing all the logs with something like:
```
User error: No space left on device
```
So in Sentry, we could just check if the log start by `User error:` and ignore all these errors at once

Co-authored-by: Tamo <tamo@meilisearch.com>
2021-06-29 08:20:49 +00:00
Tamo
a59f437ee3
use only half of the computer threads for the indexation by default 2021-06-28 14:35:50 +02:00
Tamo
d74c698adc
stop logging the no space left on device error 2021-06-28 13:59:48 +02:00
Tamo
c1c50f6714
unused borrow that must be used 2021-06-28 13:35:25 +02:00
marin postma
01b09c065b
change route to service<resource> 2021-06-24 19:02:28 +02:00
marin postma
3b601f615a
declare new authentication related errors 2021-06-24 16:53:20 +02:00
marin postma
fbd58f2eec
clippy 2021-06-24 16:36:22 +02:00
marin postma
79fc3bb84e
fmt 2021-06-24 16:36:22 +02:00
marin postma
8e4928c7ea
fix tests 2021-06-24 16:36:22 +02:00
marin postma
d078cbf39b
remove authentication middleware 2021-06-24 16:36:21 +02:00
marin postma
561596d8bc
update stats routes 2021-06-24 16:36:18 +02:00
marin postma
549b489c8a
update settings routes 2021-06-24 16:35:48 +02:00
marin postma
1e9f374ff8
update running route 2021-06-24 16:35:12 +02:00
marin postma
817fcfdd88
update keys route 2021-06-24 16:35:12 +02:00
marin postma
fab50256bc
update index routes 2021-06-24 16:35:04 +02:00
marin postma
b044608b25
update health route 2021-06-24 16:32:45 +02:00
marin postma
ce4fb8ce20
update dump route 2021-06-24 16:32:43 +02:00
marin postma
adf91d286b
update documents and search routes 2021-06-24 16:32:15 +02:00
marin postma
0c1c7a3dd9
implement authentication policies 2021-06-24 16:31:30 +02:00
marin postma
5b71751391
policies macros 2021-06-24 16:31:30 +02:00
marin postma
12f6709e1c
move authencation to extractor mod 2021-06-24 16:31:28 +02:00
marin postma
5229f1e220
experimental auth extractor 2021-06-24 16:30:15 +02:00
bors[bot]
b6ca7929eb
Merge #240
240: Rework error messages r=irevoire a=MarinPostma

Simplify the error messages, and make them more compliant with legacy Meilisearch.

Basically, stop composing the messages, and simply forward the message of inner errors.


Co-authored-by: marin postma <postma.marin@protonmail.com>
2021-06-24 11:36:11 +00:00
Tamo
ad8d9a97d6
debug the body of every http request 2021-06-24 11:22:11 +02:00
Tamo
36f32f58d4
add the log_level variable to the cli and reduce the log level of milli and grenad 2021-06-24 11:20:52 +02:00
Tamo
b4fd4212ad
reduce the log level of some info! 2021-06-24 11:20:52 +02:00
marin postma
a1d34faaad
decompose error messages 2021-06-24 10:57:28 +02:00
bors[bot]
a2368db154
Merge #239
239: Bump milli to 0.6.0 r=MarinPostma a=MarinPostma

fix #231


Co-authored-by: marin postma <postma.marin@protonmail.com>
2021-06-24 08:08:41 +00:00
marin postma
74bb748a4e
bump milli to 0.6.0 2021-06-23 18:40:19 +02:00
bors[bot]
8638c9ab77
Merge #232
232: Fix payload size limit r=MarinPostma a=MarinPostma

Fix #223

This was due to the fact that Payload ignores the limit payload size limit. I fixed it by implementing my own `Payload` extractor that checks that the size of the payload is not too large.

I also refactored the `create_app` a bit.

Co-authored-by: marin postma <postma.marin@protonmail.com>
2021-06-23 16:06:08 +00:00
bors[bot]
b676b10cfe
Merge #238
238: Fix settings subroutes get r=MarinPostma a=MarinPostma

Fix #225 

Co-authored-by: marin postma <postma.marin@protonmail.com>
2021-06-23 15:45:50 +00:00
marin postma
f68c257452
move flush in write_to_file function 2021-06-23 16:49:25 +02:00
marin postma
880fc069bd
remove dbg 2021-06-23 16:49:25 +02:00
marin postma
a838238a63
move payload to own module 2021-06-23 16:49:25 +02:00
marin postma
834995b130
clippy + fmt 2021-06-23 16:49:23 +02:00
marin postma
b000ae7614
remove file if write to update file fails 2021-06-23 16:48:33 +02:00
marin postma
f62779671b
change error message for payload size limit 2021-06-23 16:48:33 +02:00
marin postma
4b292c6e9b
add payload limit to app config 2021-06-23 16:48:33 +02:00
marin postma
1c13100948
implement custom payload 2021-06-23 16:48:31 +02:00
marin postma
71226feb74
refactor create_app macro 2021-06-23 16:47:15 +02:00
bors[bot]
3175f09989
Merge #235
235: Fix dump not found error r=MarinPostma a=MarinPostma

fix #233


Co-authored-by: marin postma <postma.marin@protonmail.com>
2021-06-23 14:21:07 +00:00
marin postma
322d6b8cfe
fix serialization bug in settings 2021-06-23 15:25:56 +02:00
marin postma
da36a6b5cd
fix not found error 2021-06-23 15:06:36 +02:00
bors[bot]
f2b2ca6d55
Merge #227
227: improve mini dashboard routing r=MarinPostma a=MarinPostma

The dependency we use to statically serve the mini-dashboard used globing to serve the mini-dashboard files. This caused all unfound routes to be caught by the "/" serving the dashboard assets. This fix makes it so that the assets have a dedicated route, and any unfound route is caught by the default service and return a 404.


Co-authored-by: marin postma <postma.marin@protonmail.com>
2021-06-23 13:01:40 +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
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
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
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
2e3d85c31a
Update milli version to v0.5.0 2021-06-22 15:57:46 +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
marin postma
d0ef1ef174
change errors codes 2021-06-22 11:58:01 +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
Tamo
76727455ca
ignore all the options related to the indexer 2021-06-21 18:13:00 +02:00
Tamo
2097554c09
fix the cli 2021-06-21 16:34:49 +02:00
marin postma
56686dee40
review changes 2021-06-21 13:57:32 +02:00
marin postma
763ee521be
fix rebase errors 2021-06-21 12:11:09 +02:00
marin postma
fa573dabf0
fmt 2021-06-21 12:11:09 +02:00
marin postma
abdf642d68
integrate milli errors 2021-06-21 12:11:08 +02:00
marin postma
0dfd1b74c8
fix tests 2021-06-21 12:11:08 +02:00
marin postma
0d3fb5ee0d
factorize internal error macro 2021-06-21 12:11:08 +02:00
marin postma
02277ec2cf
reintroduce anyhow 2021-06-21 12:11:06 +02:00
marin
8fc12b1526
Update meilisearch-http/src/index/search.rs
Co-authored-by: Clément Renault <clement@meilisearch.com>
2021-06-21 11:06:06 +02:00
marin postma
439db1aae0
enable response error for search routes 2021-06-21 11:00:14 +02:00
marin postma
8afbb9c462
enable response error for documents routes 2021-06-21 10:59:41 +02:00
marin postma
5c52a1393f
enable response error for settings routes 2021-06-21 10:59:41 +02:00
marin postma
112cd1787c
change error message for uuid resolver 2021-06-21 10:59:40 +02:00