Coder Social home page Coder Social logo

Comments (5)

costin avatar costin commented on September 23, 2024

Hmm - I think there's a problem with your data set. You're using a map but have the same key declared twice which is actually illegal (it's not a valid JSON object).
What happens is that the JSON Object gets converted to a map in which the entries are added one by one but since the key is the same, each entry causes an update instead of insert.

from elasticsearch-hadoop.

abhishek376 avatar abhishek376 commented on September 23, 2024

Costin,

Thanks that makes sense.

I will hard code map from hive map type [{1 : 3}, {4: 5}] to ES Query String
[
{
"mapid": "1",
"value": "3"
},
{
"mapid": "4",
"value": "5"
}
]

in BufferedRestClient.

Thanks for the support.

from elasticsearch-hadoop.

costin avatar costin commented on September 23, 2024

Instead of hard-coding why not apply some transformation to the data, such as converting the map to a bag/list? Note that a wrong JSON implies the data might be properly represented in ES which can trigger issues when doing queries.
Note that while functionally we could support a map with duplicates (using identity instead of the hash code), the problem of duplicates still persist and is likely to cause issues later down the road.

from elasticsearch-hadoop.

abhishek376 avatar abhishek376 commented on September 23, 2024

Makes sense thanks costin.

from elasticsearch-hadoop.

costin avatar costin commented on September 23, 2024

@abhishek376 I'm closing this issue as the problem seems to be fixed. Note that mapping is part of the roadmap to cope with the different data structures however it will take a bit until I get to it.
Watch this project for future updates.

from elasticsearch-hadoop.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.