Commit Graph

657 Commits

Author SHA1 Message Date
Irevoire
30aeda7a1a
update the identify call to the latest spec version 2021-10-29 17:25:48 +02:00
Irevoire
22d9d660cc
log all the required settings route 2021-10-29 17:25:48 +02:00
Irevoire
7524bfc07f
log the all settings updated route 2021-10-29 17:25:48 +02:00
Tamo
bda7472880
log the documetns updated route 2021-10-29 17:25:48 +02:00
Tamo
1ed05c6c07
log documents added 2021-10-29 17:25:47 +02:00
Tamo
0b3e0a59cb
log index updated 2021-10-29 17:25:47 +02:00
Tamo
0616f68eb0
implements part of the search 2021-10-29 17:25:47 +02:00
Tamo
6b8e5a4c92
log the index created route 2021-10-29 17:25:47 +02:00
Tamo
d72c887422
makes the analytics available for all the routes 2021-10-29 17:25:47 +02:00
Tamo
664d09e86a
makes the analytics works with the option and the feature 2021-10-29 17:25:47 +02:00
Tamo
e226b1a87f
rewrite the main analytics module and the information sent in the tick 2021-10-29 17:25:42 +02:00
many
7464720426
Fix some errors 2021-10-28 10:47:59 +02:00
many
61c15b69fb
Change malformed_payload error 2021-10-27 11:13:12 +02:00
many
b4038597ba
Keep persisting tmp files in database directory and put non-persisting tmp files in default tmp dir 2021-10-18 14:16:35 +02:00
Paul Sanders
c9e1d054c7 Fix csv content-type error 2021-10-12 13:38:48 -04:00
Tamo
66dbd3cd34
makes clippy happy 2021-10-06 17:39:04 +02:00
Tamo
9a1e44dc78
Apply suggestion
- remove the payload_error_handler in favor of a PayloadError::from

- merge the two match branch into one

- makes the accepted content type a const instead of recalculating it for every error
2021-10-06 17:15:47 +02:00
Tamo
c6d107a05f
makes the content-type mandatory for every routes 2021-10-06 17:15:47 +02:00
bors[bot]
2190764162
Merge #1768
1768: Fix auth error r=irevoire a=MarinPostma

fix a small auth error, that set the invalid token error token to "hello". This was invilisble to the user because the invalid token is not returned.

thank you hawk-eye `@irevoire` 

Co-authored-by: mpostma <postma.marin@protonmail.com>
2021-10-05 15:16:14 +00:00
mpostma
3b91764587 fix auth error 2021-10-05 09:09:40 +02:00
Anirudh Rowjee
bffab21b10 Changes
1. Removed redundant scope registration
2021-10-04 14:47:05 +05:30
Anirudh Rowjee
151f691609 Fixes #1750
This commit is a fix to issue #1750.
As a part of the changes to solve this issue, the following changes have
been made -
1. Route registration for static assets has been modified
2. the `mut` keyword on the `scope` has been removed.
2021-10-02 15:24:04 +05:30
mpostma
4eb3817b03
missing payload error 2021-09-30 16:58:13 +02:00
mpostma
18cb514073
invalid content type error 2021-09-30 16:58:13 +02:00
mpostma
137272b8de
empty content type error 2021-09-30 16:58:13 +02:00
mpostma
fe5df6d06f fix payload content type guards 2021-09-29 19:04:47 +02:00
bors[bot]
5fad37aebd
Merge #1711
1711: MeiliSearch refactor introducing OBKV format r=MarinPostma a=MarinPostma

This PR refactor some multiple components of meilisearch, and introduce the obkv document format to meilisearch

