Re: Elasticsearch always uses the default mapping

2014-07-30 Thread David Pilato
I think you are doing something wrong.
If you defined a mapping it should not be overwritten by the CSV river as far 
as I know.

-- 
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr


Le 30 juillet 2014 à 10:31:07, Amirah (beldjilal...@gmail.com) a écrit:

Hello,

Am trying to create an index using CSV River Plugin for ElasticSearch, my csv 
file contains String, long and date values.

My problem is : 
 - ElasticSearch always consider long values as string ( with default mapping ) 
and when i try to create a specific mapping to be used, it changes long type to 
string type.
 - So, is there a way to tell ElasticSearch Don't map everything as string ?

Any suggestion please?

Thank you


--
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/664de1fc-1e52-4846-9660-5f5808d7b6af%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/etPan.53d8b102.b03e0c6.f0d0%40MacBook-Air-de-David.local.
For more options, visit https://groups.google.com/d/optout.


Re: Elasticsearch always uses the default mapping

2014-07-30 Thread Amirah
Thanks for the answer,
Am creating and defining my mapping ( and index) as following :


PUT /newindex/

PUT /newindex/_mapping
 {
  newindex : {
  
  properties: {
MyStringValue: {type: string},
MyLongValue: {type: long},
MyDateValue:{type: date}
  }
  }
  }
 
}
PUT /_river/newindex/_meta
{
   type: csv,
   csv_file: {
 folder: E:/elasticsearch-1.2.2/tmp,
 poll: 5m,
  first_line_is_header:true,
 field_separator: ;,
 escape_character:  ,
 quote_character: '
   }
}

and am always getting string in all types ( except date as i put the right 
format in my csv file* ( 2014-07-24T13:58:25.000Z)*

any idea ?


On Wednesday, July 30, 2014 10:47:13 AM UTC+2, David Pilato wrote:

 I think you are doing something wrong.
 If you defined a mapping it should not be overwritten by the CSV river as 
 far as I know.
 Enter code here...





 

 -- 
 *David Pilato* | *Technical Advocate* | *Elasticsearch.com*
 @dadoonet https://twitter.com/dadoonet | @elasticsearchfr 
 https://twitter.com/elasticsearchfr


 Le 30 juillet 2014 à 10:31:07, Amirah (beldji...@gmail.com javascript:) 
 a écrit:

 Hello, 

 Am trying to create an index using CSV River Plugin for ElasticSearch 
 https://github.com/AgileWorksOrg/elasticsearch-river-csv, my csv file 
 contains *String*, *long* and *date* values.

 My problem is : 
  - ElasticSearch always consider *long* values as *string* ( with default 
 mapping ) and when i try to create a specific mapping to be used, it 
 changes *long* type to *string* type.
  - So, is there a way to tell ElasticSearch *Don't map everything as 
 string *?

 Any suggestion please?

 Thank you


  --
 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/664de1fc-1e52-4846-9660-5f5808d7b6af%40googlegroups.com
  
 https://groups.google.com/d/msgid/elasticsearch/664de1fc-1e52-4846-9660-5f5808d7b6af%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/69675304-f587-4ad2-b24c-550be4446039%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Elasticsearch always uses the default mapping

2014-07-30 Thread David Pilato
This looks strange to me

PUT /newindex/_mapping
 {
      newindex : {
          
          properties: {
    MyStringValue: {type: string},
    MyLongValue: {type: long},
    MyDateValue:{type: date}
  }
      }
  }
     
}

What is your type name?

-- 
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr


Le 30 juillet 2014 à 11:14:42, Amirah (beldjilal...@gmail.com) a écrit:

Thanks for the answer,
Am creating and defining my mapping ( and index) as following :


PUT /newindex/

PUT /newindex/_mapping
 {
      newindex : {
          
          properties: {
    MyStringValue: {type: string},
    MyLongValue: {type: long},
    MyDateValue:{type: date}
  }
      }
  }
     
}
PUT /_river/newindex/_meta
{
   type: csv,
   csv_file: {
     folder: E:/elasticsearch-1.2.2/tmp,
     poll: 5m,
      first_line_is_header:true,
     field_separator: ;,
     escape_character:  ,
     quote_character: '
   }
}

