# I don't know why "\_source" :{"enabled":false} is not invalid?

**URL:** <https://discuss.elastic.co/t/i-dont-know-why--source-enabled-false-is-not-invalid/19157>\
**Category:** Elasticsearch\
**Created:** [August 8, 2014, 6:18am UTC](https://discuss.elastic.co/t/i-dont-know-why--source-enabled-false-is-not-invalid/19157 "2014-08-08T06:18:25Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![huangshanjay](https://avatars.discourse-cdn.com/v4/letter/h/13edae/32.png) [@huangshanjay](https://discuss.elastic.co/u/huangshanjay)\
**Post date:** [August 8, 2014, 6:18am UTC](https://discuss.elastic.co/t/i-dont-know-why--source-enabled-false-is-not-invalid/19157/1 "2014-08-08T06:18:25Z")

</div>

curl -XPOST [http://localhost:9200/index/fulltext/](http://localhost:9200/index/fulltext/) -d'  
{  
"mappings":  
{  
"_default_" :  
{  
"term\_vector": "no",  
"indexAnalyzer": "mmseg",  
"searchAnalyzer": "mmseg",  
"dynamic\_date\_formats" : ["yyyy-MM-dd"],  
"dynamic\_templates":[{"store\_generic":{"match":"\*","mapping":{"store":true}}}],  
"\_source" :{"enabled":false}  
}  
}  
}'

then,

curl -XPOST  
'[http://localhost:9200/index/\_http://localhost:9200/index/fulltext/\_search](http://localhost:9200/index/_http://localhost:9200/index/fulltext/_search)  
-d '  
{  
"query": { "query\_string" : { "query" : "xxx" } }  
}'

reponse：  
{"took":2,"timed\_out":false,"\_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":1,"max\_score":0.095891505,"hits":[{"\_index":"index","\_type":"fulltext","\_id":"1","\_score":0.095891505,  
"\_source" :  
{content:"xxx"}  
}]}}

\_source is return,am i wrong?

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/e11f72c0-3e39-4220-bf39-bb5a2d7c7a20%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e11f72c0-3e39-4220-bf39-bb5a2d7c7a20%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![dadoonet](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/dadoonet/32/137187_2.png) [@dadoonet](https://discuss.elastic.co/u/dadoonet)\
**Post date:** [August 8, 2014, 6:32am UTC](https://discuss.elastic.co/t/i-dont-know-why--source-enabled-false-is-not-invalid/19157/2 "2014-08-08T06:32:11Z")

</div>

Did you recreate your index/type (so reindex your docs)?

--  
David 😉  
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

Le 8 août 2014 à 08:18, [huangshanjay@gmail.com](mailto:huangshanjay@gmail.com) a écrit :

curl -XPOST [http://localhost:9200/index/fulltext/](http://localhost:9200/index/fulltext/) -d'  
{  
"mappings":  
{  
"_default_" :  
{  
"term\_vector": "no",  
"indexAnalyzer": "mmseg",  
"searchAnalyzer": "mmseg",  
"dynamic\_date\_formats" : ["yyyy-MM-dd"],  
"dynamic\_templates":[{"store\_generic":{"match":"\*","mapping":{"store":true}}}],  
"\_source" :{"enabled":false}  
}  
}  
}'

then,

curl -XPOST '[http://localhost:9200/index/\_http://localhost:9200/index/fulltext/\_search](http://localhost:9200/index/_http://localhost:9200/index/fulltext/_search) -d '  
{  
"query": { "query\_string" : { "query" : "xxx" } }  
}'

reponse：  
{"took":2,"timed\_out":false,"\_shards":{"total":5,"successful":5,"failed":0},"hits":{"total":1,"max\_score":0.095891505,"hits":[{"\_index":"index","\_type":"fulltext","\_id":"1","\_score":0.095891505, "\_source" :  
{content:"xxx"}  
}]}}

## \_source is return,am i wrong?

You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/e11f72c0-3e39-4220-bf39-bb5a2d7c7a20%40googlegroups.com](https://groups.google.com/d/msgid/elasticsearch/e11f72c0-3e39-4220-bf39-bb5a2d7c7a20%40googlegroups.com).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

--  
You received this message because you are subscribed to the Google Groups "elasticsearch" group.  
To unsubscribe from this group and stop receiving emails from it, send an email to [elasticsearch+unsubscribe@googlegroups.com](mailto:elasticsearch+unsubscribe@googlegroups.com).  
To view this discussion on the web visit [https://groups.google.com/d/msgid/elasticsearch/8F6B9614-8B1F-432B-A5A7-B6EFC63E0B24%40pilato.fr](https://groups.google.com/d/msgid/elasticsearch/8F6B9614-8B1F-432B-A5A7-B6EFC63E0B24%40pilato.fr).  
For more options, visit [https://groups.google.com/d/optout](https://groups.google.com/d/optout).

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [July 6, 2017, 1:10am UTC](https://discuss.elastic.co/t/i-dont-know-why--source-enabled-false-is-not-invalid/19157/3 "2017-07-06T01:10:02Z")

</div>

Closed on July 6, 2017, 1:10am UTC


