I hate to not answer the question and recommend a 3rd party service, but take a look at Algolia. It's really a great service and might have the features you need. Hashnode uses it and implementation was super easy for me in AJS 1.x
Another option is ElasticSearch if you want to run the server yourself.