# Query arg "fields" no longer accepts type name

**URL:** <https://discuss.elastic.co/t/query-arg-fields-no-longer-accepts-type-name/6676>\
**Category:** Elasticsearch\
**Created:** [February 10, 2012, 9:50pm UTC](https://discuss.elastic.co/t/query-arg-fields-no-longer-accepts-type-name/6676 "2012-02-10T21:50:14Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Jamshid](https://avatars.discourse-cdn.com/v4/letter/j/ecd19e/32.png) [@Jamshid](https://discuss.elastic.co/u/Jamshid)\
**Post date:** [February 10, 2012, 9:50pm UTC](https://discuss.elastic.co/t/query-arg-fields-no-longer-accepts-type-name/6676/1 "2012-02-10T21:50:14Z")

</div>

Been running 0.17.8, trying out 0.19.0RC2, but I see this difference  
in the Query URI syntax.

Just thought I'd mention it in case it's not an intentional change. It  
might have happened in an earlier release.

Create the twitter index from [elasticsearch.org](http://elasticsearch.org) home page and this  
query used to work:

curl -i '[http://localhost:9200/twitter/\_search](http://localhost:9200/twitter/_search)?  
pretty=yes&fields=tweet.message'  
...  
"hits" : [ { ...  
"fields" : {  
"tweet.message" : "Trying out elasticsearch, so far so good?"  
}  
...

but now that returns no "fields" element. I have to remove the type  
name "tweet" in "fields":

curl -i '[http://localhost:9200/twitter/\_search](http://localhost:9200/twitter/_search)?  
pretty=yes&fields=message'

Also, I used to be able to do this as a quick test to return some  
results:

curl -i '[http://localhost:9200/twitter/\_search?pretty=yes](http://localhost:9200/twitter/_search?pretty=yes)'

but now that gives a 500 "ActionRequestValidationException[Validation  
Failed: 1: search source is missing;]"

Not a big deal, I can just do this:

curl -i '[http://localhost:9200/twitter/\_search?pretty=yes&from=0](http://localhost:9200/twitter/_search?pretty=yes&from=0)'

Thanks,  
Jamshid

---

<div class="post-metadata">

**Author:** ![kimchy](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/kimchy/32/44952_2.png) [@kimchy](https://discuss.elastic.co/u/kimchy)\
**Post date:** [February 12, 2012, 3:06pm UTC](https://discuss.elastic.co/t/query-arg-fields-no-longer-accepts-type-name/6676/2 "2012-02-12T15:06:03Z")

</div>

Heya,

I fixed the one with no parameters for search request: [Search: Allow to execute search with no parameters · Issue #1696 · elastic/elasticsearch · GitHub](https://github.com/elasticsearch/elasticsearch/issues/1696). The one with the field name, yea, it has changed. Basically, all the fetch based on field names has been improved to return better results. The only part that does not happen now is resolving field names to their full structure (so an object called title, with a field named name, requires asking for title.name), the reason for that is that you might have "name" happening in other places in the json, and returning just the first one was confusing.

On Friday, February 10, 2012 at 11:50 PM, Jamshid wrote:

> Been running 0.17.8, trying out 0.19.0RC2, but I see this difference  
> in the Query URI syntax.
> 
> Just thought I'd mention it in case it's not an intentional change. It  
> might have happened in an earlier release.
> 
> Create the twitter index from [elasticsearch.org](http://elasticsearch.org) ([http://elasticsearch.org](http://elasticsearch.org)) home page and this  
> query used to work:
> 
> curl -i '[http://localhost:9200/twitter/\_search](http://localhost:9200/twitter/_search)?  
> pretty=yes&fields=tweet.message'  
> ...  
> "hits" : [ { ...  
> "fields" : {  
> "tweet.message" : "Trying out elasticsearch, so far so good?"  
> }  
> ...
> 
> but now that returns no "fields" element. I have to remove the type  
> name "tweet" in "fields":
> 
> curl -i '[http://localhost:9200/twitter/\_search](http://localhost:9200/twitter/_search)?  
> pretty=yes&fields=message'
> 
> Also, I used to be able to do this as a quick test to return some  
> results:
> 
> curl -i '[http://localhost:9200/twitter/\_search?pretty=yes](http://localhost:9200/twitter/_search?pretty=yes)'
> 
> but now that gives a 500 "ActionRequestValidationException[Validation  
> Failed: 1: search source is missing;]"
> 
> Not a big deal, I can just do this:
> 
> curl -i '[http://localhost:9200/twitter/\_search?pretty=yes&from=0](http://localhost:9200/twitter/_search?pretty=yes&from=0)'
> 
> Thanks,  
> Jamshid

---

<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, 3:39am UTC](https://discuss.elastic.co/t/query-arg-fields-no-longer-accepts-type-name/6676/3 "2017-07-06T03:39:44Z")

</div>


