elasticsearch - JsonParseException Unexpected character (':') (for unquoted name) or double-quote (for quoted) to start field name -
jsonparseexception: unexpected character (':' (code 58)): expecting either valid name character (for unquoted name) or double-quote (for quoted) start field name
my mapping structure
{ "patientinfo": { "properties": { "address": { "type": "nested", "properties": { "patient_current_address": { "type": "string" }, "patient_old_address": { "type": "string" }, "patient_origin_address": { "type": "string" } } } } } }
the code build bulk request looks this:
bulkrequestbuilder bulkrequest = client.preparebulk(); xcontentbuilder xb = xcontentfactory.jsonbuilder().startobject(); xb.startobject(); xb.field("globalid","196ad302157add3ad63cd1154e968dfa"); xb.field("date_of_birth", new date()); xb.field("last_name","trying out rehman"); xb.field("id", "7"); xb.field("first_name", "anees"); xb.startarray("address"); xb.startobject(); xb.field("patient_origin_address","origin"); xb.field("patient_current_address","current"); xb.field("patient_old_address", "old"); xb.endobject(); xb.endarray(); xb.endobject(); bulkrequest .add(client .prepareindex(index_name, index_type, "1") .setsource(xb));
my question how can deal date field inside :
querybuilder qbquery= fuzzylikethisquery("first_name","last_name","date_of_birth") .liketext("anis") .liketext("shahver") .liketext("1985-05-15")
more_like_this doesn't support binary/numeric fields: [date_of_birth]]
Comments
Post a Comment