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.