and am always getting string in all types ( except date as i put the right 
format in my csv file ( 2014-07-24T13:58:25.000Z)

any idea ?


On Wednesday, July 30, 2014 10:47:13 AM UTC+2, David Pilato wrote:
I think you are doing something wrong.
If you defined a mapping it should not be overwritten by the CSV river as far 
as I know.
Enter code here...





 
-- 
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr


Le 30 juillet 2014 à 10:31:07, Amirah (beldji...@gmail.com) a écrit:

Hello,

Am trying to create an index using CSV River Plugin for ElasticSearch, my csv 
file contains String, long and date values.

My problem is : 
 - ElasticSearch always consider long values as string ( with default mapping ) 
and when i try to create a specific mapping to be used, it changes long type to 
string type.
 - So, is there a way to tell ElasticSearch Don't map everything as string ?

Any suggestion please?

Thank you


--
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/664de1fc-1e52-4846-9660-5f5808d7b6af%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/69675304-f587-4ad2-b24c-550be4446039%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/etPan.53d8ca28.440badfc.f0d0%40MacBook-Air-de-David.local.
For more options, visit https://groups.google.com/d/optout.


Re: Elasticsearch always uses the default mapping

2014-07-30 Thread Amirah
there is a missing part ( copy paste error) /_river/
So, yes i use this 
PUT /_river/newindex/_mapping
{
 newindex : {
 
 properties: {
   MyStringValue: {type: string},
   MyLongValue: {type: long},
   MyDateValue:{type: date}
 }
 }
 }

}

to create the mapping, my variables ( type names ) are : *MyStringValue* 
and its type is *String*, *MyLongValue* and its type is *long*, 
*MyDateValue* and its type is *date*.
It creates the mapping ( i already checked using GET _mapping ) it exists 
with my real types ! but once i use my csv file, it changes to string 
everywhere!



On Wednesday, July 30, 2014 12:34:25 PM UTC+2, David Pilato wrote:

 This looks strange to me

 PUT /newindex/_mapping
  {
   newindex : {
   
   properties: {
 MyStringValue: {type: string},
 MyLongValue: {type: long},
 MyDateValue:{type: date}
   }
   }
   }
  
 }

 What is your type name?

 -- 
 *David Pilato* | *Technical Advocate* | *Elasticsearch.com*
 @dadoonet https://twitter.com/dadoonet | @elasticsearchfr 
 https://twitter.com/elasticsearchfr


 Le 30 juillet 2014 à 11:14:42, Amirah (beldji...@gmail.com javascript:) 
 a écrit:

 Thanks for the answer, 
 Am creating and defining my mapping ( and index) as following :

   
 PUT /newindex/

 PUT /newindex/_mapping
  {
   newindex : {
   
   properties: {
 MyStringValue: {type: string},
 MyLongValue: {type: long},
 MyDateValue:{type: date}
   }
   }
   }
  
 }
 PUT /_river/newindex/_meta
 {
type: csv,
csv_file: {
  folder: E:/elasticsearch-1.2.2/tmp,
  poll: 5m,
   first_line_is_header:true,
  field_separator: ;,
  escape_character:  ,
  quote_character: '
}
 }
   
 and am always getting string in all types ( except date as i put the right 
 format in my csv file *( 2014-07-24T13:58:25.000Z)*

 any idea ?


 On Wednesday, July 30, 2014 10:47:13 AM UTC+2, David Pilato wrote: 

  I think you are doing something wrong.
  If you defined a mapping it should not be overwritten by the CSV river 
 as far as I know.
  Enter code here...
  

  


  

   -- 
 *David Pilato* | *Technical Advocate* | *Elasticsearch.com* 
  @dadoonet https://twitter.com/dadoonet | @elasticsearchfr 
 https://twitter.com/elasticsearchfr
  

 Le 30 juillet 2014 à 10:31:07, Amirah (beldji...@gmail.com) a écrit:

  Hello, 

 Am trying to create an index using CSV River Plugin for ElasticSearch 
 https://github.com/AgileWorksOrg/elasticsearch-river-csv, my csv file 
 contains *String*, *long* and *date* values.

 My problem is : 
  - ElasticSearch always consider *long* values as *string* ( with 
 default mapping ) and when i try to create a specific mapping to be used, 
 it changes *long* type to *string* type.
  - So, is there a way to tell ElasticSearch *Don't map everything as 
 string *?

 Any suggestion please?

 Thank you


  --
 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/664de1fc-1e52-4846-9660-5f5808d7b6af%40googlegroups.com
  
 https://groups.google.com/d/msgid/elasticsearch/664de1fc-1e52-4846-9660-5f5808d7b6af%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/69675304-f587-4ad2-b24c-550be4446039%40googlegroups.com
  
 https://groups.google.com/d/msgid/elasticsearch/69675304-f587-4ad2-b24c-550be4446039%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/e8a17a8f-a98e-41fa-a774-36cdc0f4b684%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.


Re: Elasticsearch always uses the default mapping

2014-07-30 Thread David Pilato
That's the problem.

A River creates documents in another index than _river.

If I look at the river documentation, you can set it using:

index : {
        index : my_csv_data,
        type : csv_type,
        bulk_size : 100,
        bulk_threshold : 10
    }

So basically, you need to define your aping for index my_csv_data and type 
csv_type

See https://github.com/AgileWorksOrg/elasticsearch-river-csv#full-request


-- 
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr


Le 30 juillet 2014 à 13:54:53, Amirah (beldjilal...@gmail.com) a écrit:

there is a missing part ( copy paste error) /_river/
So, yes i use this 
PUT /_river/newindex/_mapping
{
     newindex : {
         
         properties: {
   MyStringValue: {type: string},
   MyLongValue: {type: long},
   MyDateValue:{type: date}
 }
     }
 }
   
}

