grossherr / elasticpress-autosuggest-endpoint

24 stars 9 forks source link

How to use it? #4

Closed robert1112 closed 6 years ago

robert1112 commented 6 years ago

Hi Thanks for contribute. I installed Elastic Search and Elastic Press on server and wordpress. Everything works fine. But I cannot get autosuggest working. Can you Kindly suggest step by step to get it working? Thank you so much.

carlalexander commented 6 years ago

The main issue is that the plugin just uses a default index value of index. This isn't the name that ElasticPress uses to create the index. So the elasticsearch library throws an index not found exception.

There's two ways to fix it. You need to manually edit the plugin to use the ep_get_index_name or manually put your index name. You can find the index name by doing on your server:

$ curl -X GET "localhost:9200/_cat/indices?v"
grossherr commented 6 years ago

@carlalexander described the issue perfectly. As he said at the referenced issue, it is more of a proof of concept, then a ready to use plugin.

Besides the first bullet point of the read me is: »Set your index«. Anyhow, hope you figured it out.