Enabling Fuzzy Search in C# .NET

Sdílet
Vložit
  • čas přidán 1. 07. 2024
  • Have you ever searched for a term misspelled and the search engine still gave you the right answers? How does it do that?
    In this session, I'm going to introduce you to a simple and quick way to implement a capability called fuzzy search - which enables your application to search for a pattern in your data instead of an exact match.
    Here's some useful links:
    Read about SOUNDEX in SQL Server here:
    learn.microsoft.com/en-us/sql...
    Learn about DbFunctions here:
    learn.microsoft.com/en-us/dot...
    Here's the code I used in this video:
    github.com/hassanhabib/FuzzyS...

Komentáře • 54

  • @anuraj.p
    @anuraj.p Před rokem +16

    Interestng. Two things I learned, 1) Soundex SQL statement 2) How to use DbFunction attribute. Thank you Hassan.

  • @mohammedelsuissey1745
    @mohammedelsuissey1745 Před rokem +6

    This video is saved to my library for years to come, plz don't remove it anytime soon

  • @akeemaweda1716
    @akeemaweda1716 Před rokem +1

    My co-developers need to see this.
    So helpful. Have seen it many times on Bing but haven't had a requirement in any of my project yet.
    Thanks for this hint.
    Hoping to see more of these hidden capabilities more often.

  • @emmanueladebiyi2109
    @emmanueladebiyi2109 Před 10 měsíci

    Great video here Hassan! Short and highly informative

  • @talkathiriify
    @talkathiriify Před rokem

    Excellent. Thank you very much Hassan.

  • @user-tb9dd4nv8h
    @user-tb9dd4nv8h Před 5 měsíci

    Very very good explanation. I liked!

  • @minimalist_zero
    @minimalist_zero Před rokem

    Second time i have learned from this channel, subscribed!

  • @CRBarchager
    @CRBarchager Před rokem

    Awesome video. Never knew about this feature!

  • @ThugLifeModafocah
    @ThugLifeModafocah Před rokem

    This is awesome... thank you. Your content is really good.

  • @Dragonet17
    @Dragonet17 Před 10 měsíci

    Very usefull topic. Simple and amazing solution. Thanks !

  • @CodeMonarch
    @CodeMonarch Před rokem

    Superb, thanks for sharing.

  • @tedchirvasiu
    @tedchirvasiu Před rokem +3

    Haw yousefool, thenk u HoShawn!

  • @AskFiqri
    @AskFiqri Před rokem

    Lovely. Thanks for this.

  • @fieryscorpion
    @fieryscorpion Před rokem

    Wow, just learned something new today!

  • @ahmed.adel3
    @ahmed.adel3 Před rokem

    Amazing as usual 👌

  • @OlimjonovOtabek
    @OlimjonovOtabek Před rokem

    Soo understandable thank you teacher Hassan Habib

  • @shawn301287
    @shawn301287 Před rokem

    Crazy!! Thank You again mate..

  • @TheZigsDk
    @TheZigsDk Před rokem

    First person I ever hit the bell for. Literal gold.

  • @carldaniel6510
    @carldaniel6510 Před rokem +4

    SOUNDEX can be useful, but it's a very crude "fuzzy search": It only looks at the first word of whatever is passed to it, and only the first few characters of that and gives good results only with English words. If you have a relatively short list of single words in English, it's not bad. For searching larger documents or multi-word phrases, it's almost useless. For better results, search for information on metaphone, double metaphone, metaphone 3, Levenshtein distance, Jaro-Winkler similarity, TfIdf ("term frequency, inverse document frequency) for starters.

    • @FebriantoSetiawan
      @FebriantoSetiawan Před rokem +1

      add Damerau-Levenshtein

    • @carlosalmeida2847
      @carlosalmeida2847 Před 8 měsíci

      @carldaniel6510 indeed, I was making some tests now with the SOUNDEX function (btw Hassan great tip totally unknown for me before watching the video), and indeed in my case is not working as I'm trying to match some codes and a lot of matches are found since the codes always starts with PP and then some 8 chars after that.
      I tried also work with the FuzzyString c# library that uses Levenshtein, Jaccard, Jaro-Winkler and others, but the problem is that the FuzzyString.ComparisonMetrics.ApproximatelyEquals cannot be directly translated to a linq to ef query. Anyone able to use some of those algos with EF*

  • @ahmadkelany
    @ahmadkelany Před rokem +4

    I have been using SQL Server almost daily for the past several years..
    It amazes me that there is much cool and useful things and hidden gems like this that I have never heard before!
    Thanks for the amazing content, please keep it up and show us more hidden treasures 💐💐

  • @ahmedanwer1767
    @ahmedanwer1767 Před rokem +2

    It will be great if you make a series about hidden gems of SQL or in particular SQL Server

  • @ahmedanwer1767
    @ahmedanwer1767 Před rokem

    Very informative 👏 and plz make more videos like this

  • @alegntayeyilma9564
    @alegntayeyilma9564 Před rokem

    Great! as per your last comment, i checked the documentation for postgresql and it has the exact same function. Besides there is an additional function difference(text, text) return int that measures the similarity (not the difference) between two text.

  • @mykhailokonontsev3132

    Great video, thanks

  • @herberthsu1495
    @herberthsu1495 Před rokem

    so helpful 🙏 thanks for sharing this content

  • @user-iz1yi2ik8o
    @user-iz1yi2ik8o Před rokem

    Very useful.👍

  • @mohamadhelaly4979
    @mohamadhelaly4979 Před rokem

    Thanx alooooooooot.
    You are awesome bro

  • @yeasinarafat2290
    @yeasinarafat2290 Před rokem

    Didn't know about the cool stuff!

  • @microtech2448
    @microtech2448 Před rokem +3

    Seems good to have this function. Can you please demonstrate full text search as elastic search may do. Thank you for this video.

  • @orafasistemas
    @orafasistemas Před rokem

    Nice!!!.... thank you!

  • @AthensDotNet
    @AthensDotNet Před rokem

    Thank you

  • @akshay_zz
    @akshay_zz Před rokem

    Subscribed.

  • @JtendraShahani
    @JtendraShahani Před rokem

    Awesome. I am new to .NET and C#. Can you please put such videos in a playlist. In case you already did that, then can you please share the link. Thank you so much. Your efforts are very helpful to me.

  • @panagakis79
    @panagakis79 Před rokem

    Great tip Hassan thank you! Can Soundex be applied with other languages?

    • @HassanHabib
      @HassanHabib  Před rokem +1

      If these languages can leverage ef or have their own mechanism

  • @tidianediallo6199
    @tidianediallo6199 Před rokem

    great!

  • @sommmen
    @sommmen Před rokem

    Any notes on performance and indexes and such?

  • @YaSiRaRaFaTdoTNet
    @YaSiRaRaFaTdoTNet Před rokem

    🙏

  • @IBNEKAYESH
    @IBNEKAYESH Před rokem

    Really is that exist? I never knew this keyword before. [Subscribed]

  • @ahmadkelany
    @ahmadkelany Před rokem

    Is there a function like SOUNDX that works with Arabic data?
    I tried using SOUNDX with Arabic names data but it doesn't work..
    Is there an alternative approach?

    • @HassanHabib
      @HassanHabib  Před rokem

      Hum, that's a good question. SOUNDEX relies on vowels which may or may not exist in other language. Certainly not in Arabic.
      Some guy a while back wrote something to map vowels - check this out:
      www.codeproject.com/articles/26880/arabic-soundex

    • @ahmadkelany
      @ahmadkelany Před rokem

      @@HassanHabib
      Thanks very much,
      I will check it out.

  • @FebriantoSetiawan
    @FebriantoSetiawan Před rokem

    Elasticsearch is way more scalable and popular

  • @KubilayBayraktar
    @KubilayBayraktar Před rokem

    Good one. But the thing is, it is not working for sentences.

  • @BeanCoffeeBean
    @BeanCoffeeBean Před rokem +1

    Love the idea ... still it's a capability of Sql Server, not C# .NET, ... for us folks who work with other DBs sadly useless :/

    • @HassanHabib
      @HassanHabib  Před rokem

      Yeah I had to mention that at the end - there might be other alternatives out there. Big question on performance and reliability.

  • @SergeyGorin
    @SergeyGorin Před rokem

    The video title is deceiving, since it's about an SQL Server function, not about a .Net feature

  • @Kingside88
    @Kingside88 Před rokem +2

    Great explanation, bad title. its not in C# but more in Entity Framework in combination with SQL Server.

  • @mbpoblet
    @mbpoblet Před rokem

    The title is quite misleading... this is about SQL Server and Entity Framework, not about C#...

  • @user-im3wz7sw5f
    @user-im3wz7sw5f Před rokem

    Thank you