Re: Aggregations failing on fields with custom analyzer..
Hello David, Currently we are using Elasticsearch in production to support heavy aggregation queries. It was working fine, but recently data nodes keep leaving the cluster regularly.. Each node around 3-5 times a day. And the scary part is cluster is in red state for few minutes each day. We tried changing the Garbage collector, to G1GC to prevent stop-the-world garbage collection state. But it still keeps happening. Nodes keep leaving and rejoining the cluster. We will need some help in fixing our current issues.. Even though nodes are leaving and rejoining the cluster, we are only missing around 1000 documents out of around 10 million documents per day during indexing.. Still we need to address this issue. And in addition to that we are going to face some scaling issues in near future. We want some production support to validate our current cluster setup, shard/replica settings, and indexing settings, not to mention cost savings. I sent the same message on the elasticsearch.org webpage, and am still waiting for their response. How do we approach elasticsearch support? Thank you. On Thursday, February 19, 2015 at 2:34:14 PM UTC+5:30, David Pilato wrote: If you can provide a full example working as I did, we can try it and see what is wrong. -- *David Pilato* | *Technical Advocate* | *Elasticsearch.com http://Elasticsearch.com* @dadoonet https://twitter.com/dadoonet | @elasticsearchfr https://twitter.com/elasticsearchfr | @scrutmydocs https://twitter.com/scrutmydocs Le 19 févr. 2015 à 10:01, Anil Karaka anilk...@gmail.com javascript: a écrit : Im getting this error as well using your PUT requests.. It feels like I'm doing something wrong.. But I don't know what exactly.. I'm using this index template.. https://gist.github.com/syllogismos/c2dde4f097fea149e1a0 I didn't specify a particular mapping from my index but reindexed from a previous index.. and ended up with that mapping and documents that looks like above.. Am I seeing things and an obvious mistake? So lost right now.. On Thursday, February 19, 2015 at 2:23:10 PM UTC+5:30, David Pilato wrote: I think you are doing something wrong. DELETE index PUT index { mappings: { doc: { properties: { foo: { type: double } } } } } PUT index/doc/1 { foo: bar } gives: { error: MapperParsingException[failed to parse [foo]]; nested: NumberFormatException[For input string: \bar\]; , status: 400 } -- *David Pilato* | *Technical Advocate* | *Elasticsearch.com http://elasticsearch.com/* @dadoonet https://twitter.com/dadoonet | @elasticsearchfr https://twitter.com/elasticsearchfr | @scrutmydocs https://twitter.com/scrutmydocs Le 19 févr. 2015 à 09:39, Anil Karaka anilk...@gmail.com a écrit : _source : { Sort : , gt : 2015-02-18T15:07:10, uid : 54867dc55b482b04da7f23d8, usId : 54867dc55b482b04da7f23d7, ut : 2015-02-18T20:37:10, act : productlisting, st : 2015-02-18T15:07:46, Filter : , av : 3.0.0.0, ViewType : SmallSingleList, os : Windows, categoryid : home-kitchen-curtains-blinds } properties : { uid : { analyzer : case_insensitive_keyword_analyzer, type : string }, ViewType : { analyzer : case_insensitive_keyword_analyzer, type : string }, usId : { analyzer : case_insensitive_keyword_analyzer, type : string }, os : { analyzer : case_insensitive_keyword_analyzer, type : string }, Sort : { analyzer : case_insensitive_keyword_analyzer, type : string }, Filter : { analyzer : case_insensitive_keyword_analyzer, type : string }, categoryid : { type : double }, gt : { format : dateOptionalTime, type : date }, ut : { format : dateOptionalTime, type : date }, st : { format : dateOptionalTime, type : date }, act : { analyzer : case_insensitive_keyword_analyzer, type : string }, av : { analyzer : case_insensitive_keyword_analyzer, type : string } } A sample document and the index mappings above.. On Thursday, February 19, 2015 at 2:03:11 PM UTC+5:30, David Pilato wrote: I don’t know without a concrete example. I’d say that if you map have a type number and you send 123 it could work. -- *David Pilato* | *Technical Advocate* | *Elasticsearch.com http://elasticsearch.com/* @dadoonet https://twitter.com/dadoonet | @elasticsearchfr https://twitter.com/elasticsearchfr | @scrutmydocs https://twitter.com/scrutmydocs Le 19 févr. 2015 à 09:30, Anil Karaka anilk...@gmail.com a écrit : It was my mistake, the field I was trying to do an aggregation was mapped double, I assumed its a string, after seeing some sample documents with strings.. Why didn't es throw an error when I'm indexing docs with strings instead of double..? On Thursday, February 19, 2015 at 1:35:08 PM UTC+5:30, David Pilato wrote: Did you apply your analyzer to your mapping? David Le 19 févr. 2015 à 08:53, Anil Karaka anilk...@gmail.com a écrit :
Re: Aggregations failing on fields with custom analyzer..
I'm going to make sure you get an answer soonish. Best. -- David ;-) Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs Le 10 mars 2015 à 03:18, Anil Karaka anilkar...@gmail.com a écrit : Hello David, Currently we are using Elasticsearch in production to support heavy aggregation queries. It was working fine, but recently data nodes keep leaving the cluster regularly.. Each node around 3-5 times a day. And the scary part is cluster is in red state for few minutes each day. We tried changing the Garbage collector, to G1GC to prevent stop-the-world garbage collection state. But it still keeps happening. Nodes keep leaving and rejoining the cluster. We will need some help in fixing our current issues.. Even though nodes are leaving and rejoining the cluster, we are only missing around 1000 documents out of around 10 million documents per day during indexing.. Still we need to address this issue. And in addition to that we are going to face some scaling issues in near future. We want some production support to validate our current cluster setup, shard/replica settings, and indexing settings, not to mention cost savings. I sent the same message on the elasticsearch.org webpage, and am still waiting for their response. How do we approach elasticsearch support? Thank you. On Thursday, February 19, 2015 at 2:34:14 PM UTC+5:30, David Pilato wrote: If you can provide a full example working as I did, we can try it and see what is wrong. -- David Pilato | Technical Advocate | Elasticsearch.com @dadoonet | @elasticsearchfr | @scrutmydocs Le 19 févr. 2015 à 10:01, Anil Karaka anilk...@gmail.com a écrit : Im getting this error as well using your PUT requests.. It feels like I'm doing something wrong.. But I don't know what exactly.. I'm using this index template.. https://gist.github.com/syllogismos/c2dde4f097fea149e1a0 I didn't specify a particular mapping from my index but reindexed from a previous index.. and ended up with that mapping and documents that looks like above.. Am I seeing things and an obvious mistake? So lost right now.. On Thursday, February 19, 2015 at 2:23:10 PM UTC+5:30, David Pilato wrote: I think you are doing something wrong. DELETE index PUT index { mappings: { doc: { properties: { foo: { type: double } } } } } PUT index/doc/1 { foo: bar } gives: { error: MapperParsingException[failed to parse [foo]]; nested: NumberFormatException[For input string: \bar\]; , status: 400 } -- David Pilato | Technical Advocate | Elasticsearch.com @dadoonet | @elasticsearchfr | @scrutmydocs Le 19 févr. 2015 à 09:39, Anil Karaka anilk...@gmail.com a écrit : _source : { Sort : , gt : 2015-02-18T15:07:10, uid : 54867dc55b482b04da7f23d8, usId : 54867dc55b482b04da7f23d7, ut : 2015-02-18T20:37:10, act : productlisting, st : 2015-02-18T15:07:46, Filter : , av : 3.0.0.0, ViewType : SmallSingleList, os : Windows, categoryid : home-kitchen-curtains-blinds } properties : { uid : { analyzer : case_insensitive_keyword_analyzer, type : string }, ViewType : { analyzer : case_insensitive_keyword_analyzer, type : string }, usId : { analyzer : case_insensitive_keyword_analyzer, type : string }, os : { analyzer : case_insensitive_keyword_analyzer, type : string }, Sort : { analyzer : case_insensitive_keyword_analyzer, type : string }, Filter : { analyzer : case_insensitive_keyword_analyzer, type : string }, categoryid : { type : double }, gt : { format : dateOptionalTime, type : date }, ut : { format : dateOptionalTime, type : date }, st : { format : dateOptionalTime, type : date }, act : { analyzer : case_insensitive_keyword_analyzer, type : string }, av : { analyzer : case_insensitive_keyword_analyzer, type : string } } A sample document and the index mappings above.. On Thursday, February 19, 2015 at 2:03:11 PM UTC+5:30, David Pilato wrote: I don’t know without a concrete example. I’d say that if you map have a type number and you send 123 it could work. -- David Pilato | Technical Advocate | Elasticsearch.com @dadoonet | @elasticsearchfr | @scrutmydocs Le 19 févr. 2015 à 09:30, Anil Karaka anilk...@gmail.com a écrit : It was my mistake, the field I was trying to do an aggregation was mapped double, I assumed its a string, after seeing some sample documents with strings.. Why didn't es throw an error when I'm indexing docs with strings instead of double..? On Thursday, February 19, 2015 at 1:35:08 PM UTC+5:30, David Pilato wrote: Did you apply your analyzer to your mapping? David Le 19 févr. 2015 à 08:53, Anil Karaka anilk...@gmail.com a écrit : http://stackoverflow.com/questions/28601082/terms-aggregation-failing-on-string-fields-with-a-custom-analyzer-in-elasticsear Posted in stack over flow as well.. On Thursday,
Re: Aggregations failing on fields with custom analyzer..
I don’t know without a concrete example. I’d say that if you map have a type number and you send 123 it could work. -- David Pilato | Technical Advocate | Elasticsearch.com @dadoonet https://twitter.com/dadoonet | @elasticsearchfr https://twitter.com/elasticsearchfr | @scrutmydocs https://twitter.com/scrutmydocs Le 19 févr. 2015 à 09:30, Anil Karaka anilkar...@gmail.com a écrit : It was my mistake, the field I was trying to do an aggregation was mapped double, I assumed its a string, after seeing some sample documents with strings.. Why didn't es throw an error when I'm indexing docs with strings instead of double..? On Thursday, February 19, 2015 at 1:35:08 PM UTC+5:30, David Pilato wrote: Did you apply your analyzer to your mapping? David Le 19 févr. 2015 à 08:53, Anil Karaka anilk...@gmail.com javascript: a écrit : http://stackoverflow.com/questions/28601082/terms-aggregation-failing-on-string-fields-with-a-custom-analyzer-in-elasticsear http://stackoverflow.com/questions/28601082/terms-aggregation-failing-on-string-fields-with-a-custom-analyzer-in-elasticsear Posted in stack over flow as well.. On Thursday, February 19, 2015 at 1:01:40 PM UTC+5:30, Anil Karaka wrote: I wanted a custom analyzer that behaves exactly like not_analyzed, except that fields are case insensitive.. I have my analyzer as below, index: { analysis: { analyzer: { // Custom Analyzer with keyword tokenizer and lowercase filter, same as not_analyzed but case insensitive case_insensitive_keyword_analyzer: { tokenizer: keyword, filter: lowercase } } } } But when I'm trying to do term aggregation over a field with strings analyzed as above, I'm getting this error.. { error :ClassCastException[org.elasticsearch.search.aggregations.bucket.terms.DoubleTerms$Bucket cannot be cast to org.elasticsearch.search.aggregations.bucket.terms.StringTerms$Bucket], status : 500 } Are there additional settings that I have to update in my custom analyzer for my terms aggregation to work..? The better question is I want a custom analyzer that does everything similar to not_analyzed but is case insensitive.. How do I achieve that? -- 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 elasticsearc...@googlegroups.com javascript:. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/91eea272-2f5e-4d9a-b975-dae5d50cd0d3%40googlegroups.com https://groups.google.com/d/msgid/elasticsearch/91eea272-2f5e-4d9a-b975-dae5d50cd0d3%40googlegroups.com?utm_medium=emailutm_source=footer. 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+unsubscr...@googlegroups.com mailto:elasticsearch+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/46135e6f-6946-41bd-a562-557737192a07%40googlegroups.com https://groups.google.com/d/msgid/elasticsearch/46135e6f-6946-41bd-a562-557737192a07%40googlegroups.com?utm_medium=emailutm_source=footer. 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/9B7CB626-45FA-4856-B735-8CD6912B7FBD%40pilato.fr. For more options, visit https://groups.google.com/d/optout.
Re: Aggregations failing on fields with custom analyzer..
It was my mistake, the field I was trying to do an aggregation was mapped double, I assumed its a string, after seeing some sample documents with strings.. Why didn't es throw an error when I'm indexing docs with strings instead of double..? On Thursday, February 19, 2015 at 1:35:08 PM UTC+5:30, David Pilato wrote: Did you apply your analyzer to your mapping? David Le 19 févr. 2015 à 08:53, Anil Karaka anilk...@gmail.com javascript: a écrit : http://stackoverflow.com/questions/28601082/terms-aggregation-failing-on-string-fields-with-a-custom-analyzer-in-elasticsear Posted in stack over flow as well.. On Thursday, February 19, 2015 at 1:01:40 PM UTC+5:30, Anil Karaka wrote: I wanted a custom analyzer that behaves exactly like not_analyzed, except that fields are case insensitive.. I have my analyzer as below, index: { analysis: { analyzer: { // Custom Analyzer with keyword tokenizer and lowercase filter, same as not_analyzed but case insensitive case_insensitive_keyword_analyzer: { tokenizer: keyword, filter: lowercase } } } } But when I'm trying to do term aggregation over a field with strings analyzed as above, I'm getting this error.. { error :ClassCastException[org.elasticsearch.search.aggregations.bucket.terms.DoubleTerms$Bucket cannot be cast to org.elasticsearch.search.aggregations.bucket.terms.StringTerms$Bucket], status : 500 } Are there additional settings that I have to update in my custom analyzer for my terms aggregation to work..? The better question is I want a custom analyzer that does everything similar to not_analyzed but is case insensitive.. How do I achieve that? -- 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 elasticsearc...@googlegroups.com javascript:. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/91eea272-2f5e-4d9a-b975-dae5d50cd0d3%40googlegroups.com https://groups.google.com/d/msgid/elasticsearch/91eea272-2f5e-4d9a-b975-dae5d50cd0d3%40googlegroups.com?utm_medium=emailutm_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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/46135e6f-6946-41bd-a562-557737192a07%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Re: Aggregations failing on fields with custom analyzer..
If you can provide a full example working as I did, we can try it and see what is wrong. -- David Pilato | Technical Advocate | Elasticsearch.com @dadoonet https://twitter.com/dadoonet | @elasticsearchfr https://twitter.com/elasticsearchfr | @scrutmydocs https://twitter.com/scrutmydocs Le 19 févr. 2015 à 10:01, Anil Karaka anilkar...@gmail.com a écrit : Im getting this error as well using your PUT requests.. It feels like I'm doing something wrong.. But I don't know what exactly.. I'm using this index template.. https://gist.github.com/syllogismos/c2dde4f097fea149e1a0 I didn't specify a particular mapping from my index but reindexed from a previous index.. and ended up with that mapping and documents that looks like above.. Am I seeing things and an obvious mistake? So lost right now.. On Thursday, February 19, 2015 at 2:23:10 PM UTC+5:30, David Pilato wrote: I think you are doing something wrong. DELETE index PUT index { mappings: { doc: { properties: { foo: { type: double } } } } } PUT index/doc/1 { foo: bar } gives: { error: MapperParsingException[failed to parse [foo]]; nested: NumberFormatException[For input string: \bar\]; , status: 400 } -- David Pilato | Technical Advocate | Elasticsearch.com http://elasticsearch.com/ @dadoonet https://twitter.com/dadoonet | @elasticsearchfr https://twitter.com/elasticsearchfr | @scrutmydocs https://twitter.com/scrutmydocs Le 19 févr. 2015 à 09:39, Anil Karaka anilk...@gmail.com javascript: a écrit : _source : { Sort : , gt : 2015-02-18T15:07:10, uid : 54867dc55b482b04da7f23d8, usId : 54867dc55b482b04da7f23d7, ut : 2015-02-18T20:37:10, act : productlisting, st : 2015-02-18T15:07:46, Filter : , av : 3.0.0.0, ViewType : SmallSingleList, os : Windows, categoryid : home-kitchen-curtains-blinds } properties : { uid : { analyzer : case_insensitive_keyword_analyzer, type : string }, ViewType : { analyzer : case_insensitive_keyword_analyzer, type : string }, usId : { analyzer : case_insensitive_keyword_analyzer, type : string }, os : { analyzer : case_insensitive_keyword_analyzer, type : string }, Sort : { analyzer : case_insensitive_keyword_analyzer, type : string }, Filter : { analyzer : case_insensitive_keyword_analyzer, type : string }, categoryid : { type : double }, gt : { format : dateOptionalTime, type : date }, ut : { format : dateOptionalTime, type : date }, st : { format : dateOptionalTime, type : date }, act : { analyzer : case_insensitive_keyword_analyzer, type : string }, av : { analyzer : case_insensitive_keyword_analyzer, type : string } } A sample document and the index mappings above.. On Thursday, February 19, 2015 at 2:03:11 PM UTC+5:30, David Pilato wrote: I don’t know without a concrete example. I’d say that if you map have a type number and you send 123 it could work. -- David Pilato | Technical Advocate | Elasticsearch.com http://elasticsearch.com/ @dadoonet https://twitter.com/dadoonet | @elasticsearchfr https://twitter.com/elasticsearchfr | @scrutmydocs https://twitter.com/scrutmydocs Le 19 févr. 2015 à 09:30, Anil Karaka anilk...@gmail.com a écrit : It was my mistake, the field I was trying to do an aggregation was mapped double, I assumed its a string, after seeing some sample documents with strings.. Why didn't es throw an error when I'm indexing docs with strings instead of double..? On Thursday, February 19, 2015 at 1:35:08 PM UTC+5:30, David Pilato wrote: Did you apply your analyzer to your mapping? David Le 19 févr. 2015 à 08:53, Anil Karaka anilk...@gmail.com a écrit : http://stackoverflow.com/questions/28601082/terms-aggregation-failing-on-string-fields-with-a-custom-analyzer-in-elasticsear http://stackoverflow.com/questions/28601082/terms-aggregation-failing-on-string-fields-with-a-custom-analyzer-in-elasticsear Posted in stack over flow as well.. On Thursday, February 19, 2015 at 1:01:40 PM UTC+5:30, Anil Karaka wrote: I wanted a custom analyzer that behaves exactly like not_analyzed, except that fields are case insensitive.. I have my analyzer as below, index: { analysis: { analyzer: { // Custom Analyzer with keyword tokenizer and lowercase filter, same as not_analyzed but case insensitive case_insensitive_keyword_analyzer: { tokenizer: keyword, filter: lowercase } } } } But when I'm trying to do term aggregation over a field with strings analyzed as above, I'm getting this error.. { error :ClassCastException[org.elasticsearch.search.aggregations.bucket.terms.DoubleTerms$Bucket cannot be cast to org.elasticsearch.search.aggregations.bucket.terms.StringTerms$Bucket],
Re: Aggregations failing on fields with custom analyzer..
_source : { Sort : , gt : 2015-02-18T15:07:10, uid : 54867dc55b482b04da7f23d8, usId : 54867dc55b482b04da7f23d7, ut : 2015-02-18T20:37:10, act : productlisting, st : 2015-02-18T15:07:46, Filter : , av : 3.0.0.0, ViewType : SmallSingleList, os : Windows, categoryid : home-kitchen-curtains-blinds } properties : { uid : { analyzer : case_insensitive_keyword_analyzer, type : string }, ViewType : { analyzer : case_insensitive_keyword_analyzer, type : string }, usId : { analyzer : case_insensitive_keyword_analyzer, type : string }, os : { analyzer : case_insensitive_keyword_analyzer, type : string }, Sort : { analyzer : case_insensitive_keyword_analyzer, type : string }, Filter : { analyzer : case_insensitive_keyword_analyzer, type : string }, categoryid : { type : double }, gt : { format : dateOptionalTime, type : date }, ut : { format : dateOptionalTime, type : date }, st : { format : dateOptionalTime, type : date }, act : { analyzer : case_insensitive_keyword_analyzer, type : string }, av : { analyzer : case_insensitive_keyword_analyzer, type : string } } A sample document and the index mappings above.. On Thursday, February 19, 2015 at 2:03:11 PM UTC+5:30, David Pilato wrote: I don’t know without a concrete example. I’d say that if you map have a type number and you send 123 it could work. -- *David Pilato* | *Technical Advocate* | *Elasticsearch.com http://Elasticsearch.com* @dadoonet https://twitter.com/dadoonet | @elasticsearchfr https://twitter.com/elasticsearchfr | @scrutmydocs https://twitter.com/scrutmydocs Le 19 févr. 2015 à 09:30, Anil Karaka anilk...@gmail.com javascript: a écrit : It was my mistake, the field I was trying to do an aggregation was mapped double, I assumed its a string, after seeing some sample documents with strings.. Why didn't es throw an error when I'm indexing docs with strings instead of double..? On Thursday, February 19, 2015 at 1:35:08 PM UTC+5:30, David Pilato wrote: Did you apply your analyzer to your mapping? David Le 19 févr. 2015 à 08:53, Anil Karaka anilk...@gmail.com a écrit : http://stackoverflow.com/questions/28601082/terms-aggregation-failing-on-string-fields-with-a-custom-analyzer-in-elasticsear Posted in stack over flow as well.. On Thursday, February 19, 2015 at 1:01:40 PM UTC+5:30, Anil Karaka wrote: I wanted a custom analyzer that behaves exactly like not_analyzed, except that fields are case insensitive.. I have my analyzer as below, index: { analysis: { analyzer: { // Custom Analyzer with keyword tokenizer and lowercase filter, same as not_analyzed but case insensitive case_insensitive_keyword_analyzer: { tokenizer: keyword, filter: lowercase } } } } But when I'm trying to do term aggregation over a field with strings analyzed as above, I'm getting this error.. { error :ClassCastException[org.elasticsearch.search.aggregations.bucket.terms.DoubleTerms$Bucket cannot be cast to org.elasticsearch.search.aggregations.bucket.terms.StringTerms$Bucket], status : 500 } Are there additional settings that I have to update in my custom analyzer for my terms aggregation to work..? The better question is I want a custom analyzer that does everything similar to not_analyzed but is case insensitive.. How do I achieve that? -- 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 elasticsearc...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/91eea272-2f5e-4d9a-b975-dae5d50cd0d3%40googlegroups.com https://groups.google.com/d/msgid/elasticsearch/91eea272-2f5e-4d9a-b975-dae5d50cd0d3%40googlegroups.com?utm_medium=emailutm_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 elasticsearc...@googlegroups.com javascript:. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/46135e6f-6946-41bd-a562-557737192a07%40googlegroups.com https://groups.google.com/d/msgid/elasticsearch/46135e6f-6946-41bd-a562-557737192a07%40googlegroups.com?utm_medium=emailutm_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+unsubscr...@googlegroups.com. To view this discussion on the web visit
Re: Aggregations failing on fields with custom analyzer..
Im getting this error as well using your PUT requests.. It feels like I'm doing something wrong.. But I don't know what exactly.. I'm using this index template.. https://gist.github.com/syllogismos/c2dde4f097fea149e1a0 I didn't specify a particular mapping from my index but reindexed from a previous index.. and ended up with that mapping and documents that looks like above.. Am I seeing things and an obvious mistake? So lost right now.. On Thursday, February 19, 2015 at 2:23:10 PM UTC+5:30, David Pilato wrote: I think you are doing something wrong. DELETE index PUT index { mappings: { doc: { properties: { foo: { type: double } } } } } PUT index/doc/1 { foo: bar } gives: { error: MapperParsingException[failed to parse [foo]]; nested: NumberFormatException[For input string: \bar\]; , status: 400 } -- *David Pilato* | *Technical Advocate* | *Elasticsearch.com http://Elasticsearch.com* @dadoonet https://twitter.com/dadoonet | @elasticsearchfr https://twitter.com/elasticsearchfr | @scrutmydocs https://twitter.com/scrutmydocs Le 19 févr. 2015 à 09:39, Anil Karaka anilk...@gmail.com javascript: a écrit : _source : { Sort : , gt : 2015-02-18T15:07:10, uid : 54867dc55b482b04da7f23d8, usId : 54867dc55b482b04da7f23d7, ut : 2015-02-18T20:37:10, act : productlisting, st : 2015-02-18T15:07:46, Filter : , av : 3.0.0.0, ViewType : SmallSingleList, os : Windows, categoryid : home-kitchen-curtains-blinds } properties : { uid : { analyzer : case_insensitive_keyword_analyzer, type : string }, ViewType : { analyzer : case_insensitive_keyword_analyzer, type : string }, usId : { analyzer : case_insensitive_keyword_analyzer, type : string }, os : { analyzer : case_insensitive_keyword_analyzer, type : string }, Sort : { analyzer : case_insensitive_keyword_analyzer, type : string }, Filter : { analyzer : case_insensitive_keyword_analyzer, type : string }, categoryid : { type : double }, gt : { format : dateOptionalTime, type : date }, ut : { format : dateOptionalTime, type : date }, st : { format : dateOptionalTime, type : date }, act : { analyzer : case_insensitive_keyword_analyzer, type : string }, av : { analyzer : case_insensitive_keyword_analyzer, type : string } } A sample document and the index mappings above.. On Thursday, February 19, 2015 at 2:03:11 PM UTC+5:30, David Pilato wrote: I don’t know without a concrete example. I’d say that if you map have a type number and you send 123 it could work. -- *David Pilato* | *Technical Advocate* | *Elasticsearch.com http://elasticsearch.com/* @dadoonet https://twitter.com/dadoonet | @elasticsearchfr https://twitter.com/elasticsearchfr | @scrutmydocs https://twitter.com/scrutmydocs Le 19 févr. 2015 à 09:30, Anil Karaka anilk...@gmail.com a écrit : It was my mistake, the field I was trying to do an aggregation was mapped double, I assumed its a string, after seeing some sample documents with strings.. Why didn't es throw an error when I'm indexing docs with strings instead of double..? On Thursday, February 19, 2015 at 1:35:08 PM UTC+5:30, David Pilato wrote: Did you apply your analyzer to your mapping? David Le 19 févr. 2015 à 08:53, Anil Karaka anilk...@gmail.com a écrit : http://stackoverflow.com/questions/28601082/terms-aggregation-failing-on-string-fields-with-a-custom-analyzer-in-elasticsear Posted in stack over flow as well.. On Thursday, February 19, 2015 at 1:01:40 PM UTC+5:30, Anil Karaka wrote: I wanted a custom analyzer that behaves exactly like not_analyzed, except that fields are case insensitive.. I have my analyzer as below, index: { analysis: { analyzer: { // Custom Analyzer with keyword tokenizer and lowercase filter, same as not_analyzed but case insensitive case_insensitive_keyword_analyzer: { tokenizer: keyword, filter: lowercase } } } } But when I'm trying to do term aggregation over a field with strings analyzed as above, I'm getting this error.. { error :ClassCastException[org.elasticsearch.search.aggregations.bucket.terms.DoubleTerms$Bucket cannot be cast to org.elasticsearch.search.aggregations.bucket.terms.StringTerms$Bucket], status : 500 } Are there additional settings that I have to update in my custom analyzer for my terms aggregation to work..? The better question is I want a custom analyzer that does everything similar to not_analyzed but is case insensitive.. How do I achieve that? -- 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 elasticsearc...@googlegroups.com. To view this
Re: Aggregations failing on fields with custom analyzer..
I understand what you are saying.. I was able to recreate the same error you showed myself.. I was not able to insert into your index whose mapping is double, but I am able to insert a string into my older index whose mapping is double.. Very weird.. But I don't know how you could recreate my case.. I'm using this index template, https://gist.github.com/syllogismos/c2dde4f097fea149e1a0 and then reindexed from an older index.. and it took the mapping as double, and has strings in the indexed documents later.. Thanks for your help.. On Thursday, February 19, 2015 at 2:34:14 PM UTC+5:30, David Pilato wrote: If you can provide a full example working as I did, we can try it and see what is wrong. -- *David Pilato* | *Technical Advocate* | *Elasticsearch.com http://Elasticsearch.com* @dadoonet https://twitter.com/dadoonet | @elasticsearchfr https://twitter.com/elasticsearchfr | @scrutmydocs https://twitter.com/scrutmydocs Le 19 févr. 2015 à 10:01, Anil Karaka anilk...@gmail.com javascript: a écrit : Im getting this error as well using your PUT requests.. It feels like I'm doing something wrong.. But I don't know what exactly.. I'm using this index template.. https://gist.github.com/syllogismos/c2dde4f097fea149e1a0 I didn't specify a particular mapping from my index but reindexed from a previous index.. and ended up with that mapping and documents that looks like above.. Am I seeing things and an obvious mistake? So lost right now.. On Thursday, February 19, 2015 at 2:23:10 PM UTC+5:30, David Pilato wrote: I think you are doing something wrong. DELETE index PUT index { mappings: { doc: { properties: { foo: { type: double } } } } } PUT index/doc/1 { foo: bar } gives: { error: MapperParsingException[failed to parse [foo]]; nested: NumberFormatException[For input string: \bar\]; , status: 400 } -- *David Pilato* | *Technical Advocate* | *Elasticsearch.com http://elasticsearch.com/* @dadoonet https://twitter.com/dadoonet | @elasticsearchfr https://twitter.com/elasticsearchfr | @scrutmydocs https://twitter.com/scrutmydocs Le 19 févr. 2015 à 09:39, Anil Karaka anilk...@gmail.com a écrit : _source : { Sort : , gt : 2015-02-18T15:07:10, uid : 54867dc55b482b04da7f23d8, usId : 54867dc55b482b04da7f23d7, ut : 2015-02-18T20:37:10, act : productlisting, st : 2015-02-18T15:07:46, Filter : , av : 3.0.0.0, ViewType : SmallSingleList, os : Windows, categoryid : home-kitchen-curtains-blinds } properties : { uid : { analyzer : case_insensitive_keyword_analyzer, type : string }, ViewType : { analyzer : case_insensitive_keyword_analyzer, type : string }, usId : { analyzer : case_insensitive_keyword_analyzer, type : string }, os : { analyzer : case_insensitive_keyword_analyzer, type : string }, Sort : { analyzer : case_insensitive_keyword_analyzer, type : string }, Filter : { analyzer : case_insensitive_keyword_analyzer, type : string }, categoryid : { type : double }, gt : { format : dateOptionalTime, type : date }, ut : { format : dateOptionalTime, type : date }, st : { format : dateOptionalTime, type : date }, act : { analyzer : case_insensitive_keyword_analyzer, type : string }, av : { analyzer : case_insensitive_keyword_analyzer, type : string } } A sample document and the index mappings above.. On Thursday, February 19, 2015 at 2:03:11 PM UTC+5:30, David Pilato wrote: I don’t know without a concrete example. I’d say that if you map have a type number and you send 123 it could work. -- *David Pilato* | *Technical Advocate* | *Elasticsearch.com http://elasticsearch.com/* @dadoonet https://twitter.com/dadoonet | @elasticsearchfr https://twitter.com/elasticsearchfr | @scrutmydocs https://twitter.com/scrutmydocs Le 19 févr. 2015 à 09:30, Anil Karaka anilk...@gmail.com a écrit : It was my mistake, the field I was trying to do an aggregation was mapped double, I assumed its a string, after seeing some sample documents with strings.. Why didn't es throw an error when I'm indexing docs with strings instead of double..? On Thursday, February 19, 2015 at 1:35:08 PM UTC+5:30, David Pilato wrote: Did you apply your analyzer to your mapping? David Le 19 févr. 2015 à 08:53, Anil Karaka anilk...@gmail.com a écrit : http://stackoverflow.com/questions/28601082/terms-aggregation-failing-on-string-fields-with-a-custom-analyzer-in-elasticsear Posted in stack over flow as well.. On Thursday, February 19, 2015 at 1:01:40 PM UTC+5:30, Anil Karaka wrote: I wanted a custom analyzer that behaves exactly like not_analyzed, except that fields are case insensitive.. I have my analyzer as below, index: { analysis: { analyzer: { // Custom Analyzer with keyword tokenizer and lowercase filter, same as not_analyzed but case insensitive
Re: Aggregations failing on fields with custom analyzer..
Did you apply your analyzer to your mapping? David Le 19 févr. 2015 à 08:53, Anil Karaka anilkar...@gmail.com a écrit : http://stackoverflow.com/questions/28601082/terms-aggregation-failing-on-string-fields-with-a-custom-analyzer-in-elasticsear Posted in stack over flow as well.. On Thursday, February 19, 2015 at 1:01:40 PM UTC+5:30, Anil Karaka wrote: I wanted a custom analyzer that behaves exactly like not_analyzed, except that fields are case insensitive.. I have my analyzer as below, index: { analysis: { analyzer: { // Custom Analyzer with keyword tokenizer and lowercase filter, same as not_analyzed but case insensitive case_insensitive_keyword_analyzer: { tokenizer: keyword, filter: lowercase } } } } But when I'm trying to do term aggregation over a field with strings analyzed as above, I'm getting this error.. { error :ClassCastException[org.elasticsearch.search.aggregations.bucket.terms.DoubleTerms$Bucket cannot be cast to org.elasticsearch.search.aggregations.bucket.terms.StringTerms$Bucket], status : 500 } Are there additional settings that I have to update in my custom analyzer for my terms aggregation to work..? The better question is I want a custom analyzer that does everything similar to not_analyzed but is case insensitive.. How do I achieve that? -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/91eea272-2f5e-4d9a-b975-dae5d50cd0d3%40googlegroups.com. 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/492932A0-CBC0-497B-A9D8-C6D707DC09B6%40pilato.fr. For more options, visit https://groups.google.com/d/optout.
Re: Aggregations failing on fields with custom analyzer..
I think you are doing something wrong. DELETE index PUT index { mappings: { doc: { properties: { foo: { type: double } } } } } PUT index/doc/1 { foo: bar } gives: { error: MapperParsingException[failed to parse [foo]]; nested: NumberFormatException[For input string: \bar\]; , status: 400 } -- David Pilato | Technical Advocate | Elasticsearch.com @dadoonet https://twitter.com/dadoonet | @elasticsearchfr https://twitter.com/elasticsearchfr | @scrutmydocs https://twitter.com/scrutmydocs Le 19 févr. 2015 à 09:39, Anil Karaka anilkar...@gmail.com a écrit : _source : { Sort : , gt : 2015-02-18T15:07:10, uid : 54867dc55b482b04da7f23d8, usId : 54867dc55b482b04da7f23d7, ut : 2015-02-18T20:37:10, act : productlisting, st : 2015-02-18T15:07:46, Filter : , av : 3.0.0.0, ViewType : SmallSingleList, os : Windows, categoryid : home-kitchen-curtains-blinds } properties : { uid : { analyzer : case_insensitive_keyword_analyzer, type : string }, ViewType : { analyzer : case_insensitive_keyword_analyzer, type : string }, usId : { analyzer : case_insensitive_keyword_analyzer, type : string }, os : { analyzer : case_insensitive_keyword_analyzer, type : string }, Sort : { analyzer : case_insensitive_keyword_analyzer, type : string }, Filter : { analyzer : case_insensitive_keyword_analyzer, type : string }, categoryid : { type : double }, gt : { format : dateOptionalTime, type : date }, ut : { format : dateOptionalTime, type : date }, st : { format : dateOptionalTime, type : date }, act : { analyzer : case_insensitive_keyword_analyzer, type : string }, av : { analyzer : case_insensitive_keyword_analyzer, type : string } } A sample document and the index mappings above.. On Thursday, February 19, 2015 at 2:03:11 PM UTC+5:30, David Pilato wrote: I don’t know without a concrete example. I’d say that if you map have a type number and you send 123 it could work. -- David Pilato | Technical Advocate | Elasticsearch.com http://elasticsearch.com/ @dadoonet https://twitter.com/dadoonet | @elasticsearchfr https://twitter.com/elasticsearchfr | @scrutmydocs https://twitter.com/scrutmydocs Le 19 févr. 2015 à 09:30, Anil Karaka anilk...@gmail.com javascript: a écrit : It was my mistake, the field I was trying to do an aggregation was mapped double, I assumed its a string, after seeing some sample documents with strings.. Why didn't es throw an error when I'm indexing docs with strings instead of double..? On Thursday, February 19, 2015 at 1:35:08 PM UTC+5:30, David Pilato wrote: Did you apply your analyzer to your mapping? David Le 19 févr. 2015 à 08:53, Anil Karaka anilk...@gmail.com a écrit : http://stackoverflow.com/questions/28601082/terms-aggregation-failing-on-string-fields-with-a-custom-analyzer-in-elasticsear http://stackoverflow.com/questions/28601082/terms-aggregation-failing-on-string-fields-with-a-custom-analyzer-in-elasticsear Posted in stack over flow as well.. On Thursday, February 19, 2015 at 1:01:40 PM UTC+5:30, Anil Karaka wrote: I wanted a custom analyzer that behaves exactly like not_analyzed, except that fields are case insensitive.. I have my analyzer as below, index: { analysis: { analyzer: { // Custom Analyzer with keyword tokenizer and lowercase filter, same as not_analyzed but case insensitive case_insensitive_keyword_analyzer: { tokenizer: keyword, filter: lowercase } } } } But when I'm trying to do term aggregation over a field with strings analyzed as above, I'm getting this error.. { error :ClassCastException[org.elasticsearch.search.aggregations.bucket.terms.DoubleTerms$Bucket cannot be cast to org.elasticsearch.search.aggregations.bucket.terms.StringTerms$Bucket], status : 500 } Are there additional settings that I have to update in my custom analyzer for my terms aggregation to work..? The better question is I want a custom analyzer that does everything similar to not_analyzed but is case insensitive.. How do I achieve that? -- 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 elasticsearc...@googlegroups.com . To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/91eea272-2f5e-4d9a-b975-dae5d50cd0d3%40googlegroups.com https://groups.google.com/d/msgid/elasticsearch/91eea272-2f5e-4d9a-b975-dae5d50cd0d3%40googlegroups.com?utm_medium=emailutm_source=footer. 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
Re: Aggregations failing on fields with custom analyzer..
http://stackoverflow.com/questions/28601082/terms-aggregation-failing-on-string-fields-with-a-custom-analyzer-in-elasticsear Posted in stack over flow as well.. On Thursday, February 19, 2015 at 1:01:40 PM UTC+5:30, Anil Karaka wrote: I wanted a custom analyzer that behaves exactly like not_analyzed, except that fields are case insensitive.. I have my analyzer as below, index: { analysis: { analyzer: { // Custom Analyzer with keyword tokenizer and lowercase filter, same as not_analyzed but case insensitive case_insensitive_keyword_analyzer: { tokenizer: keyword, filter: lowercase } } } } But when I'm trying to do term aggregation over a field with strings analyzed as above, I'm getting this error.. { error :ClassCastException[org.elasticsearch.search.aggregations.bucket.terms.DoubleTerms$Bucket cannot be cast to org.elasticsearch.search.aggregations.bucket.terms.StringTerms$Bucket], status : 500 } Are there additional settings that I have to update in my custom analyzer for my terms aggregation to work..? The better question is I want a custom analyzer that does everything similar to not_analyzed but is case insensitive.. How do I achieve that? -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/91eea272-2f5e-4d9a-b975-dae5d50cd0d3%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.
Aggregations failing on fields with custom analyzer..
I wanted a custom analyzer that behaves exactly like not_analyzed, except that fields are case insensitive.. I have my analyzer as below, index: { analysis: { analyzer: { // Custom Analyzer with keyword tokenizer and lowercase filter, same as not_analyzed but case insensitive case_insensitive_keyword_analyzer: { tokenizer: keyword, filter: lowercase } } } } But when I'm trying to do term aggregation over a field with strings analyzed as above, I'm getting this error.. { error :ClassCastException[org.elasticsearch.search.aggregations.bucket.terms.DoubleTerms$Bucket cannot be cast to org.elasticsearch.search.aggregations.bucket.terms.StringTerms$Bucket], status : 500 } Are there additional settings that I have to update in my custom analyzer for my terms aggregation to work..? The better question is I want a custom analyzer that does everything similar to not_analyzed but is case insensitive.. How do I achieve that? -- 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+unsubscr...@googlegroups.com. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/6c657449-1279-4813-9e65-262cb81e114f%40googlegroups.com. For more options, visit https://groups.google.com/d/optout.