I want to integrate Elastic search in Magento EE 2.1.2. I have installed elastic search instance and did configuration in Magento Admin. When I click on TEST CONNECTION button in Admin it says Successful! Test Again?
I want to know how Elasticsearch processes the search request. I want to check the search query on elascticsearch server.
When I hit my elastic search from browser I get this result:
name "My First Node"
cluster_name "mycluster1"
version
number "2.3.1"
build_hash "bd980929010aef404e7cb0843e61d0665269fc39"
build_timestamp "2016-04-04T12:25:05Z"
build_snapshot false
lucene_version "5.5.0"
tagline "You Know, for Search"
Best Answer
You can get details about your Elasticsearch indices through a GET request (curl for example, or straight from your browser). Assuming your port is set to the default
9200
, you can do this to get your indices:http://localhost:9200/_cat/indices?v
Here you will see a list of indices that Magento 2 is using, in our case it is named "magento2_product_1_v2".
You can they do a search query on this index to test if your data is present (the
pretty
param just means the output should be displayed in a readable format instead of raw JSON):http://localhost:9200/magento2_product_2_v2/_search?pretty=true&q=[QUERY]
To view your entire index you can use:
http://localhost:9200/magento2_product_2_v2/_search?pretty=true&q=*
More info here: https://www.elastic.co/guide/en/elasticsearch/reference/2.3/_exploring_your_cluster.html