{"id":99,"date":"2019-10-07T11:53:29","date_gmt":"2019-10-07T11:53:29","guid":{"rendered":"https:\/\/docs.theironnetwork.org\/embryo\/?page_id=99"},"modified":"2019-11-13T08:49:24","modified_gmt":"2019-11-13T08:49:24","slug":"instant-search-with-algolia","status":"publish","type":"page","link":"https:\/\/docs.theironnetwork.org\/embryo\/instant-search-with-algolia\/","title":{"rendered":"Instant Search With Algolia"},"content":{"rendered":"\n<p>We have used shop page example to integrate instant search. There is a lot of other pre-made demo examples on the<a rel=\"noreferrer noopener\" href=\"https:\/\/community.algolia.com\/react-instantsearch\/examples\/Demos.html\" target=\"_blank\"> official doc<\/a>. In Embryo-ReactJS you can see the demo on this url <a href=\"https:\/\/embryo-react.theironnetwork.org\/shop\" target=\"_blank\" rel=\"noreferrer noopener\" aria-label=\" (opens in a new tab)\">https:\/\/embryo-react.theironnetwork.org\/shop<\/a>.\u200c<\/p>\n\n\n\n<p><strong>Getting Started:<\/strong>\u200c<\/p>\n\n\n\n<p><strong>Step 1:<\/strong> Create an account on <a href=\"https:\/\/www.algolia.com\/users\/sign_up\" target=\"_blank\" rel=\"noreferrer noopener\">Algolia<\/a>. \u200c<\/p>\n\n\n\n<p><strong>Step 2:<\/strong> After Signup you will get the 14 days trial and you will update the plan according to your requirements. <strong>Reference Link : <\/strong><a href=\"https:\/\/www.algolia.com\/pricing\" target=\"_blank\" rel=\"noreferrer noopener\">https:\/\/www.algolia.com\/pricing<\/a>\u200b\u200c<\/p>\n\n\n\n<p><strong>Step 3:<\/strong> Create an Index on Algolia Dashboard by clicking on the indices tab from the left menu and then clicking on create index button. Please check the screenshot below for reference:<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" width=\"1024\" height=\"380\" src=\"https:\/\/docs.theironnetwork.org\/embryo\/wp-content\/uploads\/sites\/7\/2019\/10\/algolia-1024x380.png\" alt=\"\" class=\"wp-image-100\" srcset=\"https:\/\/docs.theironnetwork.org\/embryo\/wp-content\/uploads\/sites\/7\/2019\/10\/algolia-1024x380.png 1024w, https:\/\/docs.theironnetwork.org\/embryo\/wp-content\/uploads\/sites\/7\/2019\/10\/algolia-300x111.png 300w, https:\/\/docs.theironnetwork.org\/embryo\/wp-content\/uploads\/sites\/7\/2019\/10\/algolia-768x285.png 768w, https:\/\/docs.theironnetwork.org\/embryo\/wp-content\/uploads\/sites\/7\/2019\/10\/algolia.png 1281w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>Step 4:<\/strong> Add your products fields with values under the newly created Index.<\/p>\n\n\n\n<figure class=\"wp-block-image\"><img loading=\"lazy\" width=\"1024\" height=\"432\" src=\"https:\/\/docs.theironnetwork.org\/embryo\/wp-content\/uploads\/sites\/7\/2019\/10\/algolia2-1024x432.png\" alt=\"\" class=\"wp-image-101\" srcset=\"https:\/\/docs.theironnetwork.org\/embryo\/wp-content\/uploads\/sites\/7\/2019\/10\/algolia2-1024x432.png 1024w, https:\/\/docs.theironnetwork.org\/embryo\/wp-content\/uploads\/sites\/7\/2019\/10\/algolia2-300x126.png 300w, https:\/\/docs.theironnetwork.org\/embryo\/wp-content\/uploads\/sites\/7\/2019\/10\/algolia2-768x324.png 768w, https:\/\/docs.theironnetwork.org\/embryo\/wp-content\/uploads\/sites\/7\/2019\/10\/algolia2.png 1302w\" sizes=\"(max-width: 1024px) 100vw, 1024px\" \/><\/figure>\n\n\n\n<p><strong>Step 5: <\/strong>You need to change your app name in the manage applications page. Just open the given url, edit the app and give your app a name. This app name is used in the template.<\/p>\n\n\n\n<div class=\"custom-sec-wrap mb-4\">\n\t<a href=\"https:\/\/www.algolia.com\/manage\/applications\" class=\"link-wrap\">\n\t\t<div class=\"content-wrap\">\n\t\t\t<h6>Sign in<\/h6>\n\t\t\t<p style=\"font-weight:400;\">Algolia&#8217;s Search API makes it easy to deliver a great search experience in your apps &amp; websites. Algolia Search provides hosted full-text, numerical, faceted and geolocalized search.<\/p>\n\t\t\t<small>www.algolia.com<\/small>\n\t\t<\/div>\n\t\t<div style=\"background-image:url('https:\/\/www.algolia.com\/assets\/social-media-covers\/header-big-faca54f9889303ced158616eb85f8010.jpg');\" class=\"ironthm-img-item\"><\/div>\n\t<\/a>\n<\/div>\n\n\n\n<p><strong>Step 6:<\/strong> Now open the API keys tab from the left menu and copy the <code>Search-Only API Key<\/code> , now open the <code>src-&gt;constants-&gt;AppConfig.js<\/code>file from the template and paste the credentials in the <code>apiKey<\/code>, <code>indexName<\/code> with the index you have created &amp; <code>appId<\/code> with the app name you have given to your app in step 5.<\/p>\n\n\n\n<pre class=\"wp-block-preformatted\">\/**<br> * App Constants<br> *\/<br> <br>export default {<br>   ...<br> <br>   \/\/algolia configuration<br>   algoliaConfig: {<br>        appId: \"&lt;app name&gt;\" \/\/ created in step 5<br>        apiKey: \"&lt;api key&gt;\" \/\/ copied in step 6<br>        indexName: \"&lt;index name&gt;\" \/\/ created in step 3<br>     },<br> <br>    ...<br>  } <\/pre>\n\n\n\n<p>To get more information about algolia instant search check the official <a href=\"https:\/\/community.algolia.com\/react-instantsearch\/\" target=\"_blank\" rel=\"noreferrer noopener\">document<\/a>.<\/p>\n<div class=\"pld-like-dislike-wrap pld-template-1\">\n    <div class=\"pld-like-wrap  pld-common-wrap\">\n    <a href=\"javascript:void(0);\" class=\"pld-like-trigger pld-like-dislike-trigger \" title=\"\" data-post-id=\"99\" data-trigger-type=\"like\" data-restriction=\"cookie\" data-ip-check=\"0\" data-user-check=\"1\">\n                        <i class=\"fas fa-thumbs-up\"><\/i>\n                    <\/a>\n    <span class=\"pld-like-count-wrap pld-count-wrap\">    <\/span>\n<\/div><div class=\"pld-dislike-wrap  pld-common-wrap\">\n    <a href=\"javascript:void(0);\" class=\"pld-dislike-trigger pld-like-dislike-trigger \" title=\"\" data-post-id=\"99\" data-trigger-type=\"dislike\" data-ip-check=\"0\" data-restriction=\"cookie\" data-user-check=\"1\">\n                        <i class=\"fas fa-thumbs-down\"><\/i>\n                    <\/a>\n    <span class=\"pld-dislike-count-wrap pld-count-wrap\"><\/span>\n<\/div><\/div>\n\n","protected":false},"excerpt":{"rendered":"<p>We have used shop page example to integrate instant search. There is a lot of other pre-made demo examples on the official doc. In Embryo-ReactJS you can see the demo on this url https:\/\/embryo-react.theironnetwork.org\/shop.\u200c Getting Started:\u200c Step 1: Create an account on Algolia. \u200c Step 2: After Signup you will get the 14 days trial [&hellip;]<\/p>\n","protected":false},"author":1,"featured_media":0,"parent":0,"menu_order":17,"comment_status":"closed","ping_status":"closed","template":"","meta":[],"_links":{"self":[{"href":"https:\/\/docs.theironnetwork.org\/embryo\/wp-json\/wp\/v2\/pages\/99"}],"collection":[{"href":"https:\/\/docs.theironnetwork.org\/embryo\/wp-json\/wp\/v2\/pages"}],"about":[{"href":"https:\/\/docs.theironnetwork.org\/embryo\/wp-json\/wp\/v2\/types\/page"}],"author":[{"embeddable":true,"href":"https:\/\/docs.theironnetwork.org\/embryo\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"https:\/\/docs.theironnetwork.org\/embryo\/wp-json\/wp\/v2\/comments?post=99"}],"version-history":[{"count":7,"href":"https:\/\/docs.theironnetwork.org\/embryo\/wp-json\/wp\/v2\/pages\/99\/revisions"}],"predecessor-version":[{"id":312,"href":"https:\/\/docs.theironnetwork.org\/embryo\/wp-json\/wp\/v2\/pages\/99\/revisions\/312"}],"wp:attachment":[{"href":"https:\/\/docs.theironnetwork.org\/embryo\/wp-json\/wp\/v2\/media?parent=99"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}