I am trying elasticsearch. It uses a query language based on json.
There are many examples on its tutorial, like:
And in the jelasticsearch example, these queries are made like this:
Is there an easy way to turn json into b4j object?
There are many examples on its tutorial, like:
B4X:
GET /bank/_search
{
"query": {
"bool": {
"should": [
{ "match": { "address": "mill" } },
{ "match": { "address": "lane" } }
]
}
}
}
And in the jelasticsearch example, these queries are made like this:
B4X:
Dim Highlighter As Map = CreateMap( _
"pre_tags": Array("<b>"), "post_tags": Array("</b>"), _
"fields": CreateMap(field: CreateMap()))
esres = Main.esclient.Search("documents", "txt", _
CreateMap("query": Query, _
"from":from, _
"highlight": Highlighter, _
"_source": "title"))
Is there an easy way to turn json into b4j object?