Search code examples
angularjsjsonelasticsearchsearch-suggestion

JSON Autocomplete source


I have been trying to source search suggestions for Elasticsearch to index via crawled data (using Nutch to crawl sites). I'm getting mixed results and after days of testing and tweaking... I'm asking if there might be a better way to go and source suggestions data for ES to index.

I'm using Angular UI Bootstrap typeahead to implement this and really like how you can have custom templates for the items and the dropdown - great stuff there. I've noticed that the last 2 examples there, for the custom templates, use a JSON source INSTEAD of $http or $q service.

Can you even customize the search suggestions and the dropdown if you DO NOT use a JSON source? OR is it better to just use a JSON source for suggestions initially?

I was even thinking of having Nutch crawl a JSON file to make indexing into ES easier...?


Solution

  • I actually wrote blog how I did autocomplete. So idea was that i had content and i want autocomple on that. That solution is not perfect on huge data set but it could be quick and nice solution on beginning