to create the mapping, my variables ( type names ) are : MyStringValue and its 
type is String, MyLongValue and its type is long, MyDateValue and its type is 
date.
It creates the mapping ( i already checked using GET _mapping ) it exists with 
my real types ! but once i use my csv file, it changes to string everywhere!



On Wednesday, July 30, 2014 12:34:25 PM UTC+2, David Pilato wrote:
This looks strange to me

PUT /newindex/_mapping
 {
      newindex : {
          
          properties: {
    MyStringValue: {type: string},
    MyLongValue: {type: long},
    MyDateValue:{type: date}
  }
      }
  }
     
}

What is your type name?

-- 
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr


Le 30 juillet 2014 à 11:14:42, Amirah (beldji...@gmail.com) a écrit:

Thanks for the answer,
Am creating and defining my mapping ( and index) as following :


PUT /newindex/

PUT /newindex/_mapping
 {
      newindex : {
          
          properties: {
    MyStringValue: {type: string},
    MyLongValue: {type: long},
    MyDateValue:{type: date}
  }
      }
  }
     
}
PUT /_river/newindex/_meta
{
   type: csv,
   csv_file: {
     folder: E:/elasticsearch-1.2.2/tmp,
     poll: 5m,
      first_line_is_header:true,
     field_separator: ;,
     escape_character:  ,
     quote_character: '
   }
}

and am always getting string in all types ( except date as i put the right 
format in my csv file ( 2014-07-24T13:58:25.000Z)

any idea ?


On Wednesday, July 30, 2014 10:47:13 AM UTC+2, David Pilato wrote:
I think you are doing something wrong.
If you defined a mapping it should not be overwritten by the CSV river as far 
as I know.
Enter code here...





 
-- 
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr


Le 30 juillet 2014 à 10:31:07, Amirah (beldji...@gmail.com) a écrit:

Hello,

Am trying to create an index using CSV River Plugin for ElasticSearch, my csv 
file contains String, long and date values.

My problem is : 
 - ElasticSearch always consider long values as string ( with default mapping ) 
and when i try to create a specific mapping to be used, it changes long type to 
string type.
 - So, is there a way to tell ElasticSearch Don't map everything as string ?

Any suggestion please?

Thank you


--
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/664de1fc-1e52-4846-9660-5f5808d7b6af%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 elasticsearc...@googlegroups.com.
To view this discussion on the web visit 
https://groups.google.com/d/msgid/elasticsearch/69675304-f587-4ad2-b24c-550be4446039%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/e8a17a8f-a98e-41fa-a774-36cdc0f4b684%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/etPan.53d8dfc5.51ead36b.f0d0%40MacBook-Air-de-David.local.
For more options, visit https://groups.google.com/d/optout.


Re: Elasticsearch always uses the default mapping

2014-07-30 Thread Amirah
I don't really see the problem, i selected my newindex ( it exsists in my 
mapping with my types) 

PUT /newindex/

PUT /_river/newindex/_mapping
{
  
  newindex : {
   properties: {
   marques: {type: string},
   ventes: {type: long},
   mois:{type: date}
 }
  
  
 }
} 
PUT /_river/newindex/_meta
{
  type: csv,
  csv_file: {
folder: E:/elasticsearch-1.2.2/tmp,
poll: 5m,
 first_line_is_header:true,
field_separator: ;,
escape_character:  ,
quote_character: '
  }
,

index : {
   index : newindex,
   type : newindex,
   bulk_size : 100,
   bulk_threshold : 10
   }
  
   
}

In addition, when i create the newindex it showed {
   _index: _river,
   _type: newindex,
   _id: _meta,
   _version: 1,
   created: true
}
newindex exists in _river with correct types




