kerighan / eldar

Boolean text search in Python
MIT License
44 stars 7 forks source link

Multiword Search Terms #12

Closed EssbieWGT closed 2 years ago

EssbieWGT commented 2 years ago

Thanks for putting this tool out there! Discovered this last week, and it's be a real life-changer for me!

Sorry if I missed this poking through the docs, but I was wondering if there's anyway to implement multi-word search terms with this? As an example. Say I wanted to find "United States of America" in my data.

z = Query('(United States of America)') z("United States of America") False

I figured the issue was the tokenizer, so I tried underlines between the words by came up with the same result.

Appreciate your help! Thanks!

EssbieWGT commented 2 years ago

Never mind! I misunderstood the effect of the setting match_word=False. I thought it was going to add in a lot of partial matches, but that doesn't seem to be the case.

Think my problem is solved. Thanks!