Failed to find mapping for

Hi! Guys!
Im novice in elesticsearch.. Now I have this request:

{"size":100,"from":0,
"query":{
"filtered":{
"filter":{
"and":[
{"exists" : {"field" : "psp_name" }}
]
}
}
},
"facets":{
"txtamountusdtransaction_sum":{
"facet_filter":{
"exists" : {"field" : "psp_name" }
},
"terms_stats":{
"key_field":"psp_name",
"value_field":"txt_amount_usd_transaction"
}
}
}
}

My mission make work facets. But I always get error about "failed to find
mapping for psp_name]"

{"error":"SearchPhaseExecutionException[Failed to execute phase [query],
all shards failed; shardFailures
{[DOGYFjtdS26ba9lKa44-BA][.marvel-2014.04.12][0]:
SearchParseException[[.marvel-2014.04.12][0]:
query[ConstantScore(+cache(BooleanFilter(psp_name:[* TO
*])))],from[0],size[100]: Parse Failure [Failed to parse source
[{"size":100,"from":0,\n\t"query":{\n \t"filtered":{\n
\t\t"filter":{\n \t\t"and":[\n \t\t\t{"exists" : {"field" :
"psp_name" }}\n \t]\n \t\t}\n }\n },\n "facets":{\n
\t"txtamountusdtransaction_sum":{\n \t"facet_filter":{\n \t\t"exists"
: {"field" : "psp_name" }\n \t},\n \t"terms_stats":{\n
\t"key_field":"psp_name",\n
"value_field":"txt_amount_usd_transaction"\n }\n }\n }\n}]]]; nested:
FacetPhaseExecutionException[Facet [txtamountusdtransaction_sum]: failed to
find mapping for psp_name]; }

For exaple, if my request looks like this:
My response containg nice data, and field "psp_name" for each
"hits" contains anything!

{
"took": 13788,
"timed_out": false,
"_shards": {
"total": 126,
"successful": 126,
"failed": 0
},
"hits": {
"total": 2264,
"max_score": 1,
"hits": [
{
"_index": "logstash-2014.04.17",
"_type": "app",
"_id": "JxxxnDjdTMe0MLM34VyOrw",
"_score": 1,
"_source": {
"@fields": {
"environment": "production",
"project": "",
"psp_status": "success",
"psp_name": "asd",
"mobile_app": "false",
"txt_amount_transaction": "30.0 USD",
"txt_amount_usd_transacrion": 30,
"txt_amount_user_transaction": "30.0 USD",
"txt_response_from_server":
"
",
"level": "DEPOSIT",
"txt_account_number": ,
"txt_origin_id": 24,
"txt_request_to_server": "
"
},
"@source_path": "/var/www/
",
"@source_host": "
*******************",
"@type": "app",
"@source": "***",
"message": "
",
"type": "app",
"@tags": [],
"@timestamp": "2014-04-17T01:22:14.837+01:00",
"@version": "1"
}
},
................................,
.................................,

But if I try get all data:
{"size":100,"from":0,
"query":{
"match_all" : {}
}
}

I have:
"hits": {
"total": 45848,
"max_score": 1,
"hits": [
{
"_index": "logstash-2014.04.17",
"_type": "app",
"_id": "SF32k0WtQz6yRFiGgDWq9w",
"_score": 1,
"_source": {
"@source": "",
"@type": "app",
"@tags": [],
"@fields": {
"level": "ERROR",
"class": "NoMethodError",
"txt_backtrace": "***********",
"betrails_host": "
",
"betrails_http_host": "
",
"txt_uri": "********************",
"txt_params": "
",
"txt_session": "
*",
"user_id": "",
"txt_referer": null,
"environment": "production",
"project": "*****rails"
},
"message": "undefined method `tag' for nil:NilClass",
"type": "app",
"@source_host": "
.int",
"@source_path": "/var/www/www.
.com",
"@timestamp": "2014-04-17T01:00:39.591+01:00",
"@version": "1"
}
},

As you can see, psp_name not present in last response...
Maybe the problem is that some records not have psp_name field ? Why my "facet_filter"
in first request does not work ?

--
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/caae3be9-b55c-417c-81e6-312ce5c64ab4%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.

Hey,

is it possible that you are querying indices, where the psp_name field does
not exist at all and thus has no mapping? Can you try that search request
against an index with this field and see if it works?

--Alex

On Wed, Apr 23, 2014 at 7:37 AM, Дмитрий Хромов devandart31@gmail.comwrote:

Hi! Guys!
Im novice in elesticsearch.. Now I have this request:

{"size":100,"from":0,
"query":{
"filtered":{
"filter":{
"and":[
{"exists" : {"field" : "psp_name" }}
]
}
}
},
"facets":{
"txtamountusdtransaction_sum":{
"facet_filter":{
"exists" : {"field" : "psp_name" }
},
"terms_stats":{
"key_field":"psp_name",
"value_field":"txt_amount_usd_transaction"
}
}
}
}

My mission make work facets. But I always get error about "failed to find
mapping for psp_name]"

{"error":"SearchPhaseExecutionException[Failed to execute phase [query],
all shards failed; shardFailures
{[DOGYFjtdS26ba9lKa44-BA][.marvel-2014.04.12][0]:
SearchParseException[[.marvel-2014.04.12][0]:
query[ConstantScore(+cache(BooleanFilter(psp_name:[* TO
*])))],from[0],size[100]: Parse Failure [Failed to parse source
[{"size":100,"from":0,\n\t"query":{\n \t"filtered":{\n
\t\t"filter":{\n \t\t"and":[\n \t\t\t{"exists" : {"field" :
"psp_name" }}\n \t]\n \t\t}\n }\n },\n "facets":{\n
\t"txtamountusdtransaction_sum":{\n \t"facet_filter":{\n \t\t"exists"
: {"field" : "psp_name" }\n \t},\n \t"terms_stats":{\n
\t"key_field":"psp_name",\n
"value_field":"txt_amount_usd_transaction"\n }\n }\n }\n}]]]; nested:
FacetPhaseExecutionException[Facet [txtamountusdtransaction_sum]: failed to
find mapping for psp_name]; }

For exaple, if my request looks like this:
My response containg nice data, and field "psp_name" for each
"hits" contains anything!

{
"took": 13788,
"timed_out": false,
"_shards": {
"total": 126,
"successful": 126,
"failed": 0
},
"hits": {
"total": 2264,
"max_score": 1,
"hits": [
{
"_index": "logstash-2014.04.17",
"_type": "app",
"_id": "JxxxnDjdTMe0MLM34VyOrw",
"_score": 1,
"_source": {
"@fields": {
"environment": "production",
"project": "",
"psp_status": "success",
"psp_name": "asd",
"mobile_app": "false",
"txt_amount_transaction": "30.0 USD",
"txt_amount_usd_transacrion": 30,
"txt_amount_user_transaction": "30.0 USD",
"txt_response_from_server":
"
",
"level": "DEPOSIT",
"txt_account_number": ,
"txt_origin_id": 24,
"txt_request_to_server": "
"
},
"@source_path": "/var/www/
",
"@source_host": "
*******************",
"@type": "app",
"@source": "***",
"message": "
",
"type": "app",
"@tags": ,
"@timestamp": "2014-04-17T01:22:14.837+01:00",
"@version": "1"
}
},
................................,
.................................,

But if I try get all data:
{"size":100,"from":0,
"query":{
"match_all" : {}
}
}

I have:
"hits": {
"total": 45848,
"max_score": 1,
"hits": [
{
"_index": "logstash-2014.04.17",
"_type": "app",
"_id": "SF32k0WtQz6yRFiGgDWq9w",
"_score": 1,
"_source": {
"@source": "",
"@type": "app",
"@tags": [],
"@fields": {
"level": "ERROR",
"class": "NoMethodError",
"txt_backtrace": "***********",
"betrails_host": "
",
"betrails_http_host": "
",
"txt_uri": "********************",
"txt_params": "
",
"txt_session": "
*",
"user_id": "",
"txt_referer": null,
"environment": "production",
"project": "*****rails"
},
"message": "undefined method `tag' for nil:NilClass",
"type": "app",
"@source_host": "
.int",
"@source_path": "/var/www/www.
.com",
"@timestamp": "2014-04-17T01:00:39.591+01:00",
"@version": "1"
}
},

As you can see, psp_name not present in last response...
Maybe the problem is that some records not have psp_name field ? Why my "facet_filter"
in first request does not work ?

--
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/caae3be9-b55c-417c-81e6-312ce5c64ab4%40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/caae3be9-b55c-417c-81e6-312ce5c64ab4%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/CAGCwEM8_WWies0%3Depi_x-KemLDLA_9rOtrYahVPZGfnaDzcgcQ%40mail.gmail.com.
For more options, visit https://groups.google.com/d/optout.

Hi,

It looks like you have marvel installed and it's storing it's data locally,
indices called .marvel-YYYY.MM.DD (for example, taken from your error
msg: .marvel-2014.04.12 ). The marvel indices do not have a field called
psp_name and I guess that's your problem. Remember that
http://SERVER:9200/_search searches all the indices.

As Alex suggested, try directing your search at the logstash indices:
http://SERVER:9200/logstash-2014.04.17/_search and see if that works.

Cheers,
Boaz

On Saturday, April 26, 2014 2:14:43 AM UTC+2, Alexander Reelsen wrote:

Hey,

is it possible that you are querying indices, where the psp_name field
does not exist at all and thus has no mapping? Can you try that search
request against an index with this field and see if it works?

--Alex

On Wed, Apr 23, 2014 at 7:37 AM, Дмитрий Хромов devandart31@gmail.comwrote:

Hi! Guys!
Im novice in elesticsearch.. Now I have this request:

{"size":100,"from":0,
"query":{
"filtered":{
"filter":{
"and":[
{"exists" : {"field" : "psp_name" }}
]
}
}
},
"facets":{
"txtamountusdtransaction_sum":{
"facet_filter":{
"exists" : {"field" : "psp_name" }
},
"terms_stats":{
"key_field":"psp_name",
"value_field":"txt_amount_usd_transaction"
}
}
}
}

My mission make work facets. But I always get error about "failed to
find mapping for psp_name]"

{"error":"SearchPhaseExecutionException[Failed to execute phase [query],
all shards failed; shardFailures
{[DOGYFjtdS26ba9lKa44-BA][.marvel-2014.04.12][0]:
SearchParseException[[.marvel-2014.04.12][0]:
query[ConstantScore(+cache(BooleanFilter(psp_name:[* TO
*])))],from[0],size[100]: Parse Failure [Failed to parse source
[{"size":100,"from":0,\n\t"query":{\n \t"filtered":{\n
\t\t"filter":{\n \t\t"and":[\n \t\t\t{"exists" : {"field" :
"psp_name" }}\n \t]\n \t\t}\n }\n },\n "facets":{\n
\t"txtamountusdtransaction_sum":{\n \t"facet_filter":{\n \t\t"exists"
: {"field" : "psp_name" }\n \t},\n \t"terms_stats":{\n
\t"key_field":"psp_name",\n
"value_field":"txt_amount_usd_transaction"\n }\n }\n }\n}]]]; nested:
FacetPhaseExecutionException[Facet [txtamountusdtransaction_sum]: failed to
find mapping for psp_name]; }

For exaple, if my request looks like this:
My response containg nice data, and field "psp_name" for each
"hits" contains anything!

{
"took": 13788,
"timed_out": false,
"_shards": {
"total": 126,
"successful": 126,
"failed": 0
},
"hits": {
"total": 2264,
"max_score": 1,
"hits": [
{
"_index": "logstash-2014.04.17",
"_type": "app",
"_id": "JxxxnDjdTMe0MLM34VyOrw",
"_score": 1,
"_source": {
"@fields": {
"environment": "production",
"project": "",
"psp_status": "success",
"psp_name": "asd",
"mobile_app": "false",
"txt_amount_transaction": "30.0 USD",
"txt_amount_usd_transacrion": 30,
"txt_amount_user_transaction": "30.0 USD",
"txt_response_from_server":
"
",
"level": "DEPOSIT",
"txt_account_number": ,
"txt_origin_id": 24,
"txt_request_to_server": "
"
},
"@source_path": "/var/www/
",
"@source_host": "
*******************",
"@type": "app",
"@source": "***",
"message": "
",
"type": "app",
"@tags": ,
"@timestamp": "2014-04-17T01:22:14.837+01:00",
"@version": "1"
}
},
................................,
.................................,

But if I try get all data:
{"size":100,"from":0,
"query":{
"match_all" : {}
}
}

I have:
"hits": {
"total": 45848,
"max_score": 1,
"hits": [
{
"_index": "logstash-2014.04.17",
"_type": "app",
"_id": "SF32k0WtQz6yRFiGgDWq9w",
"_score": 1,
"_source": {
"@source": "",
"@type": "app",
"@tags": [],
"@fields": {
"level": "ERROR",
"class": "NoMethodError",
"txt_backtrace": "***********",
"betrails_host": "
",
"betrails_http_host": "
",
"txt_uri": "********************",
"txt_params": "
",
"txt_session": "
*",
"user_id": "",
"txt_referer": null,
"environment": "production",
"project": "*****rails"
},
"message": "undefined method `tag' for nil:NilClass",
"type": "app",
"@source_host": "
.int",
"@source_path": "/var/www/www.
.com",
"@timestamp": "2014-04-17T01:00:39.591+01:00",
"@version": "1"
}
},

As you can see, psp_name not present in last response...
Maybe the problem is that some records not have psp_name field ? Why my "facet_filter"
in first request does not work ?

--
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/caae3be9-b55c-417c-81e6-312ce5c64ab4%40googlegroups.comhttps://groups.google.com/d/msgid/elasticsearch/caae3be9-b55c-417c-81e6-312ce5c64ab4%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/033430d8-3b26-4e27-ad16-2c7bf3f0d2c8%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.