On Wednesday, July 30, 2014 2:06:50 PM UTC+2, David Pilato wrote:

 That's the problem.

 A River creates documents in another index than _river.

 If I look at the river documentation, you can set it using:

 index : {
 index : my_csv_data,
 type : csv_type,
 bulk_size : 100,
 bulk_threshold : 10
 }

 So basically, you need to define your aping for index my_csv_data and type 
 csv_type

 See https://github.com/AgileWorksOrg/elasticsearch-river-csv#full-request


 -- 
 *David Pilato* | *Technical Advocate* | *Elasticsearch.com*
 @dadoonet https://twitter.com/dadoonet | @elasticsearchfr 
 https://twitter.com/elasticsearchfr


 Le 30 juillet 2014 à 13:54:53, Amirah (beldji...@gmail.com javascript:) 
 a écrit:

 there is a missing part ( copy paste error) /_river/
 So, yes i use this  
  PUT /_river/newindex/_mapping
  {
   newindex : {
   
   properties: {
 MyStringValue: {type: string},
 MyLongValue: {type: long},
 MyDateValue:{type: date}
   }
   }
   }
 
  }
  
 to create the mapping, my variables ( type names ) are : *MyStringValue* 
 and its type is *String*, *MyLongValue* and its type is *long*, 
 *MyDateValue* and its type is *date*. 
 It creates the mapping ( i already checked using GET _mapping ) it exists 
 with my real types ! but once i use my csv file, it changes to string 
 everywhere!



 On Wednesday, July 30, 2014 12:34:25 PM UTC+2, David Pilato wrote: 

  This looks strange to me

 PUT /newindex/_mapping
  {
   newindex : {
   
   properties: {
 MyStringValue: {type: string},
 MyLongValue: {type: long},
 MyDateValue:{type: date}
   }
   }
   }
  
 }
  
 What is your type name?
  
  -- 
 *David Pilato* | *Technical Advocate* | *Elasticsearch.com* 
  @dadoonet https://twitter.com/dadoonet | @elasticsearchfr 
 https://twitter.com/elasticsearchfr
  

 Le 30 juillet 2014 à 11:14:42, Amirah (beldji...@gmail.com) a écrit:

  Thanks for the answer, 
 Am creating and defining my mapping ( and index) as following :

   
 PUT /newindex/

 PUT /newindex/_mapping
  {
   newindex : {
   
   properties: {
 MyStringValue: {type: string},
 MyLongValue: {type: long},
 MyDateValue:{type: date}
   }
   }
   }
  
 }
 PUT /_river/newindex/_meta
 {
type: csv,
csv_file: {
  folder: E:/elasticsearch-1.2.2/tmp,
  poll: 5m,
   first_line_is_header:true,
  field_separator: ;,
  escape_character:  ,
  quote_character: '
}
 }
   
 and am always getting string in all types ( except date as i put the 
 right format in my csv file *( 2014-07-24T13:58:25.000Z)*

 any idea ?


 On Wednesday, July 30, 2014 10:47:13 AM UTC+2, David Pilato wrote: 

  I think you are doing something wrong.
  If you defined a mapping it should not be overwritten by the CSV river 
 as far as I know.
  Enter code here...
  

  


  

   -- 
 *David Pilato* | *Technical Advocate* | *Elasticsearch.com* 
  @dadoonet https://twitter.com/dadoonet | @elasticsearchfr 
 https://twitter.com/elasticsearchfr
  

 Le 30 juillet 2014 à 10:31:07, Amirah (beldji...@gmail.com) a écrit:

  Hello, 

 Am trying to create an index using CSV River Plugin for ElasticSearch 
 https://github.com/AgileWorksOrg/elasticsearch-river-csv, my csv file 
 contains *String*, *long* and *date* values.

 My problem is : 
  - ElasticSearch always consider *long* values as *string* ( with 
 default mapping ) and when i try to create a specific mapping to be used, 
 it changes *long* type to *string* type.
  - So, is there a way to tell ElasticSearch *Don't map everything as 
 string *?

 Any suggestion please?

 Thank you


  --
 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/664de1fc-1e52-4846-9660-5f5808d7b6af%40googlegroups.com
  
 

Re: Elasticsearch always uses the default mapping

2014-07-30 Thread David Pilato
You applied a mapping to index _river and type newindex.

This is not what I said. You need to apply your mapping to newindex index and 
newindex type.

Basically something like:
PUT /newindex/

PUT /newindex/newindex/_mapping
{
 
      newindex : {
   properties: {
   marques: {type: string},
   ventes: {type: long},
   mois:{type: date}
 }
 
 
 }
}



-- 
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr


Le 30 juillet 2014 à 15:58:02, Amirah (beldjilal...@gmail.com) a écrit:

I don't really see the problem, i selected my newindex ( it exsists in my 
mapping with my types) 

PUT /newindex/

PUT /_river/newindex/_mapping
{
 
      newindex : {
   properties: {
   marques: {type: string},
   ventes: {type: long},
   mois:{type: date}
 }
 
 
 }
}
PUT /_river/newindex/_meta
{
  type: csv,
  csv_file: {
    folder: E:/elasticsearch-1.2.2/tmp,
    poll: 5m,
     first_line_is_header:true,
    field_separator: ;,
    escape_character:  ,
    quote_character: '
  }
,

index : {
       index : newindex,
       type : newindex,
       bulk_size : 100,
       bulk_threshold : 10
   }
 
   
}

In addition, when i create the newindex it showed {
   _index: _river,
   _type: newindex,
   _id: _meta,
   _version: 1,
   created: true
}
newindex exists in _river with correct types




On Wednesday, July 30, 2014 2:06:50 PM UTC+2, David Pilato wrote:
That's the problem.

A River creates documents in another index than _river.

If I look at the river documentation, you can set it using:

index : {
        index : my_csv_data,
        type : csv_type,
        bulk_size : 100,
        bulk_threshold : 10
    }

