matteodem / meteor-easy-search

Easy-to-use search for Meteor with Blaze Components
MIT License
437 stars 68 forks source link

Easy-search doesnt perform searches with case insensitive and different order of input text #471

Closed tinchox5 closed 8 years ago

tinchox5 commented 8 years ago

Hi, first of all, easy-search its awesome! I have two doubts relates to search values.

  1. With 2.0 version I found that it isn't perform case insensitive searches.
  2. Also, If I try to search a name, for instance John Doo, only retrieve results if I put the name in the correct order. I mean it works If I put John Doe, but not If I put Doe John.

Do you have any suggestions to solve these problems?

Thank you!

matteodem commented 8 years ago

Hello there

  1. It should be case insensitive https://github.com/matteodem/meteor-easy-search/blob/master/packages/easysearch:core/lib/engines/mongo-db.js#L47 (as in v1)
  2. Yes, you can change that by either using the MongoTextIndex engine or a more mature approach with ElasticSearch.
tinchox5 commented 8 years ago

Thank you for your answer. You are right easy-search is case insensitive in general, but since I'm working with spanish language I have accents, for example "María". In those cases if I wrote "maria" (without accent), the search doesn´t contemplate "María" with accent. Is there a way to solve that?

On the other hand, I will try others engines.

Thank you again!!

Martin

2016-03-23 6:02 GMT-04:00 Matteo De Micheli notifications@github.com:

Hello there

1.

It should be case insensitive https://github.com/matteodem/meteor-easy-search/blob/master/packages/easysearch:core/lib/engines/mongo-db.js#L47 (as in v1) 2.

Yes, you can change that by either using the MongoTextIndex engine or a more mature approach with ElasticSearch.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/matteodem/meteor-easy-search/issues/471#issuecomment-200276730

matteodem commented 8 years ago

The explanation to your second point might be what you want. I know that mongo text indexes analyze text so that might be what you're searchin for.

tinchox5 commented 8 years ago

Yes it's correct. I'm trying to use others engines that maybe solve that. May be not with MongoTextIndex because full the insensitive case is applied with MondoDB 3.2 and Meteor still uses Mongo2.6.

2016-03-23 13:25 GMT-04:00 Matteo De Micheli notifications@github.com:

The explanation to your second point might be what you want. I know that mongo text indexes analyze text so that might be what you're searchin for.

— You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub https://github.com/matteodem/meteor-easy-search/issues/471#issuecomment-200451442