3069 Commits

Author SHA1 Message Date
Tom Parker-Shemilt
6c46fbbc57 Remove memmap dependency 2021-10-10 22:33:40 +01:00
Patrick Dung
87115b02d9 Fixing the passing of environment variables 2021-10-10 03:27:51 +08:00
Patrick Dung
c614520405 Cross build with action-rs 2021-10-10 02:21:30 +08:00
John Braun
3756f5a0ca Add test for highlighting numbers 2021-10-08 15:07:45 +02:00
John Braun
5b4e4bb858 Highlight numbers (int) as string in formatted JSON 2021-10-08 15:07:15 +02:00
bors[bot]
dffd90b966
Merge #1783
1783: Fix too many open file error r=ManyTheFish a=ManyTheFish

- prepare_for_closing() function wasn't called when an index is deleted, we are now calling it
- Index wasn't deleted in the case where we couldn't insert `uid` in `index_uuid_store`, we are now cleaning it

Fix #1736

Co-authored-by: many <maxime@meilisearch.com>
v0.23.0rc2
2021-10-07 15:48:07 +00:00
many
a92a0c3ed3
Log the error instead of returning it when deletion fails 2021-10-07 17:38:22 +02:00
many
0774b1efa5
Close index's heed environment when index is deleted 2021-10-07 17:09:41 +02:00
many
7fc7eb7457
Make sure to remove newly created index if uid is already taken 2021-10-07 16:49:21 +02:00
bors[bot]
602a327aa8
Merge #1781
1781: Optimize build size r=irevoire a=MarinPostma

Remove debug symbols from the release build, and strip the binaries.

We used to need to debug symbols for sentry, but since it was removed with #1616, we don't need them anymore.

Shrinks the binary size from ~300MB to ~50MB on linux.

Co-authored-by: mpostma <postma.marin@protonmail.com>
2021-10-07 13:31:03 +00:00
mpostma
14c6ae4735 disable stripping 2021-10-07 12:10:36 +02:00
mpostma
493a0e377d optimize build size 2021-10-07 11:49:52 +02:00
bors[bot]
5e3e108143
Merge #1769
1769: Enforce `Content-Type` header for routes requiring a body payload r=MarinPostma a=irevoire

closes #1665 

Co-authored-by: Tamo <tamo@meilisearch.com>
v0.23.0rc1
2021-10-06 15:43:50 +00: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
37b267ffb3
duplicate the post document tests with the put verb 2021-10-06 17:15:47 +02:00
Tamo
dfa199f98f
add content-type tests
fix typo

Co-authored-by: Clémentine Urquizar <clementine@meilisearch.com>
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]
ddbcf449da
Merge #1763
1763: Index tests r=MarinPostma a=MarinPostma

This pr aims to test more thorougly the usage on index in the meilisearch database, by writing unit tests.

work included:
- [x] Create index mock and stub methods
- [x] Test snapshot creation
- [x] Test Dumps
- [x] Test search

Co-authored-by: mpostma <postma.marin@protonmail.com>
2021-10-06 14:39:53 +00:00
mpostma
9fa61439b1 fix clippy warning & unsafety 2021-10-06 14:51:46 +02:00
Clémentine Urquizar
02dd1ea29d
Merge pull request #1771 from ferdi05/ferdi05-patch-contributing
Update CONTRIBUTING.md
2021-10-06 14:40:38 +02:00
mpostma
a38215de98 edit documentation 2021-10-06 14:35:18 +02:00
mpostma
85b5260d9d simple search unit test 2021-10-06 14:20:05 +02:00
mpostma
4b4ebad9a9 test dumps 2021-10-06 14:10:26 +02:00
mpostma
ece4c739f4 update store tests 2021-10-06 14:10:26 +02:00
mpostma
85ae34cf9f test snapshots 2021-10-06 14:10:23 +02:00
mpostma
0448f0ce56 handle panic in stubs 2021-10-06 14:09:04 +02:00
mpostma
4835d82a0b implement index mock 2021-10-06 14:09:01 +02:00
Ferdinand Boas
eaddee9fe2
Update CONTRIBUTING.md
typo + text improvement
all credits go to @guimachiavelli
2021-10-05 18:07:59 +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
bors[bot]
0c3ec549f8
Merge #1764
1764: Bump Milli to improve geosearch errors r=curquiza a=irevoire

