Feature/unified nl search #106
@@ -264,13 +264,15 @@ pub async fn unified_search<TagD: TagDao>(
|
||||
let mut allowed_hashes: HashSet<String> = HashSet::new();
|
||||
if has_struct {
|
||||
// Tag membership set (rel_path only — same cross-library imprecision
|
||||
// as the existing /photos tag listing). ALL-mode: the photo must
|
||||
// carry every named tag.
|
||||
// as the existing /photos tag listing). ANY-mode: a photo matches if
|
||||
// it carries any of the named tags. ALL-mode over-constrains NL
|
||||
// queries (the model maps several words to tags and few photos carry
|
||||
// them all); the semantic term does the precision work instead.
|
||||
let tag_set: Option<HashSet<String>> = if sq.tag_ids.is_empty() {
|
||||
None
|
||||
} else {
|
||||
let mut dao = tag_dao.lock().expect("tag dao");
|
||||
match dao.get_files_with_all_tag_ids(
|
||||
match dao.get_files_with_any_tag_ids(
|
||||
sq.tag_ids.clone(),
|
||||
sq.exclude_tag_ids.clone(),
|
||||
&ctx,
|
||||
|
||||
Reference in New Issue
Block a user