Join us

Auto-Complete Suggestions Using OpenSearch

Auto-Complete Suggestions Using OpenSearch

This blog post will walk you through the create an feature in the application that can help your users to save time to find anything. I've tried to make this simple so that everyone can see through this.

When I was trying to implement the Auto-Complete suggestion in our product, I faced lots of difficulties to make it a good feature. Using OpenSearch was our constrain as we are using OpenSearch as our index database, so I had to use OpenSearch to solve the problem, first I used normal match query to match the text but the results was very poor, as I was getting results that should not be there, then I dig and find wildcard and match_phrase_prefix queries, but both were having problems when I was using longer texts to search which has spaces. So these are not working with spaces in search terms. Then after doing lot of research, I find out that OpenSearch also maintains the keyword mappings that can be used to search the exact term without any tokens and analysers, so I thought to use wildcard query with keyword mapping fields, and it works like a wow.

I hope this will help you guys to solve the problem.


Only registered users can post comments. Please, login or signup.

Start blogging about your favorite technologies, reach more readers and earn rewards!

Join other developers and claim your FAUN account now!

Avatar

Hemendra Chaudhary

@hemendranahar
@ChennaiIPL Forever💛 #Yellove
User Popularity
9

Influence

998

Total Hits

0

Posts