closes #1734 

`@curquiza,` your two examples still don't work because a filter must be composed of multiples operations; look at my screenshot to see what works and what doesn't.
Is this ok? 🤔 

`@gmourier,`
What do you think?

![image](https://user-images.githubusercontent.com/7032172/135846911-588f652d-16db-4d88-89fd-148640bac0f7.png)


And here is a screenshot with all the new errors that have been implemented

![image](https://user-images.githubusercontent.com/7032172/135854851-da469fef-0dd0-4ff1-b15e-89934ed8fb6f.png)

Co-authored-by: Tamo <tamo@meilisearch.com>
2021-10-04 17:30:22 +00:00
Tamo
fca686e7f8
bump meilisearch 2021-10-04 13:52:37 +02:00
bors[bot]
607e28749a
Merge #1755
1755: Fix mini dashboard r=curquiza a=anirudhRowjee

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.

Co-authored-by: Anirudh Rowjee <ani.rowjee@gmail.com>
v0.23.0rc0
2021-10-04 09:56:21 +00:00
Anirudh Rowjee
bffab21b10 Changes
1. Removed redundant scope registration
2021-10-04 14:47:05 +05:30
Aviv
d9165c7f77 Add option to use enviroment variable to increase rate limit 2021-10-03 13:07:40 +03:00
gaul@pdx.edu
2ef58ccce9 Fix formatting 2021-10-02 10:59:01 -07:00
gaul@pdx.edu
4009804221 Creates non root user to run Meilisearch in Dockerfile 2021-10-02 10:43:13 -07:00
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
bors[bot]
81993b6a15
Merge #1747
1747: Add new error types for document additions r=curquiza a=MarinPostma

Adds the missing errors for the documents routes, as specified.

close #1691
close #1690


Co-authored-by: mpostma <postma.marin@protonmail.com>
2021-09-30 15:16:44 +00:00
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
ddd40d87a7
malformed payload error 2021-09-30 16:58:13 +02:00
mpostma
137272b8de
empty content type error 2021-09-30 16:58:13 +02:00
bors[bot]
e400ae900d
Merge #1746
1746: Do not commit transaction on failed updates r=irevoire a=Kerollmops

This PR fixes MeiliSearch that was always committing the transactions even when an update was invalid and the whole transaction should have been trashed. It was the source of a bug where an invalid update (with an invalid primary key) was creating an index with the specified primary key and should instead have failed and done nothing on the server.

Fixes #1735.

Co-authored-by: Kerollmops <clement@meilisearch.com>
2021-09-30 13:46:43 +00:00
Kerollmops
c388dca5ec
Check that invalid updates do not create an index with a primary key 2021-09-30 15:46:04 +02:00
Kerollmops
6a691db7f8
Do not commit transaction on failed updates 2021-09-30 15:46:03 +02:00
bors[bot]
ed783b67ca
Merge #1742
1742: Create dumps v3 r=irevoire a=MarinPostma

The introduction of the obkv document format has changed the format of the updates, by removing the need for the document format of the addition (it is not necessary since update are store in the obkv format). This has caused breakage in the dumps that this pr solves by introducing a 3rd version of the dumps.

A v2 compat layer has been created that support the import of v2 dumps into meilisearch. This has permitted to move the compat code that existed elsewhere in meiliearch to be moved into the v2 module. The asc/desc patching is now only done for forward compatibility when loading a v2 dump, and the v3 write the asc/desc to the dump with the new syntax.




Co-authored-by: mpostma <postma.marin@protonmail.com>
2021-09-30 13:17:30 +00:00
mpostma
ee372a7b30
implement new dump v2 2021-09-30 14:49:13 +02:00
mpostma
66f39aaa92
fix dump v3 2021-09-30 14:49:13 +02:00