Thanks Nick. I understand that we can configure the index by creating the index with the mapping first. I thought it will be a good feature to be added in the es-hadoop /es-spark as we can have the full mapping and code in a single space especially for simple mappings on a particular field. It make sense to create the mapping first for ETL jobs . But for Data Scientists it might be useful to have all in a single space when we have to recreate the indexes multiple times on changing logic.
On Thu, Apr 16, 2015 at 6:52 AM, Nick Pentreath <nick.pentre...@gmail.com> wrote: > If you want to specify mapping you must first create the mappings for your > index types before indexing. > > As far as I know there is no way to specify this via ES-hadoop. But it's > best practice to explicitly create mappings prior to indexing, or to use > index templates when dynamically creating indexes. > > — > Sent from Mailbox > > > On Thu, Apr 16, 2015 at 1:14 AM, Deepak Subhramanian > <deepak.subhraman...@gmail.com> wrote: >> >> Hi, >> >> Is there a way to pass the mapping to define a field as not analyzed >> with es-spark settings. >> >> I am just wondering if I can set the mapping type for a field as not >> analyzed using the set function in spark conf as similar to the other >> es settings. >> >> val sconf = new SparkConf() >> .setMaster("local[1]") >> .setAppName("Load Data To ES") >> .set("spark.ui.port", "4141") >> .set("es.index.auto.create", "true") >> .set("es.net.http.auth.user", "es_admin") >> .set("es.index.auto.create", "true") >> .set("es.mapping.names", "CREATED_DATE:@timestamp") >> >> >> Thanks, >> Deepak Subhramanian >> >> --------------------------------------------------------------------- >> To unsubscribe, e-mail: user-unsubscr...@spark.apache.org >> For additional commands, e-mail: user-h...@spark.apache.org >> > -- Deepak Subhramanian --------------------------------------------------------------------- To unsubscribe, e-mail: user-unsubscr...@spark.apache.org For additional commands, e-mail: user-h...@spark.apache.org