368: Remove limit of 1000 position per attribute r=irevoire a=ManyTheFish
Instead of using an arbitrary limit we encode the absolute position in a u32
using one strong u16 for the field id and a weak u16 for the relative position in the attribute.
- [x] check database size difference
below is the database size difference for each dataset:
![Capture d’écran 2021-09-27 à 18 01 44](https://user-images.githubusercontent.com/6482087/134944199-bd25fed0-6c34-475c-9afc-197871e06553.png)
- [ ] check search time on big dataset
Related to [product#202](https://github.com/meilisearch/product/issues/202)
Co-authored-by: many <maxime@meilisearch.com>
Instead of using an arbitrary limit we encode the absolute position in a u32
using one strong u16 for the field id and a weak u16 for the relative position in the attribute.
386: fix obkv document r=curquiza a=MarinPostma
When serializing a document, the serializer resolved the field_id of the current field and immediately added it to the obkv document under construction. The issue with that is that obkv expects the fields to be inserted in order, and when a document with out of order fields was added, obkv failed to insert the field.
The current fix first resolves each field_id, and adds all the fields to a temporary `BTreeMap`, until `end` is called on the map serializer, where all the fields are added to the obkv at once, and in order.
Co-authored-by: mpostma <postma.marin@protonmail.com>
1793: Remove memmap dependency r=curquiza a=palfrey
Fixes#1792. I was going to replace with [memmap2](https://github.com/RazrFalcon/memmap2-rs) which should be a drop-in replacement, but I couldn't actually find anything that actually directly used it. It ends up being a dependency in [milli](https://github.com/meilisearch/milli) so I'm going to go there next and fix that.
Co-authored-by: Tom Parker-Shemilt <palfrey@tevp.net>
383: Add check on latitude and longitude r=irevoire a=irevoire
Latitudes are not supposed to go beyond 90 degrees or below -90.
The same goes for longitudes with 180 or -180.
This was badly implemented in the filters, and was not implemented for the `AscDesc` rules.
Co-authored-by: Tamo <tamo@meilisearch.com>
Co-authored-by: Irevoire <tamo@meilisearch.com>
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>
Latitude are not supposed to go beyound 90 degrees or below -90.
The same goes for longitude with 180 or -180.
This was badly implemented in the filters, and was not implemented for the AscDesc rules.
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>
1769: Enforce `Content-Type` header for routes requiring a body payload r=MarinPostma a=irevoire
closes#1665
Co-authored-by: Tamo <tamo@meilisearch.com>
- 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
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>