marin postma
97ef4a6c22
implement matches
2021-06-22 18:12:52 +02:00
marin postma
9cc31c2258
fix get search crop len
2021-06-22 16:01:40 +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
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
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
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
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
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
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
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
Clémentine Urquizar
d4be4d80db
Fix after rebase
2021-06-14 13:27:18 +02:00
Clémentine Urquizar
aa04124bfc
Add changes according to milli update
2021-06-14 13:20:37 +02:00
bors[bot]
d765397c82
Merge #179
...
179: Enable filter paramater during search r=MarinPostma a=MarinPostma
This pr makes the necessary changes to transplant in accordance with the specification on filters.
More precisely, it:
- Removes the `filters` parameter
- Renames `facetFilters` to `filter`
- Allows either a string or an array to be passed to the filter param.
It doesn't allow the mixed syntax, that needs to be handled by milli.
close #81
close #140
Co-authored-by: Marin Postma <postma.marin@protonmail.com>
2021-06-14 08:11:30 +00:00
Marin Postma
1c4f0b2ccf
clippy, fmt & tests
2021-05-31 16:03:39 +02:00
Marin Postma
b192cb9c1f
enable string syntax for the filters
2021-05-06 12:48:31 +02:00
Marin Postma
a717925caa
remove filters, rename facet_filters to filter
2021-05-04 18:20:56 +02:00