mirror of
https://github.com/meilisearch/meilisearch.git
synced 2024-11-23 18:45:06 +08:00
lowercase value extracted from Token
This commit is contained in:
parent
4e113bbf1b
commit
7cd9109e2f
@ -217,8 +217,9 @@ impl<'a> Filter<'a> {
|
|||||||
Condition::LowerThanOrEqual(val) => (Included(f64::MIN), Included(parse(val)?)),
|
Condition::LowerThanOrEqual(val) => (Included(f64::MIN), Included(parse(val)?)),
|
||||||
Condition::Between { from, to } => (Included(parse(from)?), Included(parse(to)?)),
|
Condition::Between { from, to } => (Included(parse(from)?), Included(parse(to)?)),
|
||||||
Condition::Equal(val) => {
|
Condition::Equal(val) => {
|
||||||
let (_original_value, string_docids) =
|
let (_original_value, string_docids) = strings_db
|
||||||
strings_db.get(rtxn, &(field_id, val.inner))?.unwrap_or_default();
|
.get(rtxn, &(field_id, &val.inner.to_lowercase()))?
|
||||||
|
.unwrap_or_default();
|
||||||
let number = val.inner.parse::<f64>().ok();
|
let number = val.inner.parse::<f64>().ok();
|
||||||
let number_docids = match number {
|
let number_docids = match number {
|
||||||
Some(n) => {
|
Some(n) => {
|
||||||
@ -316,7 +317,7 @@ impl<'a> Filter<'a> {
|
|||||||
match &self.condition {
|
match &self.condition {
|
||||||
FilterCondition::Condition { fid, op } => {
|
FilterCondition::Condition { fid, op } => {
|
||||||
let filterable_fields = index.fields_ids_map(rtxn)?;
|
let filterable_fields = index.fields_ids_map(rtxn)?;
|
||||||
if let Some(fid) = filterable_fields.id(fid.inner) {
|
if let Some(fid) = filterable_fields.id(&fid.inner.to_lowercase()) {
|
||||||
Self::evaluate_operator(rtxn, index, numbers_db, strings_db, fid, &op)
|
Self::evaluate_operator(rtxn, index, numbers_db, strings_db, fid, &op)
|
||||||
} else {
|
} else {
|
||||||
// TODO TAMO: update the error message
|
// TODO TAMO: update the error message
|
||||||
|
Loading…
Reference in New Issue
Block a user