Question

I new to lucene, and i noticed something annoying :

In my search bar,

  • if I type "USA" : return all the matches -> OK.
  • If I type "Developper" : return all the matches -> OK

BUT,

-if i type "USA Developper", it'll not return me all the developper in the USA.

It'll return me some developper in UK, DE, FR + Developpers, Stars, Engineers in USA

How to fix that please ?

Was it helpful?

Solution

You need to set default search operator as AND. (Not sure how you do it in php.)

Or in your current framework, if you search for +developer +usa (ie prefix a + before each term) it will return you developers in USA.

Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top