Hi,
We have GET API which can be used to fetch data on specific {index}/{type}{id}, which works fine.
I have xml data which is accepted through http input in logstash shipper. There is one field externalid in xml which is stored under custom field "externalid" in ES.
I need some way by which I should be able to GET this record with the help for field "extermalid" and not id.
id is some random number which user doesn't even know. But he knows external id and he wants to search on the basis of external id from restclient (firefox)
So the url he expect is http:host:9200/myIndex/myType/{externalid} but its not working. It always check the value of {externalid} under the default field "_id". How can I change this behaviour?
I have created externalid field in xml filter as below.
xpath => [
"/ns2:logEntry/event/@ts", "eventLogTime",
"/ns2:logEntry/event/extid/text()", "externalid"
]
Please guide on this. Can I somehow stored extid under field _id ? How can I do that? I tried giving _id in above code in place of externalid, but it didnt worked.
br,
Sunil