amitaibu / ihp-cms-starter

5 stars 2 forks source link

Add Search with elasticsearch and facets #57

Open amitaibu opened 3 months ago

amitaibu commented 3 months ago

50

amitaibu commented 3 months ago

I get an error when running locally. I have a case where using Overmind causes devenv up to exit, vs. using the default, which still has ES failing but doesn't kill the process.

Overmind Default
image image
amitaibu commented 3 months ago

Update: We are now able to index the title and body of News

For now, we can see the results in http://localhost:9200/news/_search?pretty

image

amitaibu commented 3 months ago

To test:

  1. Go to http://localhost:8000/News, and add News
  2. Visit http://localhost:9200/news/_search?pretty
  3. Next is to understand how to parse the result
amitaibu commented 3 months ago

Took me more time than I'm willing to admit, but I was able to get the News ID from Elastic :sweat_smile:

https://github.com/amitaibu/ihp-cms-starter/blob/36ea162b9d1adc051442371280765b4082134454/Application/Helper/Elasticsearch.hs#L56-L67