0
votes

I want to use elasticsearch on my backend and I have few questions:

  1. My DB contains semi-structured data of products, i.e. each product may have different attributes inside it. I want to be able to search a text on most of the fields and also search a text on one specific field. What is the recommended way to store the document in ES ? to store all text in on field (maybe using _all feature) or leave it in different fields. My concern of different fields is that I might have a lot of indexes (because I have many different product attributes)

  2. I'm using couchbase as my main DB. What is the recommended way to move the documents from it to ES, assuming I need to make some modifications on the document ? To update the index from my code explicitly or use external tool ?

10x,

1
Please consider splitting up your questions in two posts, you won't not be able to mark several correct answers.Kristaps Karlsons
There is a transport couchbase plugin to ES that replicates data automatically. github.com/couchbaselabs/elasticsearch-transport-couchbase Also listen to @KristapsKarlsons :)scalabilitysolved

1 Answers

1
votes

It depends on how many docs you are indexing at a time. If the number of docs are like >2million. Then it's better to store everything in one field , which will save time while indexing.

If the docs indexed are very less, then index them field by field and then search on _all field. This will give a clear view on the data and will be really helpful for what to display and what not to display.