wevisdemo / parliament-watch

Citizens are watching 👀
https://parliamentwatch.wevis.info
Other
61 stars 33 forks source link

NavigationBar Search Function #34

Closed Th1nkK1D closed 1 year ago

Th1nkK1D commented 1 year ago

image

View Figma file

Depended on

Starting point

napatswift commented 1 year ago

I want to work on this issue kub ðŸ™‹ðŸ―â€â™‚ïļ

napatswift commented 1 year ago

@Th1nkK1D I have a question kub. When searching documents (or items), does the search require an exact match of all the query terms, or does it match documents that contain some but not necessarily all of the query terms?

For example, if I search for "āļāļ āļ‚āļ‚", will it match a document that contains "āļāļ" but not contains "āļ‚āļ‚"?

And if I search for "āļ™āļēāļ‡ āļ›āļīāļĒāļšāļļāļ•āļĢ", will it match a document with "āļ™āļēāļĒāļ›āļīāļĒāļšāļļāļ•āļĢ āļ™āļēāļĄāļŠāļāļļāļĨ" which contains the name "āļ›āļīāļĒāļšāļļāļ•āļĢ" but not "āļ™āļēāļ‡"?

Th1nkK1D commented 1 year ago

@Th1nkK1D I have a question kub. When searching documents (or items), does the search require an exact match of all the query terms, or does it match documents that contain some but not necessarily all of the query terms?

For example, if I search for "āļāļ āļ‚āļ‚", will it match a document that contains "āļāļ" but not contains "āļ‚āļ‚"?

And if I search for "āļ™āļēāļ‡ āļ›āļīāļĒāļšāļļāļ•āļĢ", will it match a document with "āļ™āļēāļĒāļ›āļīāļĒāļšāļļāļ•āļĢ āļ™āļēāļĄāļŠāļāļļāļĨ" which contains the name "āļ›āļīāļĒāļšāļļāļ•āļĢ" but not "āļ™āļēāļ‡"?

Will it be too complicated to put the exact match on the top, then if the exact match is less than the limit, we add the result that contains some keywords?

napatswift commented 1 year ago

It's not complicated but I think it will be more expensive than throwing out documents that don't contain certain query keywords (learned from yourcandidates).

But I'll go with the approach that doesn't require all queries first. Thanks kub 🙏 .

Th1nkK1D commented 1 year ago

Merged #39