Skip to content
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

Possible to search with partial match? #282

Open
Pulkit-Sharma opened this issue Mar 26, 2021 · 4 comments
Open

Possible to search with partial match? #282

Pulkit-Sharma opened this issue Mar 26, 2021 · 4 comments

Comments

@Pulkit-Sharma
Copy link

I love this library and have been using it on all websites.
However, there is one issue that need solution.

If I search 'example', result is given. If I search 'some extra text example' no results given.

Is it possible to get result even if a single word matches instead of full words matching?

@etianen
Copy link
Owner

etianen commented Mar 26, 2021 via email

@Pulkit-Sharma
Copy link
Author

It's not possible with the library as-is, and TBH I'm not sure you want it. Here's why: The problem with OR-ing together the words is that, every time you add a new word, you get a larger number of less-specific results. Which is the opposite of how search usually works. Imagine you're googling. You type: "pie". Your results are all sorts of pies. You type "chicken pie". Your results are all sorts of pies, and information on how to rear chickens, all mixed together. You type "chicken pie recips". Your results are now all sorts of pies, information on how to rear chickens, and recipies for cooking all types of food, all mixed together. It's really strange to type in more words and get less and less relevant results!

On Fri, 26 Mar 2021 at 14:06, Pulkit @.***> wrote: I love this library and have been using it on all websites. However, there is one issue that need solution. If I search 'example', result is given. If I search 'some extra text example' no results given. Is it possible to get result even if a single word matches instead of full words matching? — You are receiving this because you are subscribed to this thread. Reply to this email directly, view it on GitHub <#282>, or unsubscribe https://github.com/notifications/unsubscribe-auth/AABEKCHDLWGJCIWAOZWZP4LTFSIH3ANCNFSM4Z3OWGVQ .

The thing is google know that a site posts recipe even if a post does not contain "recipe" word.
for example, in my blog if I post "how to make pie" and in details only process is given without including recipe word.

If user search "recipe of pie" in watson, no results will be shown. How do we solve it?

@etianen
Copy link
Owner

etianen commented Apr 5, 2021 via email

@gawry
Copy link

gawry commented Oct 26, 2023

Perhaps some sort of semantic vector db structure could help in this direction (probably out of scope of this library).

If your are using PostgreSQL, https://github.com/pgvector/pgvector might be something interesting to look at as a path into that direction

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants