infinilabs / crawler

🕷️ An easy-to-use spider written in Golang. (previous named GOPA.)
Other
305 stars 82 forks source link

[Question] What's the best way to do Elasticsearch customizations? #49

Closed develagasca closed 8 months ago

develagasca commented 4 years ago

Hi. Trying out GOPA and wondering what the best way of customizing the Elasticsearch (ES) index is. For now, I want to add a custom analyzer to handle synonyms in ES but AFAIK adding a custom analyzer needs to be done on ES index creation.

As far as I understand, running the seed <URL> command in the admin page creates the ES indices on run-time.

I don't know how to code in Go so reading the code is challenging but perhaps you can point me to where (or how) best to do an ES customization like this? Or if it's even possible?

Thanks.

medcl commented 4 years ago

Hi, @develagasca , you can manually create the gopa-* index, with you pre-defined mapping, just keep the field name align with gopa's generated one.