.StringIndexOutOfBoundsException: String index out of range: -1


(ABC) #1

Hi,

I am a newbie to elasticsearch. Does anyone know any reasons for this
exception while indexing data.

"Caused by: java.lang.StringIndexOutOfBoundsException: String index out of
range: -1

  •    at java.lang.String.substring(String.java:1937)*
    
  •    at 
    

org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.addMappings(MetaDataCreateIndexService.java:355)
*

  •    at 
    

org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.access$500(MetaDataCreateIndexService.java:81)"
*


(uboness) #2

Hi,

Looks like formatting of the mapping settings. Would be helpful if you also paste the settings.

Cheers,
Uri

--
Uri Boness | Founder | ElasticSearch | www.elasticsearch.com | +31 20 486 2036

On Monday, July 23, 2012 at 4:35 PM, ABC wrote:

Hi,

I am a newbie to elasticsearch. Does anyone know any reasons for this exception while indexing data.

"Caused by: java.lang.StringIndexOutOfBoundsException: String index out of range: -1
at java.lang.String.substring(String.java:1937)
at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.addMappings(MetaDataCreateIndexService.java:355)
at org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.access$500(MetaDataCreateIndexService.java:81)"


(Igor Motov) #3

ABC,

Check config/mappings/_default and config/mappings/YOUR-INDEX-NAMEdirectories, if you see any files there without an extension - rename them
to have an extension (.json, for example).

Igor

On Monday, July 23, 2012 2:52:35 PM UTC-4, uboness wrote:

Hi,

Looks like formatting of the mapping settings. Would be helpful if you
also paste the settings.

Cheers,
Uri

--
Uri Boness | Founder | ElasticSearch | www.elasticsearch.com | +31 20 486
2036

On Monday, July 23, 2012 at 4:35 PM, ABC wrote:

Hi,

I am a newbie to elasticsearch. Does anyone know any reasons for this
exception while indexing data.

"Caused by: java.lang.StringIndexOutOfBoundsException: String index out
of range: -1

  •    at java.lang.String.substring(String.java:1937)*
    
  •    at 
    

org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.addMappings(MetaDataCreateIndexService.java:355)
*

  •    at 
    

org.elasticsearch.cluster.metadata.MetaDataCreateIndexService.access$500(MetaDataCreateIndexService.java:81)"
*


(system) #4