Bit confused.
I'm using jackson to parse JSON strings into maps that will then be accepted in elasticsearch.
That works fine.
However due to the JSON specifications, all integers and other formats need to be sent through as a string - aka - "key":"value". But then elasticSearch sees them as strings, not numbers. Which makes totaling values like user ratings not possible when it should be trivial.
How can I use the JSON format to input numbers/integers into elasticsearch?
Is there a way around this?
try (BufferedReader br = new BufferedReader(new FileReader(addedDir))){ for (String line; (line = br.readLine())!= null;) { System.out.println("#" + this.counter + " processing " + line); this.storeMap(this.convertToMap(line)); this.counter++; } }hm = mapper.readValue(json, new TypeReference<HashMap<String, String>>() {});where i should have usedhm = mapper.readValue(json, new TypeReference<HashMap<String, Object>>() {});- chaging the 2nd string inthe typerference to ype object.