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

Implementing Fuzzy Search with OData #1362

Open
starshinata opened this issue Nov 27, 2024 · 3 comments
Open

Implementing Fuzzy Search with OData #1362

starshinata opened this issue Nov 27, 2024 · 3 comments

Comments

@starshinata
Copy link

Hi everyone,

Our team is currently working on a project where the client requirement is to implement fuzzy search. However, we have noticed that OData does not support fuzzy search out of the box.

We would like to inquire if there is a recommended approach to achieve this functionality using OData.

We are looking at implementing a custom filter option such as: odata/profiles?$filter=fuzzy(FirstName, 'John') where we can provide a custom implementation for this filter, using a third-party library, in a way that integrates with OData.

However, we are open to other suggestions as well.

Could you please advise us on the best way to approach this? Any guidance, examples, or references to relevant documentation would be greatly appreciated.

Thank you for your assistance.

@julealgon
Copy link
Contributor

I believe the best extension point to add support for this in odata would be to use the built-in $search query. You can implement anything you want behind that operation.

I'd either go with that, or as a fallback I'd write a custom bound action on the entityset.

@starshinata
Copy link
Author

Thanks a lot for the help, @julealgon!

@Mhirji
Copy link

Mhirji commented Nov 27, 2024

@starshinata , based on the example you provided in terms of what you are trying to achieve, unless you require a percentage on the probability of the match, you could also use the "contains" operator. This would translate to a like in SQL.

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