Unable to load all stored fields

Hey all,

I'm hoping this is just a simple configuration error. I recently upgraded
to 1.2.1 and now I am unable to load all stored fields in a query. Using
either the Java API or the head plugin, when I send the following query:

curl -XGET 'http://localhost:9200/_search'
{
"from": 0,
"size": 30,
"query": {
"query_string": {
"query": "+(firstName:test fullName:test lastName:test
middleName:test region:test screenName:test street:test)"
}
},
"fields": "*"
}

None of the stored fields are turned, only the type and id.

However, using the head plugin, if I send:
curl -XGET 'http://localhost:9200/_search'
{
"from": 0,
"size": 30,
"query": {
"query_string": {
"query": "+(firstName:test fullName:test lastName:test
middleName:test region:test screenName:test street:test)"
}
}
}

All the stored fields are returned. I tried to debug the Java code and
wasn't able to see why sending fields: "*" isn't returning any stored
fields. The call path into org.elasticsearch.search.fetch.FetchPhase and I
can see the AllFieldsVisitor being used. Unfortunately, it's just able to
pull up all the fields. However, when I use the query w/o specifying any
fields, I can see it using UidAndSourceFieldsVisitor.

Any help is appreciated.

My index mapping is as follows:
{
"LiferayDocumentType": {
"properties": {
"firstName": {
"index": "analyzed",
"store": "yes",
"type": "string"
},
"lastName": {
"index": "analyzed",
"store": "yes",
"type": "string"
},
"name": {
"index": "analyzed",
"store": "yes",
"type": "string"
},
"nodeId": {
"index": "not_analyzed",
"store": "yes",
"type": "string"
},
"path": {
"index": "not_analyzed",
"store": "yes",
"type": "string"
},
"properties": {
"index": "not_analyzed",
"store": "yes",
"type": "string"
},
"title": {
"index": "analyzed",
"store": "yes",
"type": "string"
},
"type": {
"index": "not_analyzed",
"store": "yes",
"type": "string"
},
"uid": {
"index": "not_analyzed",
"store": "yes",
"type": "string"
},
"userName": {
"index": "analyzed",
"store": "yes",
"type": "string"
},
"version": {
"index": "not_analyzed",
"store": "yes",
"type": "string"
}
},
"dynamic_templates": [
{
"template_": {
"match": "",
"match_mapping_type": "string",
"mapping": {
"index": "not_analyzed",
"store": "yes",
"type": "string"
}
}
},
{
"template__sortable": {
"match": "
_sortable",
"match_mapping_type": "string",
"mapping": {
"index": "not_analyzed",
"store": "yes",
"type": "string"
}
}
},
{
"template_CategoryNames": {
"match": "CategoryNames",
"match_mapping_type": "string",
"mapping": {
"index": "not_analyzed",
"store": "yes",
"type": "string"
}
}
},
{
"template_CategoryIds": {
"match": "CategoryIds",
"match_mapping_type": "string",
"mapping": {
"index": "not_analyzed",
"store": "yes",
"type": "string"
}
}
},
{
"template_expando/": {
"match": "expando/
",
"match_mapping_type": "string",
"mapping": {
"index": "analyzed",
"store": "yes",
"type": "string"
}
}
},
{
"template_web_content/": {
"match": "web_content/
",
"match_mapping_type": "string",
"mapping": {
"index": "analyzed",
"store": "yes",
"type": "string"
}
}
}
]
}
}

--
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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/6d57896d-2168-4633-a2cb-36b0fd050989%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Actually realized that I was seeing the source fields when I didn't send
the fields: "*".

That said, can anyone think of any reasons why I wouldn't why fields: "*"
doesn't return the stored fields?

Sent from my mobile device.
On Jun 11, 2014 8:28 PM, "Michael Han" mhan810@gmail.com wrote:

Hey all,

I'm hoping this is just a simple configuration error. I recently upgraded
to 1.2.1 and now I am unable to load all stored fields in a query. Using
either the Java API or the head plugin, when I send the following query:

curl -XGET 'http://localhost:9200/_search'
{
"from": 0,
"size": 30,
"query": {
"query_string": {
"query": "+(firstName:test fullName:test lastName:test
middleName:test region:test screenName:test street:test)"
}
},
"fields": "*"
}

None of the stored fields are turned, only the type and id.

However, using the head plugin, if I send:
curl -XGET 'http://localhost:9200/_search'
{
"from": 0,
"size": 30,
"query": {
"query_string": {
"query": "+(firstName:test fullName:test lastName:test
middleName:test region:test screenName:test street:test)"
}
}
}

All the stored fields are returned. I tried to debug the Java code and
wasn't able to see why sending fields: "*" isn't returning any stored
fields. The call path into org.elasticsearch.search.fetch.FetchPhase and I
can see the AllFieldsVisitor being used. Unfortunately, it's just able to
pull up all the fields. However, when I use the query w/o specifying any
fields, I can see it using UidAndSourceFieldsVisitor.

Any help is appreciated.

My index mapping is as follows:
{
"LiferayDocumentType": {
"properties": {
"firstName": {
"index": "analyzed",
"store": "yes",
"type": "string"
},
"lastName": {
"index": "analyzed",
"store": "yes",
"type": "string"
},
"name": {
"index": "analyzed",
"store": "yes",
"type": "string"
},
"nodeId": {
"index": "not_analyzed",
"store": "yes",
"type": "string"
},
"path": {
"index": "not_analyzed",
"store": "yes",
"type": "string"
},
"properties": {
"index": "not_analyzed",
"store": "yes",
"type": "string"
},
"title": {
"index": "analyzed",
"store": "yes",
"type": "string"
},
"type": {
"index": "not_analyzed",
"store": "yes",
"type": "string"
},
"uid": {
"index": "not_analyzed",
"store": "yes",
"type": "string"
},
"userName": {
"index": "analyzed",
"store": "yes",
"type": "string"
},
"version": {
"index": "not_analyzed",
"store": "yes",
"type": "string"
}
},
"dynamic_templates": [
{
"template_": {
"match": "",
"match_mapping_type": "string",
"mapping": {
"index": "not_analyzed",
"store": "yes",
"type": "string"
}
}
},
{
"template__sortable": {
"match": "
_sortable",
"match_mapping_type": "string",
"mapping": {
"index": "not_analyzed",
"store": "yes",
"type": "string"
}
}
},
{
"template_CategoryNames": {
"match": "CategoryNames",
"match_mapping_type": "string",
"mapping": {
"index": "not_analyzed",
"store": "yes",
"type": "string"
}
}
},
{
"template_CategoryIds": {
"match": "CategoryIds",
"match_mapping_type": "string",
"mapping": {
"index": "not_analyzed",
"store": "yes",
"type": "string"
}
}
},
{
"template_expando/": {
"match": "expando/
",
"match_mapping_type": "string",
"mapping": {
"index": "analyzed",
"store": "yes",
"type": "string"
}
}
},
{
"template_web_content/": {
"match": "web_content/
",
"match_mapping_type": "string",
"mapping": {
"index": "analyzed",
"store": "yes",
"type": "string"
}
}
}
]
}
}

--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/11jrCAMsLOg/unsubscribe.
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com.
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/6d57896d-2168-4633-a2cb-36b0fd050989%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/6d57896d-2168-4633-a2cb-36b0fd050989%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit 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.
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CALKFFFL2qS%3DjBQuB86P5o88za_uRvXSUk%3DsS9%2B7ej9Swv37W%3DQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.