mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-23 02:27:40 +08:00
41fc0dcb62
309: Sort at query time r=Kerollmops a=Kerollmops This PR: - Makes the `Asc/Desc` criteria work with strings too, it first returns documents ordered by numbers then by strings, and finally the documents that can't be ordered. Note that it is lexicographically ordered and not ordered by character, which means that it doesn't know about wide and short characters i.e. `a`, `丹`, `▲`. - Changes the syntax for the `Asc/Desc` criterion by now using a colon to separate the name and the order i.e. `title:asc`, `price:desc`. - Add the `Sort` criterion at the third position in the ranking rules by default. - Add the `sort_criteria` method to the `Search` builder struct to let the users define the `Asc/Desc` sortable attributes they want to use at query time. Note that we need to check that the fields are registered in the sortable attributes before performing the search. - Introduce a new `InvalidSortableAttribute` user error that is raised when the sort criteria declared at query time are not part of the sortable attributes. - `@ManyTheFish` introduced integration tests for the dynamic Sort criterion. Fixes #305. Co-authored-by: Kerollmops <clement@meilisearch.com> Co-authored-by: many <maxime@meilisearch.com>
59 lines
1.6 KiB
TOML
59 lines
1.6 KiB
TOML
[package]
|
|
name = "milli"
|
|
version = "0.10.1"
|
|
authors = ["Kerollmops <clement@meilisearch.com>"]
|
|
edition = "2018"
|
|
|
|
[dependencies]
|
|
bstr = "0.2.15"
|
|
byteorder = "1.4.2"
|
|
chrono = { version = "0.4.19", features = ["serde"] }
|
|
concat-arrays = "0.1.2"
|
|
csv = "1.1.5"
|
|
either = "1.6.1"
|
|
flate2 = "1.0.20"
|
|
fst = "0.4.5"
|
|
fxhash = "0.2.1"
|
|
grenad = { git = "https://github.com/Kerollmops/grenad.git", rev = "3adcb26" }
|
|
heed = { git = "https://github.com/Kerollmops/heed", tag = "v0.12.1", default-features = false, features = ["lmdb", "sync-read-txn"] }
|
|
human_format = "1.0.3"
|
|
levenshtein_automata = { version = "0.2.0", features = ["fst_automaton"] }
|
|
linked-hash-map = "0.5.4"
|
|
meilisearch-tokenizer = { git = "https://github.com/meilisearch/tokenizer.git", tag = "v0.2.5" }
|
|
memmap = "0.7.0"
|
|
obkv = "0.2.0"
|
|
once_cell = "1.5.2"
|
|
ordered-float = "2.1.1"
|
|
rayon = "1.5.0"
|
|
roaring = "0.6.6"
|
|
serde = { version = "1.0.123", features = ["derive"] }
|
|
serde_json = { version = "1.0.62", features = ["preserve_order"] }
|
|
slice-group-by = "0.2.6"
|
|
smallstr = { version = "0.2.0", features = ["serde"] }
|
|
smallvec = "1.6.1"
|
|
tempfile = "3.2.0"
|
|
uuid = { version = "0.8.2", features = ["v4"] }
|
|
|
|
# facet filter parser
|
|
pest = { git = "https://github.com/pest-parser/pest.git", rev = "51fd1d49f1041f7839975664ef71fe15c7dcaf67" }
|
|
pest_derive = "2.1.0"
|
|
|
|
# documents words self-join
|
|
itertools = "0.10.0"
|
|
|
|
# logging
|
|
log = "0.4.14"
|
|
logging_timer = "1.0.0"
|
|
|
|
# We temporarily depend on this crate just to fix this issue
|
|
# https://github.com/bheisler/TinyTemplate/pull/17
|
|
tinytemplate = "=1.1.0"
|
|
|
|
[dev-dependencies]
|
|
big_s = "1.0.2"
|
|
maplit = "1.0.2"
|
|
rand = "0.8.3"
|
|
|
|
[features]
|
|
default = []
|