mirror of
https://github.com/ankitects/anki.git
synced 2025-09-19 06:22:22 -04:00
fix duplicates search
This commit is contained in:
parent
7375a0389a
commit
0750ad5c62
2 changed files with 4 additions and 4 deletions
|
@ -273,7 +273,7 @@ fn search_node_for_text_with_argument<'a>(
|
|||
"is" => parse_state(val.as_ref())?,
|
||||
"flag" => parse_flag(val.as_ref())?,
|
||||
"rated" => parse_rated(val.as_ref())?,
|
||||
"dupes" => parse_dupes(val.as_ref())?,
|
||||
"dupe" => parse_dupes(val.as_ref())?,
|
||||
"prop" => parse_prop(val.as_ref())?,
|
||||
"re" => SearchNode::Regex(val),
|
||||
"nc" => SearchNode::NoCombining(val),
|
||||
|
|
|
@ -358,7 +358,7 @@ impl SqlWriter<'_> {
|
|||
let csum = field_checksum(text_nohtml.as_ref());
|
||||
write!(
|
||||
self.sql,
|
||||
"(n.mid = {} and n.csum = {} and field_at_index(n.flds, 0) = ?",
|
||||
"(n.mid = {} and n.csum = {} and field_at_index(n.flds, 0) = ?)",
|
||||
ntid, csum
|
||||
)
|
||||
.unwrap();
|
||||
|
@ -557,9 +557,9 @@ mod test {
|
|||
|
||||
// dupes
|
||||
assert_eq!(
|
||||
s(ctx, "dupes:123,test"),
|
||||
s(ctx, "dupe:123,test"),
|
||||
(
|
||||
"((n.mid = 123 and n.csum = 2840236005 and field_at_index(n.flds, 0) = ?)".into(),
|
||||
"((n.mid = 123 and n.csum = 2840236005 and field_at_index(n.flds, 0) = ?))".into(),
|
||||
vec!["test".into()]
|
||||
)
|
||||
);
|
||||
|
|
Loading…
Reference in a new issue