I am trying to build a better autocomplete feature for my website. I want to use Hibernate Search for this but as far as I experimented it only finds full words for me.
So, my question: is it possible to search for some characters only ?
eg. user types 3 letters and using hibernate search to show him all words of my db objects which contains those 3 letter?
PS. right now I am using a “like” query for this…but my db grown a lot and I want also to extend the search functionality over another tables…
You could index the field using an NGramFilter as suggested here. For best results you should use the EdgeNgramFilter from Apache Solr that creates ngrams from the beginning edge of a term and can be used in hibernate search as well.