Hello,
i configured Elasticsearch cloud VM machine, i created index, simples types and mapping.
By using Kibana Dev-Tools console:
- I am able to build index data by using POST and PUT requests.
- Now i have to search text. I use query_string for manage different jokers. But when i search word that contains special characters (eg: @xxxx, !xxxx, xxxxé, *xxxx *), even if word exists in BD, i get empty hits.
I have tried to configure index settings with "Analyzer" but i did not get any solution and i have more gray areas.
Can somebody help me about that?
Here are requests examples:
1- all posts
GET test-search/serch_text/_search
{
}
"hits": {
"total": 11,
"max_score": 1,
"hits": [
{
"_index": "test-search",
"_type": "serch_text",
"_id": "ZXd1DGIBBx5VGSRKr7QL",
"_score": 1,
"_source": {
"text": "@funy"
}
},
{
"_index": "test-search",
"_type": "serch_text",
"_id": "aXdUE2IBBx5VGSRKGbTZ",
"_score": 1,
"_source": {
"text": "@fun "
}
},
{
"_index": "test-search",
"_type": "serch_text",
"_id": "Ynd1DGIBBx5VGSRKlrQs",
"_score": 1,
"_source": {
"text": "you have a & fun"
}
},
{
"_index": "test-search",
"_type": "serch_text",
"_id": "Znd1DGIBBx5VGSRKxLQW",
"_score": 1,
"_source": {
"text": "%fun "
}
},
{
"_index": "test-search",
"_type": "serch_text",
"_id": "bHdVE2IBBx5VGSRKlbSD",
"_score": 1,
"_source": {
"text": "I have a fun!"
}
}
2- not work
GET test-search/serch_text/_search
{
"query": {
"query_string": {
"query": "@fun"
}
}
}
{
"took": 2,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"skipped": 0,
"failed": 0
},
"hits": {
"total": 0,
"max_score": null,
"hits": []
}
}
3- not work
GET test-search/serch_text/_search
{
"query": {
"query_string": {
"query": "*I have a fun*"
}
}
}
{
"took": 2,
"timed_out": false,
"_shards": {
"total": 5,
"successful": 5,
"skipped": 0,
"failed": 0
},
"hits": {
"total": 0,
"max_score": null,
"hits": []
}
}
Thanks!