Commit Graph

290 Commits

Author SHA1 Message Date
Ryan Russell
71bf9b5b9b
docs: Readability improvements in tasks/
Signed-off-by: Ryan Russell <git@ryanrussell.org>
2022-06-14 20:38:45 -05:00
bors[bot]
4fc73195e6
Merge #2466
2466: index resolver tests r=MarinPostma a=MarinPostma

add more index resolver tests


depends on #2455 

followup #2453 

Co-authored-by: ad hoc <postma.marin@protonmail.com>
2022-06-09 17:50:01 +00:00
Tamo
2063fbd985
chore: bump milli 2022-06-09 18:34:03 +02:00
bors[bot]
de356061db
Merge #2414
2414: Improve index uid validation upon API key creation r=Kerollmops a=pierre-l

- ~Use an IndexUid newtype to enforce stronger constraints~
- ~`cargo update -p vergen`~ (`rustup update` was the proper fix for this)
- Add a new `meilisearch_types` crate
- Move `meilisearch_error` to `meilisearch_types::error`
- Move `meilisearch_lib::index_resolver::IndexUid` to `meilisearch_types::index_uid`
- Add a new `InvalidIndexUid` error in `meilisearch_types::index_uid`
- Move `meilisearch_http::routes::StarOr` to `meilisearch_types::star_or`
- Use the `IndexUid` and `StarOr` in `meilisearch_auth::Key`

Fixes #2158


Co-authored-by: pierre-l <pierre.larger@gmail.com>
2022-06-09 15:41:51 +00:00
ad hoc
9a6841c7ce
remove unused test 2022-06-09 17:10:56 +02:00
ad hoc
354f7fb2bf
test index_update 2022-06-09 17:10:55 +02:00
ad hoc
0333bad057
delete documents test 2022-06-09 17:10:55 +02:00
ad hoc
0e416b4bcd
delete index test 2022-06-09 17:10:55 +02:00
pierre-l
36cb09eb25 Add a new meilisearch_types crate
Move `meilisearch_error` to `meilisearch_types::error`
Move `meilisearch_lib::index_resolver::IndexUid` to `meilisearch_types::index_uid`
Add a new `InvalidIndexUid` error in `meilisearch_types::index_uid`
2022-06-09 16:14:13 +02:00
ad hoc
8fc3b7d3b0
refactor process_document_addition_batch 2022-06-09 14:59:20 +02:00
ad hoc
64e3096790
process_task updates task events 2022-06-09 14:59:20 +02:00
ad hoc
b594d49def
add IndexResolver BatchHandler tests 2022-06-09 14:59:19 +02:00
ad hoc
fbba67fbe9
add mocker to IndexResolver 2022-06-09 14:59:19 +02:00
bors[bot]
b9b32d65a8
Merge #2494
2494: Introduce the new faceting and pagination settings r=ManyTheFish a=Kerollmops

This PR introduces two new settings following the newly created spec https://github.com/meilisearch/specifications/pull/157:
 - The `faceting.max_values_per_facet` one describes the maximum number of values (each with a count) associated with a value in a facet distribution query.
 - The `pagination.limited_to` one describes the maximum number of documents that a search query can ever return.

Co-authored-by: Kerollmops <clement@meilisearch.com>
2022-06-09 12:09:21 +00:00
bors[bot]
2b2e571c76
Merge #2460
2460: Create custom error types for `TaskType`, `TaskStatus`, and `IndexUid` r=Kerollmops a=walterbm

# Pull Request

## What does this PR do?
Fixes #2443 by making the following changes:

- Add custom `TaskTypeError` for `TaskType::from_str` 
- Add custom `TaskStatusError` for `TaskStatus::from_str`
- Add custom `IndexUidFormatError` for `IndexUid::from_str`
- Implement `From<IndexUidFormatError> for IndexResolverError` to convert between errors
- Replace all usages of `IndexUid::new` with `IndexUid::from_str`
    - **NOTE** I am relatively new to Rust and I struggled a lot with this final part. This PR ended up with a messy error conversion which does not seem ideal. Please let me know if you have any suggestions for how to make this better and I'll be happy to make any updates!

## 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: walter <walter.beller.morales@gmail.com>
2022-06-09 09:10:28 +00:00
Kerollmops
1e3dcbea3f
Plug the pagination.limited_to setting 2022-06-09 10:56:42 +02:00
Kerollmops
b96399d24b
Plug the faceting.max_values_per_facet setting 2022-06-09 10:56:42 +02:00
Kerollmops
5450b5ced3
Add the faceting.max_values_per_facet setting 2022-06-09 10:54:32 +02:00
Kerollmops
c924614527
Bump milli to 0.29.2 2022-06-09 10:54:28 +02:00
walter
96d4fd54bb Change the index uid format check for better legibility 2022-06-08 19:58:47 -04:00
walter
2b944ecd89 Remove IndexUid::new and replace with IndexUid::from_str 2022-06-08 19:56:01 -04:00
bors[bot]
db42268888
Merge #2473
2473: fix blocking in dumps r=irevoire a=MarinPostma

