You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is there an existing issue or pull request for this?
I have searched the existing issues and pull requests
Feature description
Is there a way to perform a logical query containing a simple pattern without key speciication (e.g. { $and: [{ key1: "abc"}, "xyz"]}).
Trying the pattern from the example yields no matches even though there should be some.
Is there an altenative way to achieve this query in Fuse, or is it not supported?
Desired solution
Ideally, the pattern exemplified in { $and: [{ key1: "abc"}, "xyz"]} would work so that it would return results containing a match for "abc" in the key key1 and simultaneously a match for in xyz in any of the indexed fields (similarly to fuse.search("xyz")).
Alternatives considered
I've found no way to achieve given query in Fuse.The query pattern seems relatively orthodox (at least in my usecase), it would be helpful, if it was supported by the library.
Could you give an example list and search query to show the above? Ultimately the way logical operators work is by operating on a single list item, so the item itself would have to be match both patterns in the AND query. Perhaps I am not fully understanding the feature ask, so an example would help. Thanks! :)
Activity
krisk commentedon Oct 25, 2023
Could you give an example list and search query to show the above? Ultimately the way logical operators work is by operating on a single list item, so the item itself would have to be match both patterns in the
ANDquery. Perhaps I am not fully understanding the feature ask, so an example would help. Thanks! :)github-actions commentedon Feb 23, 2024
This issue is stale because it has been open 120 days with no activity. Remove stale label or comment or this will be closed in 30 days
ashtraysoap commentedon Jun 19, 2024
Thanks for the reply, and my apologies for my delay.
Given the input data:
[ { name: "Albert", city: "London", }, { name: "Albert", city: "Paris", }, { name: "Arnold", city: "Paris" }, ]I want to achieve the following filter: match all items with
Albertin name andParisin any other field.I would expect the query
{ $and: [{ name: "Albert"}, "Paris"]}to achieve this, however it does not work.Thanks!
ashtraysoap commentedon Sep 10, 2024
@krisk could you please provide an update whether this functionality is available?
feat(search): support keyless string entries in logical queries
krisk commentedon Apr 3, 2026
Fixed in 8695556. You can now use plain strings in
$and/$orarrays to search across all indexed keys:The keyless string
"Scalzi"searches all keys, while{ title: "old" }targets only the title field.