So basically, you need to define your aping for index my_csv_data and type 
csv_type

See https://github.com/AgileWorksOrg/elasticsearch-river-csv#full-request


-- 
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr


Le 30 juillet 2014 à 13:54:53, Amirah (beldji...@gmail.com) a écrit:

there is a missing part ( copy paste error) /_river/
So, yes i use this 
PUT /_river/newindex/_mapping
{
     newindex : {
         
         properties: {
   MyStringValue: {type: string},
   MyLongValue: {type: long},
   MyDateValue:{type: date}
 }
     }
 }
   
}

to create the mapping, my variables ( type names ) are : MyStringValue and its 
type is String, MyLongValue and its type is long, MyDateValue and its type is 
date.
It creates the mapping ( i already checked using GET _mapping ) it exists with 
my real types ! but once i use my csv file, it changes to string everywhere!



On Wednesday, July 30, 2014 12:34:25 PM UTC+2, David Pilato wrote:
This looks strange to me

PUT /newindex/_mapping
 {
      newindex : {
          
          properties: {
    MyStringValue: {type: string},
    MyLongValue: {type: long},
    MyDateValue:{type: date}
  }
      }
  }
     
}

What is your type name?

-- 
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr


Le 30 juillet 2014 à 11:14:42, Amirah (beldji...@gmail.com) a écrit:

Thanks for the answer,
Am creating and defining my mapping ( and index) as following :


PUT /newindex/

PUT /newindex/_mapping
 {
      newindex : {
          
          properties: {
    MyStringValue: {type: string},
    MyLongValue: {type: long},
    MyDateValue:{type: date}
  }
      }
  }
     
}
PUT /_river/newindex/_meta
{
   type: csv,
   csv_file: {
     folder: E:/elasticsearch-1.2.2/tmp,
     poll: 5m,
      first_line_is_header:true,
     field_separator: ;,
     escape_character:  ,
     quote_character: '
   }
}

