mirror of
https://github.com/meilisearch/meilisearch.git
synced 2025-09-10 06:36:29 +00:00
Add the criteria list to the index
This commit is contained in:
@ -1,3 +1,8 @@
|
||||
use crate::FieldId;
|
||||
|
||||
use serde::{Serialize, Deserialize};
|
||||
|
||||
#[derive(Debug, Serialize, Deserialize, Copy, Clone, PartialEq, Eq)]
|
||||
pub enum Criterion {
|
||||
/// Sorted by increasing number of typos.
|
||||
Typo,
|
||||
@ -14,9 +19,9 @@ pub enum Criterion {
|
||||
/// Sorted by the similarity of the matched words with the query words.
|
||||
Exactness,
|
||||
/// Sorted by the increasing value of the field specified.
|
||||
CustomAsc(String),
|
||||
Asc(FieldId),
|
||||
/// Sorted by the decreasing value of the field specified.
|
||||
CustomDesc(String),
|
||||
Desc(FieldId),
|
||||
}
|
||||
|
||||
pub fn default_criteria() -> Vec<Criterion> {
|
||||
|
Reference in New Issue
Block a user