- [x] Split meilisearch-http and meilisearch-lib
- [x] Replace `IndexActor` and `UuidResolver` with `IndexResolver`
- [x] Remove mentions to Actor
- [x] Remove Actor traits to simplify code
- [x] Integrate obkv document format
- [x] Remove `Data`
- [x] Restore all route
- [x] Replace `Box<dyn error>` with `anyhow::Error`
- [x] Introduce update file store
- [x] Update file store error handling
- [x] Fix dumps
- [x] Fix snapshots
- [x] Fix tests
- [x] Update module documentation
- [x] add csv suppport (feat `@ManyTheFish` #1729 )
- [x] add jsonl support
- [x] integrate geosearch (feat `@irevoire` #1725) 

partially implements #1691 and #1690. The error handling is very basic now, I will finish it in the next pr.

Some unit tests have been disabled, I will re-enable them ASAP, but they need a bit more work.

close #1531 


P.S: sorry for this monstrous PR :'(

Co-authored-by: mpostma <postma.marin@protonmail.com>
Co-authored-by: Tamo <tamo@meilisearch.com>
Co-authored-by: many <maxime@meilisearch.com>
2021-09-29 14:38:55 +00:00
mpostma
8fa6502b16 review changes 2021-09-29 14:17:41 +02:00
mpostma
1f537e1b60 jsonl support 2021-09-29 11:28:02 +02:00
mpostma
5bac65f8b8 add missing content type errors 2021-09-29 09:55:35 +02:00
mpostma
911630000f split csv and json document routes 2021-09-29 00:12:25 +02:00
mpostma
102c46f88b clippy + fmt 2021-09-28 22:22:59 +02:00
mpostma
3503fbf7fe re-export milli from meilisearch_lib 2021-09-28 22:08:03 +02:00
mpostma
7a27cbcc78 rename RegisterUpdate to store::Update 2021-09-28 20:20:13 +02:00
mpostma
56766cffc3 remove module level doc 2021-09-28 18:58:56 +02:00
mpostma
692c676625 fix tests 2021-09-28 18:57:36 +02:00
Tamo
ddfd7def35 add a TODO while waiting for the tests to be fixed 2021-09-28 18:17:56 +02:00
Tamo
539a57026d
fix the sort error messages 2021-09-28 14:50:26 +02:00
Tamo
c1376a9f2a
add the geosearch to Meilisearch 2021-09-28 14:50:26 +02:00
mpostma
90018755c5 restore snapshots 2021-09-27 16:48:03 +02:00
mpostma
b9d189bf12 restore document deletion routes 2021-09-24 15:21:07 +02:00
mpostma
c32012c44a restore settings updates 2021-09-24 14:55:57 +02:00
mpostma
dfce44fa3b rename data to meilisearch 2021-09-24 12:03:16 +02:00
mpostma
5353be74c3 refactor index actor 2021-09-22 15:07:04 +02:00
mpostma
60518449fc split meilisearch-http and meilisearch-lib 2021-09-21 13:23:22 +02:00
mpostma
09d4e37044 split data and api keys 2021-09-20 15:31:03 +02:00
mpostma
e14640e530 refactor meilisearch 2021-09-20 14:54:20 +02:00
Felix Yan
a57943b77e
Use tikv-jemallocator instead of jemallocator
`jemallocator` has been abandoned for nearly two years, and `rustc`
itself moved to use `tikv-jemallocator` instead:
3965773ae7

Let's switch to a better maintained version.
2021-09-14 18:30:24 +03:00
bors[bot]
6fafdb7711
Merge #1651 #1676 #1684
1651: Use reset_sortable_fields r=Kerollmops a=shekhirin

Resolves https://github.com/meilisearch/MeiliSearch/issues/1635

1676: Add curl binary to final stage image r=curquiza a=ook

Reference: #1673 

Changes: * add `curl` binary to final docker Melisearch image.

For metrics, docker funny layer management makes this add a  shrink from 319MB to 315MB:

```
☁  MeiliSearch [feature/1673-add-curl-to-docker-image]  docker image ls
REPOSITORY                                                         TAG                  IMAGE ID       CREATED         SIZE
getmeili/meilisearch                                               0.22.0_ook_1673      938e239ad989   2 hours ago     315MB
getmeili/meilisearch                                               latest               258fa3aa1230   6 days ago      319MB
```

1684: bump dependencies r=MarinPostma a=MarinPostma

Bump meilisearch dependencies.

We still depend on custom patch that have been upgraded along the way.

Co-authored-by: Alexey Shekhirin <a.shekhirin@gmail.com>
Co-authored-by: Thomas Lecavelier <thomas@followanalytics.com>
Co-authored-by: mpostma <postma.marin@protonmail.com>
2021-09-13 13:20:29 +00:00
mpostma
0f7625e29a bump dependencies 2021-09-13 15:17:08 +02:00
bors[bot]
c101b2a5cb
Merge #1686
1686: Bump milli r=curquiza a=irevoire

 fixes #1685, #1678, #1671, #1677 and #1680

Co-authored-by: Tamo <tamo@meilisearch.com>
2021-09-08 16:31:02 +00:00
bors[bot]
971c361e0f
Merge #1682
1682: Change the format of custom ranking rules when importing old dumps r=curquiza a=Kerollmops

This PR changes the format of the custom ranking rules from `asc(price)` to `title:asc` as the format changed between v0.21 and v0.22. The dumps are now correctly importing the custom ranking rules.

This PR also change the previous default ranking rules (without sort) to the new default ranking rules (with the new sort).

Co-authored-by: Kerollmops <clement@meilisearch.com>
2021-09-08 16:20:10 +00:00
Kerollmops
be50b2bec6
Change the format of custom ranking rules when importing v2 dumps 2021-09-08 17:56:21 +02:00
Tamo
49c918defa
bump milli 2021-09-08 17:41:47 +02:00
many
169e739634
Remove useless indexer options 2021-09-08 13:40:05 +02:00
many
08138c7c23
Use set indexer options instead of create a default one 2021-09-08 13:40:00 +02:00
Kerollmops
331d28102f
Change the format of custom ranking rules when importing v1 dumps 2021-09-07 17:16:40 +02:00
Alexey Shekhirin
efa69875d9
refactor(http): use reset_sortable_fields 2021-09-07 15:04:44 +03:00
many
c0f9c891f5
Set max_memory value to unlimited during tests
because tests run several meilisearch in parallel,
we over estimate the value for max_memory making the tests on widows crash
2021-09-06 14:38:10 +02:00
Kerollmops
4cdf680a81
Make the MaxMemory use the default value when undefined 2021-09-02 18:19:11 +02:00
Kerollmops
0cd66c3a89
Bump the milli version 2021-09-02 18:19:00 +02:00
Clément Renault
b092a624ed
Introduce the MaxMemory struct that defaults to 2/3 of the available memory 2021-09-02 18:18:59 +02:00
Clémentine Urquizar
24e84d7ca1
Test new indexer 2021-09-02 18:11:20 +02:00
bors[bot]
19c5c74291
Merge #1652 #1654 #1657
1652: Remove dependabot r=MarinPostma a=curquiza

Fixes #1649 

Dependabot for vulnerability and security updates is still activated.

1654: Add Script for Windows r=MarinPostma a=singh08prashant

fixes #1570 

changes:

1. added script for detecting windows os running git bash
2. appended `.exe` to `$release_file` for windows as listed [here](https://github.com/meilisearch/MeiliSearch/releases/)
3. removed global `$BINARY_NAME='meilisearch'` as windows require `.exe` file

1657: Bring vergen hotfix from `stable` to `main` r=MarinPostma a=curquiza



Co-authored-by: Clémentine Urquizar <clementine@meilisearch.com>
Co-authored-by: singh08prashant <singh08prashant@gmail.com>
Co-authored-by: Kerollmops <clement@meilisearch.com>
Co-authored-by: bors[bot] <26634292+bors[bot]@users.noreply.github.com>
2021-08-31 14:31:42 +00:00
Kerollmops
9d0fa8112b
Remove unused Arc import 2021-08-31 14:50:36 +02:00
Kerollmops
a8c146fd13
Unwrap or unknown the commit hash 2021-08-30 17:41:24 +02:00
Kerollmops
cf4a466b6b
Make sure that the order of the filterableAttributes is constant 2021-08-26 11:06:05 +02:00
Kerollmops
087e4626ce
Make sure that the order of the sortableAttributes is constant 2021-08-26 11:06:04 +02:00
Kerollmops
e0f73fe742
Introduce the sort search parameter 2021-08-25 17:39:25 +02:00
Kerollmops
ea4c831de0
Integrate the sortable-attributes into the settings 2021-08-25 17:39:25 +02:00
Kerollmops
51387b2c80
Introduce the new invalid sortable error codes 2021-08-25 17:29:30 +02:00
bors[bot]
2d8dd87cad
Merge #1623
1623: Use Setting enum r=Kerollmops a=shekhirin

Resolves https://github.com/meilisearch/MeiliSearch/issues/1620

Co-authored-by: Alexey Shekhirin <a.shekhirin@gmail.com>
2021-08-25 14:58:40 +00:00
Alexey Shekhirin
d9dd2a038b
refactor(http): use Setting enum 2021-08-25 17:43:46 +03:00
Irevoire
672fcee8aa
remove sentry 2021-08-24 12:38:31 +02:00
Clémentine Urquizar
621529e9dc
Update telemetry link 2021-08-12 18:58:07 +02:00
bors[bot]
7e3b2ddff2
Merge #1554
1554: Fix dump v1 (attributesForFaceting, and criteria) r=curquiza a=MarinPostma

close #1553


Co-authored-by: mpostma <postma.marin@protonmail.com>
2021-08-05 19:45:52 +00:00
mpostma
8f05d8d546 fix clippy warnings 2021-08-05 16:00:47 +02:00
mpostma
f5ddea481a reintroduce exactness 2021-08-05 15:59:39 +02:00
mpostma
29ca8271b3 test dumpv1 format regression 2021-08-05 15:59:39 +02:00
mpostma
3084537d1e restore attributes for faceting in dump v1 2021-08-05 15:59:39 +02:00
Clémentine Urquizar
992b082c6f
Fix docs link anchor 2021-08-05 13:28:32 +02:00
bors[bot]
7a0b20c740
Merge #1532
1532: Start writing documentation for newcomers r=MarinPostma a=irevoire



Co-authored-by: Tamo <tamo@meilisearch.com>
2021-08-03 09:26:45 +00:00
bors[bot]
09c74c04a0
Merge #1539
1539: Use serdeval for validating json format. r=curquiza a=MarinPostma

uses [serdeval](https://github.com/MarinPostma/serdeval) to validate that the json payload is valid json, and in the correct format.

fix #1535


Co-authored-by: mpostma <postma.marin@protonmail.com>
2021-07-29 17:05:13 +00:00
Clémentine Urquizar
1b5d918cb9
Fix rustfmt 2021-07-29 18:32:09 +02:00
Clémentine Urquizar
bf76d4a43c
Make clippy happy 2021-07-29 18:14:36 +02:00
mpostma
53b4b2fcbc Use serdeval for validating json format. 2021-07-29 18:02:54 +02:00
Tamo
78308365ec
fix typos 2021-07-29 14:40:41 +02:00
Tamo
243233f652
import .git to docker to fix vergen 2021-07-28 19:12:40 +02:00
Clémentine Urquizar
80916baa21
Add FieldId in import 2021-07-28 12:25:13 +02:00
Clémentine Urquizar
1df8f041bd
Update meilisearch-http/src/index/search.rs
Co-authored-by: marin <postma.marin@protonmail.com>
2021-07-28 12:10:25 +02:00
Clémentine Urquizar
6a6e2a8cd1
Update meilisearch-http/src/index/search.rs
Co-authored-by: marin <postma.marin@protonmail.com>
2021-07-28 12:08:51 +02:00
Clémentine Urquizar
f9d337b320
Update meilisearch-http/src/index/search.rs
Co-authored-by: marin <postma.marin@protonmail.com>
2021-07-28 12:08:36 +02:00
Clémentine Urquizar
feb069f604
Update meilisearch-http/src/index/search.rs
Co-authored-by: marin <postma.marin@protonmail.com>
2021-07-28 12:08:28 +02:00
Clémentine Urquizar
7e0eed5772
Update meilisearch-http/src/index/search.rs
Co-authored-by: marin <postma.marin@protonmail.com>
2021-07-28 12:08:24 +02:00
Clémentine Urquizar
9bdd040dd0
Update meilisearch-http/src/index/mod.rs
Co-authored-by: marin <postma.marin@protonmail.com>
2021-07-28 12:08:19 +02:00
Clémentine Urquizar
e5dabf265a
Update milli version to v0.8.0 2021-07-28 10:52:47 +02:00
Tamo
1a1046a0ef
start writing some documentation for newcomers 2021-07-27 16:35:42 +02:00
Tamo
f79b8287f5
update vergen 2021-07-26 15:25:30 +02:00
Tamo
5d4a0ac844
sentry was never sending anything 2021-07-21 11:50:54 +02:00
bors[bot]
0136b02e5b
Merge #1498
1498: Show the filterable and not the faceted attributes in the settings r=Kerollmops a=Kerollmops

Fixes #1497

Co-authored-by: Clément Renault <clement@meilisearch.com>
2021-07-13 07:27:14 +00:00
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
marin postma
d1550670a8
enable response error for index routes 2021-06-21 10:59:40 +02:00
marin postma
58f9974be4
remove anyhow refs & implement missing errors 2021-06-21 10:59:38 +02:00
marin postma
3a2e7d3c3b
optimize cropping 2021-06-20 16:59:31 +02:00
bors[bot]
c1b6f0e833
Merge #183
183: Add cropping and update `_formatted` behavior r=curquiza a=MarinPostma

TODO:
- [x] Solves #5 
- [x] Solves #203 
- [x] integrate the new milli highlight (according to the query words)

Co-authored-by: Marin Postma <postma.marin@protonmail.com>
Co-authored-by: Clémentine Urquizar <clementine@meilisearch.com>
2021-06-18 11:18:37 +00:00
Clémentine Urquizar
5d8a21b0de
Fix clippy errors 2021-06-17 18:51:07 +02:00
Clémentine Urquizar
623b71e81e
Fix clippy errors 2021-06-17 18:02:25 +02:00
Clémentine Urquizar
c5c7e76805
Update meilisearch-http/src/index/search.rs
Co-authored-by: marin <postma.marin@protonmail.com>
2021-06-17 18:00:02 +02:00
Clémentine Urquizar
e4b3d35ed8
Fix clippy errors 2021-06-17 17:03:43 +02:00
Clémentine Urquizar
33e55bd82e
Refactor the crop 2021-06-17 16:59:01 +02:00
Clémentine Urquizar
9543ab4db6
Use mut instead of returning the hashmap 2021-06-17 13:51:27 +02:00
Clémentine Urquizar
97909ce56e
Use BTreeMap and remove ids_in_formatted 2021-06-16 19:30:06 +02:00
bors[bot]
2f2484e186
Merge #212
212: bump milli to 0.4.0 r=MarinPostma a=MarinPostma



Co-authored-by: marin postma <postma.marin@protonmail.com>
2021-06-16 15:42:34 +00:00
bors[bot]
2062b10b79
Merge #209
209: Integrate amplitude r=MarinPostma a=irevoire

And merge the sentry and amplitude usage under one “Enable analytics” flag

closes #180


Co-authored-by: Tamo <tamo@meilisearch.com>
Co-authored-by: Irevoire <tamo@meilisearch.com>
2021-06-16 15:25:31 +00:00
Clémentine Urquizar
a0b022afee
Add Cow 2021-06-16 17:25:02 +02:00
marin postma
5a47cef9a8
bump milli to 0.4.0 2021-06-16 17:15:56 +02:00
Clémentine Urquizar
9538790b33
Decompose into two functions 2021-06-16 17:13:21 +02:00
Tamo
4e2568fd6e
disable amplitude on debug build 2021-06-16 17:12:49 +02:00
Clémentine Urquizar
dc5a3d4a62
Use BTreeSet instead of HashSet 2021-06-16 16:20:10 +02:00
Clémentine Urquizar
7b02fdaddc
Rename functions 2021-06-16 14:23:08 +02:00
Irevoire
c0d169e79e
Apply suggestions from code review
Co-authored-by: Clémentine Urquizar <clementine@meilisearch.com>
2021-06-16 11:12:46 +02:00
Clémentine Urquizar
9840b5c7fb
Refacto 2021-06-15 18:44:56 +02:00
Clémentine Urquizar
1ef061d92b
Fix clippy errors 2021-06-15 17:40:45 +02:00
Clémentine Urquizar
79a1212ebe
Do intersection with displayed ids instead of checking in loop 2021-06-15 17:40:45 +02:00
Clémentine Urquizar
8d0269fcc4
Create function to create fomatted_options 2021-06-15 17:40:45 +02:00
Clémentine Urquizar
5e656bb58a
Rename parse_facets into parse_filter 2021-06-15 17:40:45 +02:00
Clémentine Urquizar
d9c0190497
Redo to_retrieve_ids 2021-06-15 17:40:45 +02:00
Clémentine Urquizar
5dffe566fd
Remove useless comments 2021-06-15 17:40:45 +02:00
Clémentine Urquizar
b769877183
Make it compatible with the new milli highlighting 2021-06-15 17:40:44 +02:00
Clémentine Urquizar
446b66b0fe
Fix cargo clippy error 2021-06-15 17:40:44 +02:00
Clémentine Urquizar
d0ec081e49
Refacto 2021-06-15 17:40:44 +02:00
Clémentine Urquizar
65130d9ee7
Change crop_length type from Option(usize) to usize 2021-06-15 17:40:44 +02:00
Clémentine Urquizar
638009fb2b
Rename highlighter variable into formatter 2021-06-15 17:40:44 +02:00
Clémentine Urquizar
7f84f59472
Reorganize imports 2021-06-15 17:40:44 +02:00
Clémentine Urquizar
4f8c771bb5
Add new line 2021-06-15 17:40:43 +02:00
Clémentine Urquizar
9e69f33f3c
Fix clippy errors 2021-06-15 17:40:43 +02:00
Clémentine Urquizar
0da8fa115e
Add custom croplength for attributes to crop 2021-06-15 17:40:43 +02:00
Clémentine Urquizar
811bc2f421
Around to previous word 2021-06-15 17:40:43 +02:00
Clémentine Urquizar
caaf8d3f40
Fix tests 2021-06-15 17:40:43 +02:00
Marin Postma
7473cc6e27
implement crop around 2021-06-15 17:40:43 +02:00
Marin Postma
56c9633c53
simple crop before 2021-06-15 17:40:43 +02:00
Clémentine Urquizar
93002e734c
Fix tests 2021-06-15 17:40:42 +02:00
Clémentine Urquizar
60f6d1c373
First version of highlight after refacto 2021-06-15 17:40:42 +02:00
Clémentine Urquizar
a03d9d496e
Fix compilation errors 2021-06-15 17:40:42 +02:00
Marin Postma
7904637893
crop skeleton 2021-06-15 17:40:42 +02:00
Tamo
def1596eaf
Integrate amplitude
And merge the sentry and amplitude usage under one “Enable analytics”
flag
2021-06-15 15:36:30 +02:00
marin postma
a780cff8fd
fix clippy warning 2021-06-14 14:53:47 +02:00
Tamo
7cb2dcbdf8
add a comment 2021-06-14 14:47:53 +02:00
Tamo
f068d7f978
makes clippy happy 2021-06-14 14:47:53 +02:00
Tamo
18d4d6097a
implements the synonyms in transplant 2021-06-14 14:47:51 +02:00
bors[bot]
b119bb4ab0
Merge #197
197: Update milli (v0.3.1) with filterable attributes r=MarinPostma a=curquiza

Fixes #187 and #70
Also fixes #195 

Co-authored-by: Clémentine Urquizar <clementine@meilisearch.com>
2021-06-14 12:19:42 +00:00