Elasticsearch-MySQL-River icon indicating copy to clipboard operation
Elasticsearch-MySQL-River copied to clipboard

Q: it is posible map field_json as document in ES MySql R

Open agborkowski opened this issue 12 years ago • 1 comments

i have table

id, name, data_json
1, Endi, {"data":[{"language_id":"1","level":"1"},{"language_id":"1","level":"1"}]}

it is posible map data_json to ES document like

{
id: 1
name: data_json
data: [{language_id:1, level:1} ...]
}

agborkowski avatar Nov 07 '13 12:11 agborkowski

Hi,

I'm not sure what you're asking. The data you're extracting depends on you SQL query. If you have a field, that contains a JSON string, then yes your data can look like that. If you're trying to get a table relation mapped like this, then no, that is not built in.

An alternative might be for you to use the _parent field in ElasticSearch to emulate simple 1:n relations.

Maybe this will be a feature for the future, but for now I don't see a simple way to implement that functionality. That in combination with the limited time I have available right now, I'm afraid you will have to find another solution.

mallocator avatar Nov 07 '13 18:11 mallocator