Hello!
I'm currently using Elasticsearch Hadoop from my Spark Structured Streaming job which generates data having the following schema:
root
|-- id: string (nullable = true)
|-- eventTime: timestamp (nullable = true)
I get all my data into Elasticsearch and can discover it. But When I try to use Machine Learning with my index, I always get the error "Index pattern spark-index* is not time based". But I do have a time field.
My index is created with this command:
PUT spark-index?pretty
{
"settings" : {
"number_of_shards" : 1
},
"mappings" : {
"exc" : {
"properties" : {
"id" : { "type" : "text" },
"eventTime":{ "type" : "date"
}
}
}
}
}
What I am doing wrong here?
Hope my first question is not too stupid!
After carefully reading the linked article, especially the "Note" paragraph I got it to work.
The trick was to first generate an index with my field named "eventTime" having the type "date". Then importing the some data and after that generating an index pattern.
Thanks for the hint!
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.