lucenenet icon indicating copy to clipboard operation
lucenenet copied to clipboard

How I can apply the Strict Search and the Fuzzy Search in Lucene.NET

Open ahmadmdabit opened this issue 2 years ago • 1 comments

Hello, I have to make search queries in two modes, one is the strict mode: which it should result to just the words or phrases I have searched for. And other mode is the fuzzy mode: which it should result to the words or phrases I have searched for with some range of fuzzy like (Ipsum, aIpsum, Ipsuma, aIpsuma). Note: I have tried many ways but not actually succeeded :( , in many times the strict and fuzzy results the same results... and the strict some times works as fuzzy also...

This is my gist of the LuceneIndexer

Ex:

Indexed Texts: Text (1): What is Lorem Ipsum ? Lorem Ipsum is simply dummy text of the printing and typesetting industry. Lorem Ipsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book..

Text (2): What is Lorem Ipsuma ? Lorem Ipsuma is simply dummy text of the printing and typesetting industry. Lorem Ipsuma has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book..

Text (3): What is Lorem aIpsum ? Lorem aIpsum is simply dummy text of the printing and typesetting industry. Lorem aIpsum has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book..

Text (4): What is Lorem aIpsuma ? Lorem aIpsuma is simply dummy text of the printing and typesetting industry. Lorem aIpsuma has been the industry's standard dummy text ever since the 1500s, when an unknown printer took a galley of type and scrambled it to make a type specimen book..

Search Term: Ipsum

Search Mode: Strict Results:

  • Text (1)

Search Mode: Fuzzy Results:

  • Text (1)
  • Text (2)
  • Text (3)
  • Text (4)

Best Regards...

ahmadmdabit avatar May 18 '22 14:05 ahmadmdabit

Since this is a general question on how to use Lucene.NET rather then an issue it would be better to post this question on StackOverflow with lucene and lucene.net tag. That way it will be visible to the broader Lucene and Lucene.NET community and will be easier to find in the future by other users that may have a similar question.

rclabo avatar May 18 '22 14:05 rclabo