Raistlfiren/elastic

Questions on Elasticsearch with Bolt

xiaohutai opened this issue ยท 2 comments

Hi,

Just starting out with some Elasticsearch experiments. Here are some additional notes/question so that others can see.

1. Compatibility with 7.x

(Note: never had experience with Elasticsearch before, so I'm not 100% sure)

This extension doesn't work for me with Elasticsearch 7.1.0, it might be because of Removal of Mapping Types in the new version. It's possible to add a include_type_name to make it work like Elasticsearch 6.x. Also I believe default_index is deprecated in the new version.

Any plans on further supporting Elasticsearch 7.x?
(No need to fix it for me as I'm attempting a different approach that's quite difficult to solve in a generic way).

2. Indexing repeaters and blocks

Does this extension also index repeaters and blocks?

I generally feel this is quite tedious to fix. Especially if you do stuff like selecting multiple records that are viewless/non-searchable. But that content is shown on the record. I feel you'll end up with so much recursion/nesting that's it not a feasible solution anyways.

Because of this, my solution is to scrape the page, then strip of all the HTML and content that is duplicated on all other pages (e.g. header, menu, footer).

What are your thoughts on this?

@xiaohutai -

  1. Compatibility with 7.x
    At this time, I am not looking at supporting the latest version. I probably should, but we are currently to heavily coupled with version 2.4.6 on the server. There are a lot of changes between 2.4.6 and 7.x, as you can already see. The extension would probably need to be tagged/branched out for different Elasticsearch versions.

  2. Indexing repeaters and blocks
    No, it is not parsing out repeaters and blocks. You can see my code on how I handled content here - https://github.com/Raistlfiren/elastic/blob/master/src/Service/ElasticService.php#L243
    I do believe it is doable by modifying the existing code, and creating your own parser for repeaters/blocks. You would probably also need to modify the method loadContent as well, because it looks like I duplicated some of the same code. In essence, I get the content types metadata and parse out the data based upon the type - similar to the JSONAPI.

I hope that helps @xiaohutai.
Thanks.

@Raistlfiren That clears things up. Thanks for the answers! ๐Ÿ‘