This PR fixes two blocking calls in the dump process.


Co-authored-by: ad hoc <postma.marin@protonmail.com>
2022-06-08 17:14:46 +00:00
ad hoc
108b3520de
fix blocking auth controller dump 2022-06-08 18:19:29 +02:00
Clémentine Urquizar
fc4990b968
Update version for next release (v0.28.0) 2022-06-08 17:59:18 +02:00
ManyTheFish
f5306eb5b0 Set disabled_words to default when Index::exact_words returns None 2022-06-08 14:38:09 +02:00
ManyTheFish
173eea06e1 Replace old tokenizer by charabia 2022-06-08 14:38:09 +02:00
ManyTheFish
8d09772334 Update milli 2022-06-08 14:38:05 +02:00
ad hoc
cbd27d313c
fix blocking writing of meta file in dump 2022-06-07 10:07:40 +02:00
ad hoc
6ac8675c6d
add IndexResolver BatchHandler tests 2022-06-07 09:33:57 +02:00
ad hoc
df61ca9cae
add mocker to IndexResolver 2022-06-07 09:33:57 +02:00
ad hoc
bbd685af5e
move IndexResolver to real module 2022-06-07 09:33:56 +02:00
Kerollmops
10d3b367dc
Simplify the const default values 2022-06-06 10:06:00 +02:00
walter
ba55905377 Add custom IndexUidFormatError for IndexUid 2022-06-05 02:26:48 -04:00
bors[bot]
953a209f02
Merge #2447
2447: move index uid in task content r=Kerollmops a=MarinPostma

this pr moves the index_uid from the `Task` to the `TaskContent`. This is because the task can now have content that do not target a particular index.


Co-authored-by: ad hoc <postma.marin@protonmail.com>
2022-06-02 13:54:09 +00:00
ad hoc
0c5352fc22
move index_uid from task to task_content 2022-06-02 15:30:35 +02:00
Irevoire
4667c9fe1a
fix(http): Fix the query parameter in the Documents route 2022-06-02 14:10:44 +02:00
bors[bot]
c9cd1738a5
Merge #2445
2445: Seek-based tasks list r=Kerollmops a=Kerollmops

This PR implements the seek-based pagination for the tasks list following [the spec](https://github.com/meilisearch/specifications/pull/115).

Co-authored-by: Kerollmops <clement@meilisearch.com>
2022-06-02 10:25:54 +00:00
Kerollmops
df721b2e9e
Scheduler must not reverse the order of the fetched tasks 2022-06-01 17:16:15 +02:00
ManyTheFish
1816db8c1f Move dump v4 patcher into v4.rs 2022-06-01 16:17:43 +02:00
ManyTheFish
84f52ac175 Add v4 feature to uuid 2022-06-01 16:08:42 +02:00
ManyTheFish
70916d6596 Patch dump v4 2022-06-01 16:08:42 +02:00
Kerollmops
c11d21879a
Introduce tasks limit and after to the tasks route 2022-06-01 13:26:36 +02:00
Kerollmops
461b91fd13
Introduce the fetch_unfinished_tasks function to fetch tasks 2022-06-01 12:09:52 +02:00
bors[bot]
e81c7aa2e6
Merge #2423
2423: Paginate the index resource r=MarinPostma a=irevoire

Fix #2373


Co-authored-by: Irevoire <tamo@meilisearch.com>
2022-05-31 19:25:25 +00:00
bors[bot]
47007fa71b
Merge #2446
2446: rename Succeded to Succeeded r=irevoire a=MarinPostma

this pr renames `TaskEvent::Succeded` to `TaskEvent::Succeeded` and apply the migration to the dumps


Co-authored-by: ad hoc <postma.marin@protonmail.com>
2022-05-31 18:27:02 +00:00
Irevoire
627f13df85
feat(http): paginate the index resource
Fix #2373
2022-05-31 18:11:45 +02:00
ad hoc
446f1f31e0
rename Succeded to Succeeded 2022-05-31 17:22:37 +02:00
Irevoire
ddad6cc069
feat(http): update the documents resource
- Return Documents API resources on `/documents` in an array in the the results field.
- Add limit, offset and total in the response body.
- Rename `attributesToRetrieve` into `fields` (only for the `/documents` endpoints, not for the `/search` ones).
- The `displayedAttributes` settings does not impact anymore the displayed fields returned in the `/documents` endpoints. These settings only impacts the `/search` endpoint.

Fix #2372
2022-05-31 16:40:40 +02:00
Kerollmops
3684c822f1
Add indexUid filtering on the /tasks route 2022-05-31 11:33:20 +02:00
ManyTheFish
deba0cc096 Make v4::load_dump copy each part a the dump 2022-05-31 10:24:44 +02:00