and am always getting string in all types ( except date as i put the right 
format in my csv file ( 2014-07-24T13:58:25.000Z)

any idea ?


On Wednesday, July 30, 2014 10:47:13 AM UTC+2, David Pilato wrote:
I think you are doing something wrong.
If you defined a mapping it should not be overwritten by the CSV river as far 
as I know.
Enter code here...





 
-- 
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet | @elasticsearchfr


Le 30 juillet 2014 à 10:31:07, Amirah (beldji...@gmail.com) a écrit:

Hello,

Am trying to create an index using CSV River Plugin for ElasticSearch, my csv 
file contains String, long and date values.

My problem is : 
 - ElasticSearch always consider long values as string ( with default mapping ) 
and when i try to create a specific mapping to be used, it changes long type to 
string type.
 - So, is there a way to tell ElasticSearch Don't map everything as string ?

Any suggestion please?

Thank you


--
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/664de1fc-1e52-4846-9660-5f5808d7b6af%40googlegroups.com.
For more options, visit https://groups.google.com/d/optout.
--
You received this message because 

Re: Elasticsearch always uses the default mapping

2014-07-30 Thread Amira BELDJILALI
ah, yes, i didn't specify the type, thank you so much for your help


On 30 July 2014 16:03, David Pilato da...@pilato.fr wrote:

 You applied a mapping to index _river and type newindex.

 This is not what I said. You need to apply your mapping to newindex index
 and newindex type.

 Basically something like:
 PUT /newindex/

 PUT /newindex/newindex/_mapping
 {

   newindex : {
properties: {
marques: {type: string},
ventes: {type: long},
mois:{type: date}
  }


  }
 }



  --
 *David Pilato* | *Technical Advocate* | *Elasticsearch.com*
 @dadoonet https://twitter.com/dadoonet | @elasticsearchfr
 https://twitter.com/elasticsearchfr


 Le 30 juillet 2014 à 15:58:02, Amirah (beldjilal...@gmail.com) a écrit:

 I don't really see the problem, i selected my newindex ( it exsists in my
 mapping with my types)

   PUT /newindex/

  PUT /_river/newindex/_mapping
  {

newindex : {
 properties: {
 marques: {type: string},
 ventes: {type: long},
 mois:{type: date}
   }


   }
  }
  PUT /_river/newindex/_meta
  {
type: csv,
csv_file: {
  folder: E:/elasticsearch-1.2.2/tmp,
  poll: 5m,
   first_line_is_header:true,
  field_separator: ;,
  escape_character:  ,
  quote_character: '
}
  ,

  index : {
 index : newindex,
 type : newindex,
 bulk_size : 100,
 bulk_threshold : 10
 }


  }

 In addition, when i create the newindex it showed {
_index: _river,
_type: newindex,
_id: _meta,
_version: 1,
created: true
 }
 newindex exists in _river with correct types




 On Wednesday, July 30, 2014 2:06:50 PM UTC+2, David Pilato wrote:

  That's the problem.

  A River creates documents in another index than _river.

  If I look at the river documentation, you can set it using:

  index : {
 index : my_csv_data,
 type : csv_type,
 bulk_size : 100,
 bulk_threshold : 10
 }

 So basically, you need to define your aping for index my_csv_data and
 type csv_type

 See https://github.com/AgileWorksOrg/elasticsearch-river-csv#full-request


  --
 *David Pilato* | *Technical Advocate* | *Elasticsearch.com*
  @dadoonet https://twitter.com/dadoonet | @elasticsearchfr
 https://twitter.com/elasticsearchfr


 Le 30 juillet 2014 à 13:54:53, Amirah (beldji...@gmail.com) a écrit:

  there is a missing part ( copy paste error) /_river/
 So, yes i use this
  PUT /_river/newindex/_mapping
  {
   newindex : {

   properties: {
 MyStringValue: {type: string},
 MyLongValue: {type: long},
 MyDateValue:{type: date}
   }
   }
   }

  }

 to create the mapping, my variables ( type names ) are : *MyStringValue*
 and its type is *String*, *MyLongValue* and its type is *long*,
 *MyDateValue* and its type is *date*.
 It creates the mapping ( i already checked using GET _mapping ) it exists
 with my real types ! but once i use my csv file, it changes to string
 everywhere!



 On Wednesday, July 30, 2014 12:34:25 PM UTC+2, David Pilato wrote:

  This looks strange to me

 PUT /newindex/_mapping
  {
   newindex : {

   properties: {
 MyStringValue: {type: string},
 MyLongValue: {type: long},
 MyDateValue:{type: date}
   }
   }
   }

 }

 What is your type name?

  --
 *David Pilato* | *Technical Advocate* | *Elasticsearch.com*
  @dadoonet https://twitter.com/dadoonet | @elasticsearchfr
 https://twitter.com/elasticsearchfr


 Le 30 juillet 2014 à 11:14:42, Amirah (beldji...@gmail.com) a écrit:

  Thanks for the answer,
 Am creating and defining my mapping ( and index) as following :


 PUT /newindex/

 PUT /newindex/_mapping
  {
   newindex : {

   properties: {
 MyStringValue: {type: string},
 MyLongValue: {type: long},
 MyDateValue:{type: date}
   }
   }
   }

 }
 PUT /_river/newindex/_meta
 {
type: csv,
csv_file: {
  folder: E:/elasticsearch-1.2.2/tmp,
  poll: 5m,
   first_line_is_header:true,
  field_separator: ;,
  escape_character:  ,
  quote_character: '
}
 }

 and am always getting string in all types ( except date as i put the
 right format in my csv file *( 2014-07-24T13:58:25.000Z)*

 any idea ?


 On Wednesday, July 30, 2014 10:47:13 AM UTC+2, David Pilato wrote:

  I think you are doing something wrong.
  If you defined a mapping it should not be overwritten by the CSV
 river as far as I know.
  Enter code here...







   --
 *David Pilato* | *Technical Advocate* | *Elasticsearch.com*
  @dadoonet https://twitter.com/dadoonet | @elasticsearchfr
 https://twitter.com/elasticsearchfr


 Le 30 juillet 2014 à 10:31:07, Amirah (beldji...@gmail.com) a écrit:

  Hello,

 Am trying to create an index using CSV River Plugin for ElasticSearch
 https://github.com/AgileWorksOrg/elasticsearch-river-csv, my csv
 file contains *String*, *long* and *date* values.

 My problem is :
  - ElasticSearch always consider *long* values as *string* ( with
 default mapping ) and 

Re: Elasticsearch always uses the default mapping

2014-07-30 Thread Amirah
ah, yes, i didn't specify the type, thank you so much for your help

On Wednesday, July 30, 2014 4:04:18 PM UTC+2, David Pilato wrote:

 You applied a mapping to index _river and type newindex.

 This is not what I said. You need to apply your mapping to newindex index 
 and newindex type.

 Basically something like:
 PUT /newindex/

 PUT /newindex/newindex/_mapping
 {
  
   newindex : {
properties: {
marques: {type: string},
ventes: {type: long},
mois:{type: date}
  }
  
  
  }
 }



 -- 
 *David Pilato* | *Technical Advocate* | *Elasticsearch.com*
 @dadoonet https://twitter.com/dadoonet | @elasticsearchfr 
 https://twitter.com/elasticsearchfr


 Le 30 juillet 2014 à 15:58:02, Amirah (beldji...@gmail.com javascript:) 
 a écrit:

 I don't really see the problem, i selected my newindex ( it exsists in my 
 mapping with my types)  

   PUT /newindex/
  
  PUT /_river/newindex/_mapping
  {
   
newindex : {
 properties: {
 marques: {type: string},
 ventes: {type: long},
 mois:{type: date}
   }
   
   
   }
  } 
  PUT /_river/newindex/_meta
  {
type: csv,
csv_file: {
  folder: E:/elasticsearch-1.2.2/tmp,
  poll: 5m,
   first_line_is_header:true,
  field_separator: ;,
  escape_character:  ,
  quote_character: '
}
  ,
  
  index : {
 index : newindex,
 type : newindex,
 bulk_size : 100,
 bulk_threshold : 10
 }
   
 
  }
  
 In addition, when i create the newindex it showed {
_index: _river,
_type: newindex,
_id: _meta,
_version: 1,
created: true
 }
 newindex exists in _river with correct types




 On Wednesday, July 30, 2014 2:06:50 PM UTC+2, David Pilato wrote: 

  That's the problem.
  
  A River creates documents in another index than _river.
  
  If I look at the river documentation, you can set it using:
  
  index : {
 index : my_csv_data,
 type : csv_type,
 bulk_size : 100,
 bulk_threshold : 10
 }
  
 So basically, you need to define your aping for index my_csv_data and type 
 csv_type

 See https://github.com/AgileWorksOrg/elasticsearch-river-csv#full-request


  -- 
 *David Pilato* | *Technical Advocate* | *Elasticsearch.com* 
  @dadoonet https://twitter.com/dadoonet | @elasticsearchfr 
 https://twitter.com/elasticsearchfr
  

 Le 30 juillet 2014 à 13:54:53, Amirah (beldji...@gmail.com) a écrit:

  there is a missing part ( copy paste error) /_river/
 So, yes i use this  
  PUT /_river/newindex/_mapping
  {
   newindex : {
   
   properties: {
 MyStringValue: {type: string},
 MyLongValue: {type: long},
 MyDateValue:{type: date}
   }
   }
   }
 
  }
  
 to create the mapping, my variables ( type names ) are : *MyStringValue* 
 and its type is *String*, *MyLongValue* and its type is *long*, 
 *MyDateValue* and its type is *date*. 
 It creates the mapping ( i already checked using GET _mapping ) it exists 
 with my real types ! but once i use my csv file, it changes to string 
 everywhere!



 On Wednesday, July 30, 2014 12:34:25 PM UTC+2, David Pilato wrote: 

  This looks strange to me

 PUT /newindex/_mapping
  {
   newindex : {
   
   properties: {
 MyStringValue: {type: string},
 MyLongValue: {type: long},
 MyDateValue:{type: date}
   }
   }
   }
  
 }
  
 What is your type name?
  
  -- 
 *David Pilato* | *Technical Advocate* | *Elasticsearch.com* 
  @dadoonet https://twitter.com/dadoonet | @elasticsearchfr 
 https://twitter.com/elasticsearchfr
  

 Le 30 juillet 2014 à 11:14:42, Amirah (beldji...@gmail.com) a écrit:

  Thanks for the answer, 
 Am creating and defining my mapping ( and index) as following :

   
 PUT /newindex/

 PUT /newindex/_mapping
  {
   newindex : {
   
   properties: {
 MyStringValue: {type: string},
 MyLongValue: {type: long},
 MyDateValue:{type: date}
   }
   }
   }
  
 }
 PUT /_river/newindex/_meta
 {
type: csv,
csv_file: {
  folder: E:/elasticsearch-1.2.2/tmp,
  poll: 5m,
   first_line_is_header:true,
  field_separator: ;,
  escape_character:  ,
  quote_character: '
}
 }
   
 and am always getting string in all types ( except date as i put the right 
 format in my csv file *( 2014-07-24T13:58:25.000Z)*

 any idea ?


 On Wednesday, July 30, 2014 10:47:13 AM UTC+2, David Pilato wrote: 

  I think you are doing something wrong.
  If you defined a mapping it should not be overwritten by the CSV river 
 as far as I know.
  Enter code here...
  

  


  

   -- 
 *David Pilato* | *Technical Advocate* | *Elasticsearch.com* 
  @dadoonet https://twitter.com/dadoonet | @elasticsearchfr 
 https://twitter.com/elasticsearchfr
  

 Le 30 juillet 2014 à 10:31:07, Amirah (beldji...@gmail.com) a écrit:

  Hello, 

 Am trying to create an index using a href=
 https://github.com/AgileWorksOrg/elasticsearch-river-csv; 

Re: Elasticsearch always uses the default mapping

2014-07-30 Thread David Pilato
You did specify the type. But you sent the put mapping request in the wrong 
index.

--
David ;-)
Twitter : @dadoonet / @elasticsearchfr / @scrutmydocs

 Le 30 juil. 2014 à 16:08, Amira BELDJILALI beldjilal...@gmail.com a écrit :
 
 ah, yes, i didn't specify the type, thank you so much for your help
 
 
 On 30 July 2014 16:03, David Pilato da...@pilato.fr wrote:
 You applied a mapping to index _river and type newindex.
 
 This is not what I said. You need to apply your mapping to newindex index 
 and newindex type.
 
 Basically something like:
 PUT /newindex/
 
 PUT /newindex/newindex/_mapping
 {
  
   newindex : {
properties: {
marques: {type: string},
ventes: {type: long},
mois:{type: date}
  }
  
  
  }
 }
 
 
 
 -- 
 David Pilato | Technical Advocate | Elasticsearch.com
 @dadoonet | @elasticsearchfr
 
 
 Le 30 juillet 2014 à 15:58:02, Amirah (beldjilal...@gmail.com) a écrit:
 
 I don't really see the problem, i selected my newindex ( it exsists in my 
 mapping with my types) 
 
 PUT /newindex/
 
 PUT /_river/newindex/_mapping
 {
  
   newindex : {
properties: {
marques: {type: string},
ventes: {type: long},
mois:{type: date}
  }
  
  
  }
 }
 PUT /_river/newindex/_meta
 {
   type: csv,
   csv_file: {
 folder: E:/elasticsearch-1.2.2/tmp,
 poll: 5m,
  first_line_is_header:true,
 field_separator: ;,
 escape_character:  ,
 quote_character: '
   }
 ,
 
 index : {
index : newindex,
type : newindex,
bulk_size : 100,
bulk_threshold : 10
}
  

 }
 
 In addition, when i create the newindex it showed {
_index: _river,
_type: newindex,
_id: _meta,
_version: 1,
created: true
 }
 newindex exists in _river with correct types
 
 
 
 
 On Wednesday, July 30, 2014 2:06:50 PM UTC+2, David Pilato wrote:
 That's the problem.
 
 A River creates documents in another index than _river.
 
 If I look at the river documentation, you can set it using:
 
 index : {
 index : my_csv_data,
 type : csv_type,
 bulk_size : 100,
 bulk_threshold : 10
 }
 
 So basically, you need to define your aping for index my_csv_data and type 
 csv_type
 
 See https://github.com/AgileWorksOrg/elasticsearch-river-csv#full-request
 
 
 -- 
 David Pilato | Technical Advocate | Elasticsearch.com
 @dadoonet | @elasticsearchfr
 
 
 Le 30 juillet 2014 à 13:54:53, Amirah (beldji...@gmail.com) a écrit:
 
 there is a missing part ( copy paste error) /_river/
 So, yes i use this 
 PUT /_river/newindex/_mapping
 {
  newindex : {
  
  properties: {
MyStringValue: {type: string},
MyLongValue: {type: long},
MyDateValue:{type: date}
  }
  }
  }

 }
 
 to create the mapping, my variables ( type names ) are : MyStringValue 
 and its type is String, MyLongValue and its type is long, MyDateValue and 
 its type is date.
 It creates the mapping ( i already checked using GET _mapping ) it exists 
 with my real types ! but once i use my csv file, it changes to string 
 everywhere!
 
 
 
 On Wednesday, July 30, 2014 12:34:25 PM UTC+2, David Pilato wrote:
 This looks strange to me
 
 PUT /newindex/_mapping
  {
   newindex : {
   
   properties: {
 MyStringValue: {type: string},
 MyLongValue: {type: long},
 MyDateValue:{type: date}
   }
   }
   }
  
 }
 
 What is your type name?
 
 -- 
 David Pilato | Technical Advocate | Elasticsearch.com
 @dadoonet | @elasticsearchfr
 
 
 Le 30 juillet 2014 à 11:14:42, Amirah (beldji...@gmail.com) a écrit:
 
 Thanks for the answer,
 Am creating and defining my mapping ( and index) as following :
 
 
 PUT /newindex/
 
 PUT /newindex/_mapping
  {
   newindex : {
   
   properties: {
 MyStringValue: {type: string},
 MyLongValue: {type: long},
 MyDateValue:{type: date}
   }
   }
   }
  
 }
 PUT /_river/newindex/_meta
 {
type: csv,
csv_file: {
  folder: E:/elasticsearch-1.2.2/tmp,
  poll: 5m,
   first_line_is_header:true,
  field_separator: ;,
  escape_character:  ,
  quote_character: '
}
 }
 
 and am always getting string in all types ( except date as i put the 
 right format in my csv file ( 2014-07-24T13:58:25.000Z)
 
 any idea ?
 
 
 On Wednesday, July 30, 2014 10:47:13 AM UTC+2, David Pilato wrote:
 I think you are doing something wrong.
 If you defined a mapping it should not be overwritten by the CSV river 
 as far as I know.
 Enter code here...
 
 
 
  
 -- 
 David Pilato | Technical Advocate | Elasticsearch.com
 @dadoonet | @elasticsearchfr
 
 
 Le 30 juillet 2014 à 10:31:07, Amirah (beldji...@gmail.com) a écrit:
 
 Hello,
 
 Am trying to create an index using CSV River Plugin for 
 ElasticSearch, my csv file contains String, long and date values.
 
 My problem is : 
  - ElasticSearch always consider long values as string ( with default 
 mapping ) and when i try to create a specific mapping to be used, it 
 changes long type