Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

type_mapping not effect #954

Open
hongjunsu opened this issue Apr 26, 2017 · 3 comments
Open

type_mapping not effect #954

hongjunsu opened this issue Apr 26, 2017 · 3 comments

Comments

@hongjunsu
Copy link

the part of code in statefile.json

   "index": "iptv_think",
    "type": "data_think",
    "type_mapping": {
        "data_think": {
            "properties": {
                "namepy": {
                    "type": "string",
                    "analyzer": "whitespace"
                },
                "name": {
                    "type": "string",
                    "index": "not_analyzed"
                }
            }
        }
    }

but run the script .
use curl http://***/iptv_think/data_think/_mapping?pretty
resualt is --
{
"iptv_think" : {
"mappings" : {
"data_think" : {
"properties" : {
"name" : {
"type" : "string"
},
"namepy" : {
"type" : "string"
}
}
}
}
}
}

please

@sanaulla123
Copy link

what is the issue?

@cetetesoft
Copy link

I have the same issue. Any parameter other than type seems to be ignored. I cannot make a field not_analyzed.

@hongjunsu
Copy link
Author

I solved this problem with way.
not define type_mapping in script.
but define type_mapping before running.

curl -XPOST http://localhost:9200/iptv_think/data_think/_mapping -d'
{
"data_think": {
"properties": {
"namepy": {
"type": "string",
"analyzer": "whitespace"
},
"name": {
"type": "string",
"index":"not_analyzed"
}
}
}
}'

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants