cozydev-pink / protosearch

prototype search library in pure scala
https://cozydev-pink.github.io/protosearch/
Apache License 2.0
9 stars 6 forks source link

Distinguish between "TextField" and "KeywordField" #16

Open valencik opened 1 year ago

valencik commented 1 year ago

I was thinking TextField is analyzed, KeywordField is not.

KeywordField support in particular could be useful for dealing with multiple word names while we're still missing phrase search. Consider authors in the Books example, it would be nice to search author:"Dr. Suess" and have that work as expected.

Lucene Docs:

TextField - tokenized StringField - not tokenized

Apparently Lucene didn't have a KeywordField until recently. KeywordField - no tokenization, but sortable?

I don't really understand yet why additional work is required to sort and whether or not that makes sense for our index.