1

I want to create a global search using node.js and contentful cms. I have to create one api for list which I will get on typing the text. When I type It will give me suggestion list. So After clicking any suggestion It give me link to redirect to specific page.

What I know is to get all contentful entries but I want to know how to filter it specifically for particular text and get result with title and link. So on click of title it will able to redirect to specific page.

Maulik Patel
  • 717
  • 1
  • 10
  • 22
  • Question: "in what format gives contentful the entries?" – Edwin Apr 26 '19 at 09:08
  • I am getting all the content in Json format with content type , sys and much more. Its a big. I want the final result in the list of title and page link. – Maulik Patel Apr 26 '19 at 09:12
  • Then I assume you want to iterate over json. Have you looked at this post? https://stackoverflow.com/questions/1078118/how-do-i-iterate-over-a-json-structure – Edwin Apr 26 '19 at 09:21
  • No I am not looking for it. This way is the my final solution if I will not find any other solution. But I am assuming there should be some api or methods in contentful which can provide the my output with less operation at coding side. – Maulik Patel Apr 26 '19 at 09:24
  • 1
    Have you considered using a 3rd party searching service like Algolia? https://www.algolia.com/ – Gordon Burgett Apr 26 '19 at 12:43
  • No for now I don't want to use algolia or solr search – Maulik Patel Apr 30 '19 at 05:30

0 Answers0