-
-
Notifications
You must be signed in to change notification settings - Fork 327
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Search with exact: true
doesn't work as intended
#866
Comments
Anybody looking at this issue? Any pointer would be appreciated @micheleriva |
Hi @logancyang and @zeroliu, we are currently experiencing a temporary slowdown in managing this activity. We will keep you updated. |
I'll try to speed this up: /bounty 150 |
💎 oramasearch is offering a $150 bounty for this issue |
/attempt #866 |
@matijagaspar is this fixed with your last PR? |
I'm experiencing this issue with the latest version (3.1.1). |
Thanks for looking into it @Mobarak786 . I don't have the permission to assign the ticket though. Maybe a repo admin can help |
Hi @Mobarak786 , @zeroliu , thanks for your help! You don't need to get the issue assigned, just send a PR and if it gets merged, we will pay the bounty. Thanks again! |
Exact matchThe exact property finds all the document with an exact match of the term property.
We are now searching for all the documents that contain exactly the word Chris in the director property. 📌 Without the exact property, for example, the term Christopher Nolan would be returned as well, as it contains the word Chris. So in my opinion there is no bug in the issue. The issue is with the example input , the creator of the issue uses. 📍issue shoud be closed. Don't need a PR |
@micheleriva is this issue still open? if. then I will start working on it |
Describe the bug
When I search with
exact: true
, documents with partially matching terms are also returned.To Reproduce
https://codesandbox.io/p/sandbox/lvy7mc
const db = create({
schema: {
path: "string",
title: "string",
},
});
insert(db, { path: "First Note.md", title: "First Note" });
insert(db, { path: "Second Note.md", title: "Second Note" });
const noExact = search(db, {
term: "first",
properties: ["path"],
}); // 1 result OK
const withExact = search(db, {
term: "first",
properties: ["path"],
exact: true,
}); // 1 result NOT OK
console.log("noExact path", noExact);
console.log("withExact path", withExact);
Expected behavior
Calling
search
withexact: true
should only return documents with terms that exactly matches.Environment Info
Affected areas
Search
Additional context
No response
The text was updated successfully, but these errors were encountered: