Elasticsearch-Php Mapping Issue

Hi,

I have mysql data.

I index it. But it was not true.
For example,
I have"sektor" field in mysql database. It was indexed with php code:

$sektor=$ihale['sektor'];
$sektor=trim($sektor, ',');
$sektor_array=explode(',', $sektor);
$sektor_array=array_unique($sektor_array);

$myTypeMapping['properties']['sektor']['type']='nested';
$myTypeMapping['properties']['sektor']['index']='analyzed';

My index name: ihaleler
My type name: ihale
I tested on sense editor:

GET /ihaleler/ihale/_mapping?pretty

result:

   "sektor": {
            "type": "string"
          }

What is the problem?

May be you have already an existing mapping?
Or may be the way you put the mapping is wrong?