hoelzro / tw-full-text-search

Full text search plugin for TiddlyWiki powered by lunr.js
https://hoelz.ro/files/fts.html
Other
25 stars 4 forks source link

And vs OR search #3

Closed diego898 closed 6 years ago

diego898 commented 6 years ago

How can I search for multiple terms? I didnt realize it was default OR. Should that be made clearer?

hoelzro commented 6 years ago

That's a good point - I don't know if there is a way to do an AND search. I'll have to look into lunr.js and get back to you!

hoelzro commented 6 years ago

@diego898 I was reading the source for lunr.js today, and it doesn't look like there's a way to AND, I'm afraid. There's an open issue on the lunr.js repo, though: https://github.com/olivernn/lunr.js/issues/264

diego898 commented 6 years ago

thanks Rob Ill check back up over there!

hoelzro commented 5 years ago

Hi @diego898 - I was looking through my notes on things to work on for this plugin, and I stumbled across AND searches and this issue. I don't know if you saw, but you can perform an AND query by prefixing each term with a + (for example, to look for "tea AND crumpets", you'd write "+tea +crumpets"). I'm thinking about actually making this the default behavior in a future release of the plugin to be in line with TiddlyWiki's built-in search.