Loïc Lecrenier
1e464e87fc
Update more insta-snap tests
2022-11-08 13:39:52 +01:00
Loïc Lecrenier
6126fc8d98
Rename original_query to original_filters everywhere
2022-11-08 13:18:18 +01:00
Loïc Lecrenier
2fdd814e57
Update tests following task API changes
2022-11-08 13:18:18 +01:00
Tamo
c9f89d38e3
Merge branch 'main' into index-swap-error-handling
2022-10-27 18:06:45 +02:00
Clément Renault
e67673bd12
Ingore the dumps v1 test on Windows
2022-10-27 14:34:45 +02:00
Clément Renault
44d6f3e7a0
Reconsider the Windows tests
2022-10-27 13:50:05 +02:00
Loïc Lecrenier
78ffa00f98
Move index swap error handling from meilisearch-http to index-scheduler
...
And make index_not_found error asynchronous, since we can't know
whether the index will exist by the time the index swap task is
processed.
Improve the index-swap test to verify that future tasks are not swapped
and to test the new error messages that were introduced.
2022-10-27 11:45:38 +02:00
Clément Renault
fae17ed590
Enable the authentication tests on Windows again
2022-10-27 11:35:24 +02:00
Clément Renault
7e355958e0
Await the last insert task
2022-10-27 11:35:24 +02:00
Irevoire
8bc602a7dd
makes clippy happy
2022-10-27 11:35:23 +02:00
Irevoire
6280bd51a9
actually fix the test and the swap_indexes name resolution
2022-10-27 11:35:23 +02:00
Irevoire
54d0aff4cf
ignore a strange test that works on my machine but not on the ci
2022-10-27 11:35:23 +02:00
Irevoire
b804cba4ca
try to debug the ci
2022-10-27 11:35:23 +02:00
Irevoire
3cf8aaa4d0
reformat
2022-10-27 11:35:23 +02:00
Irevoire
3979c9f02b
fix all the dump snasphots
2022-10-27 11:35:20 +02:00
Kerollmops
ee6597da60
Fix all the tests
2022-10-27 11:35:20 +02:00
Kerollmops
314b89ca30
Fix insta snapshots
2022-10-27 11:35:20 +02:00
Loïc Lecrenier
9b43528bbb
Update test after fixing bug in index swap
2022-10-27 11:35:18 +02:00
Loïc Lecrenier
e641d08846
Cargo fmt
2022-10-27 11:35:18 +02:00
Kerollmops
2de8a0711a
Cargo insta test/review
2022-10-27 11:35:16 +02:00
Irevoire
033794d209
add tests for the task deletion and task cancelation
2022-10-27 11:35:16 +02:00
Irevoire
a85d5b4981
test the details of all tasks type
2022-10-27 11:35:16 +02:00
Kerollmops
4736e00253
Handle the CLI options related to snapshots
2022-10-27 11:35:15 +02:00
Irevoire
7e52f1effb
remove a lot of unecessary clone and ref
2022-10-27 11:35:11 +02:00
Loïc Lecrenier
2808be9d45
Fix the /swap-indexes route API
...
1. payload
2. error messages
3. auth errors
2022-10-27 11:35:10 +02:00
Irevoire
2c0fde4a1a
ignore the snapshot test
2022-10-27 11:35:08 +02:00
Irevoire
c8ee453b6c
fix the autobatched document deletion
2022-10-27 11:35:07 +02:00
Irevoire
99144b1419
fix most content file error
2022-10-27 11:35:06 +02:00
Irevoire
e107f1b282
fix the payload too large error
2022-10-27 11:35:06 +02:00
Irevoire
1bef5d119d
fix the api keys for the tasks route
2022-10-27 11:35:06 +02:00
Clément Renault
80b2e70ee7
Introduce a rustfmt file
2022-10-27 11:35:05 +02:00
Clément Renault
788262e588
Fix final compilation
2022-10-27 11:34:17 +02:00
Loïc Lecrenier
17cd2a4aa0
Implement POST /indexes-swap
2022-10-27 11:34:15 +02:00
Kerollmops
1ca9a67c49
Introduce the task cancelation task type
2022-10-27 11:34:11 +02:00
Tamo
f7e546eea3
make the tests compile again
2022-10-27 11:34:10 +02:00
Tamo
634eb52926
extract the create_app function for the tests
2022-10-27 11:34:09 +02:00
Loïc Lecrenier
8bb0fcd144
Finish first draft of the DELETE /tasks route
2022-10-27 11:34:04 +02:00
bors[bot]
ab1800551f
Merge #2922
...
2922: Add new error when using /keys without masterkey set r=ManyTheFish a=vishalsodani
# Pull Request
## Related issue
Fixes #2918
Please check if your PR fulfills the following requirements:
- [x] Does this PR fix an existing issue, or have you listed the changes applied in the PR description (and why they are needed)?
- [x] Have you read the contributing guidelines?
- [x] Have you made sure that the title is accurate and descriptive of the changes?
Co-authored-by: vishalsodani <vishalsodani@rediffmail.com>
2022-10-27 09:13:11 +00:00
vishalsodani
03ba830ab2
uncomment tests
2022-10-27 12:59:28 +05:30
bors[bot]
25ec51e783
Merge #2601
...
2601: Ease search result pagination r=Kerollmops a=ManyTheFish
# Summary
This PR is a prototype enhancing search results pagination (#2577 )
# Todo
- [x] Update the API to return the number of pages and allow users to directly choose a page instead of computing an offset
- [x] Change computation of `total_pages` in order to have an exact count
- [x] compute query tree exhaustively
- [x] compute distinct exhaustively
# Small Documentation
## Default search query
**request**:
```sh
curl \
-X POST 'http://localhost:7700/indexes/movies/search ' \
-H 'Content-Type: application/json' \
--data-binary '{ "q": "botman" }'
```
**result**:
```json
{
"hits":[...],
"query":"botman",
"processingTimeMs":5,
"hitsPerPage":20,
"page":1,
"totalPages":4,
"totalHits":66
}
```
## Search query with offset parameter
**request**:
```sh
curl \
-X POST 'http://localhost:7700/indexes/movies/search ' \
-H 'Content-Type: application/json' \
--data-binary '{ "q": "botman", "offset": 0 }'
```
**result**:
```json
{
"hits":[...],
"query":"botman",
"processingTimeMs":3,
"limit":20,
"offset":0,
"estimatedTotalHits":66
}
```
## Search query selecting page with page parameter
**request**:
```sh
curl \
-X POST 'http://localhost:7700/indexes/movies/search ' \
-H 'Content-Type: application/json' \
--data-binary '{ "q": "botman", "page": 2 }'
```
**result**:
```json
{
"hits":[...],
"query":"botman",
"processingTimeMs":5,
"hitsPerPage":20,
"page":2,
"totalPages":4,
"totalHits":66
}
```
# Related
fixes #2577
## In charge of the feature
Core: `@ManyTheFish`
Docs: `@guimachiavelli`
Integration: `@bidoubiwa`
Co-authored-by: ManyTheFish <many@meilisearch.com>
2022-10-26 16:10:58 +00:00
vishalsodani
f0ecacb58d
add implementation for no master key set and fix tests
2022-10-25 22:41:48 +05:30
ManyTheFish
1d217cef19
Add some tests
2022-10-20 17:03:07 +02:00
vishalsodani
1a61209596
fix wrong variant returned for invalid_api_key_indexes error
2022-10-18 19:41:06 +05:30
Andrey "MOU" Larionov
2dce44f4c1
Fix formatting and shaving lints
2022-10-13 15:49:23 +02:00
Andrey "MOU" Larionov
b69f8d67c3
Added test to verify response encoding
...
Alongside request encoding (compression) support, it is helpful to verify that the server respect `Accept-Encoding` headers and apply the corresponding compression to responses.
2022-10-13 00:56:57 +02:00
Andrey "MOU" Larionov
343a677566
Fix formatting and apply clippy suggestion
2022-10-10 11:04:46 +02:00
Andrey "MOU" Larionov
9dbc71cb6d
Added support for encoded payload
...
Actix provides different content encodings out of the box, but only if we use built-in content wrappers and containers. This patch wraps its own Payload implementation with an actix decoder, which enables request compression support.
2022-10-09 22:09:30 +02:00
Andrey "MOU" Larionov
11b986a81d
Added support for specifying compression in tests
...
Refactored tests code to allow to specify compression (content-encoding) algorithm.
Added tests to verify what actix actually handle different content encodings properly.
2022-10-09 22:09:29 +02:00
Andrey "MOU" Larionov
7607a62531
Split tests over two modules
...
Currently, `add_documents` contains some amount of `update` tests. This change should unify test structure with `index` module.
2022-10-09 22:03:22 +02:00
Clémentine Urquizar - curqui
a7d2c9572e
Merge branch 'main' into stable
2022-10-04 14:20:10 +02:00