Mysql data mapping for Elasticseach

It shows that the input value was tokenized properly as expeced from an edge ngram tokenizer. Again, this is good for the index and searching.

I don't think using "nested" here helps at all. For more info on how to use nested object, see the link below

https://www.elastic.co/guide/en/elasticsearch/guide/current/nested-objects.html

If your goal is to modify the value (ie. YDDD) to an array of ["Y", "YD"] then index the value, I think the data is indexed in one of the formats below

  • { "islem": ["Y", "YD"] }
  • {"islem": [ {"value": "Y"}, {"value": "YD"}] } <-- nested mapping can be used here

I tried nested mapping but it dosen't work. Because my mysql data is not appropriate for nested. So I did string mapping . It work true. Thank you so much.
I got my last one more question. I want to run a query like "starts with". So I use edge n gram.

PUT /ihaleler
    {
        "settings" : {
            "analysis" : {
                "analyzer" : {
                    "my_edge_ngram_analyzer" : {
                        "tokenizer" : "my_edge_ngram_tokenizer"
                    }
                },
                "tokenizer" : {
                    "my_edge_ngram_tokenizer" : {
                        "type" : "edgeNGram",
                        "min_gram" : "1",
                        "max_gram" : "2",
                        "token_chars": [ "letter" ]
                    }}}}}

and my filter.php:

unset($filter_islem);
    if(isset($_GET['islem'])){
        $filter_islem['match_phrase']['islem']=$_GET['islem'];
    }
if(is_array($filter_islem)){
    $searchParams['body']['query']['bool']['must']['and'][]=$filter_islem;

}

- My first query:

http://localhost:9200/ihaleler/_search?q=islem:*D

** results:**

found=280 record

-My Other query:
http://10.0.2.15:8080/filter.php?islem=*D

result:

no result. 
found=0 record

What can I do for correct operation of the other query?

use GET method and try for it..