Thanks for your reply.
Unfortunately i'm not involved in the all process but i can provide an example of the datas i try to fetch
As i said earlier we have that object containing string.
{
"sample_data": {
"mappings": {
"properties": {
"$id": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"title": {
"properties": {
"fr": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"nl": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
},
"poly": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
}
},
}
}
}
}
For example those datas
[
{
"_index": "sample_data",
"_type": "_doc",
"_id": "elem0",
"_version": 1,
"_score": 1.0,
"_source": {
"$id": "elem0"
"title": {
"fr": "test with fr",
"nl": "test with nl"
},
},
{
"_index": "sample_data",
"_type": "_doc",
"_id": "elem1",
"_version": 1,
"_score": 1.0,
"_source": {
"$id": "elem1"
"title": {
"fr": "test 2 with fr",
"nl": "test 2 with nl"
},
},
]
I tried various request but none works for what i want.
If I search with the string test with
i will have everything in the response but i only want the test with fr
element (elem0
) to be returned because the 2
is not in my request.
{
"query": {
"query_string": {
"query": "*test with*"
}
}
}
same problem if the query contain non finished word
{
"query": {
"query_string": {
"query": "*test wi*"
}
}
}