The bulk of the data I'll need to index is located in the last tag.
Problem currently:
The data I'm gonna be scraping from the forums is fortunately contained in a . Currently I am trying things out and I encountered this issue am I curious of:
The following is valid JSON data, but am I getting a org.elasticsearch.index.mapper.MapperParsingException: failed to parse [x.user]
{
"user": [
0,
{
"x": 1
}
]
}
Why can't elasticsearch index this? Is there a guide on what JSON
format/structure to use for ES?
Given that one of my goals is fast index and fast search., are there any
considerations regarding structuring my data?
Full stack trace:
org.elasticsearch.index.mapper.MapperParsingException: failed to parse
[x.user]
at
org.elasticsearch.index.mapper.core.AbstractFieldMapper.parse(AbstractFieldMapper.java:415)
at
org.elasticsearch.index.mapper.object.ObjectMapper.serializeObject(ObjectMapper.java:555)
at
org.elasticsearch.index.mapper.object.ObjectMapper.serializeNonDynamicArray(ObjectMapper.java:686)
at
org.elasticsearch.index.mapper.object.ObjectMapper.serializeArray(ObjectMapper.java:623)
at
org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:492)
at
org.elasticsearch.index.mapper.object.ObjectMapper.putDynamicMapper(ObjectMapper.java:661)
at
org.elasticsearch.index.mapper.object.ObjectMapper.serializeObject(ObjectMapper.java:581)
at
org.elasticsearch.index.mapper.object.ObjectMapper.parse(ObjectMapper.java:490)
at
org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:541)
at
org.elasticsearch.index.mapper.DocumentMapper.parse(DocumentMapper.java:490)
at
org.elasticsearch.index.shard.service.InternalIndexShard.prepareCreate(InternalIndexShard.java:392)
at
org.elasticsearch.action.index.TransportIndexAction.shardOperationOnPrimary(TransportIndexAction.java:198)
at
org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction.performOnPrimary(TransportShardReplicationOperationAction.java:511)
at
org.elasticsearch.action.support.replication.TransportShardReplicationOperationAction$AsyncShardOperationAction$1.run(TransportShardReplicationOperationAction.java:419)
at
java.util.concurrent.ThreadPoolExecutor.runWorker(ThreadPoolExecutor.java:1142)
at
java.util.concurrent.ThreadPoolExecutor$Worker.run(ThreadPoolExecutor.java:617)
at java.lang.Thread.run(Thread.java:745)
Caused by: org.elasticsearch.ElasticsearchIllegalArgumentException: unknown
property [x]
at
org.elasticsearch.index.mapper.core.LongFieldMapper.innerParseCreateField(LongFieldMapper.java:290)
at
org.elasticsearch.index.mapper.core.NumberFieldMapper.parseCreateField(NumberFieldMapper.java:235)
at
org.elasticsearch.index.mapper.core.AbstractFieldMapper.parse(AbstractFieldMapper.java:405)
... 16 more
I guess I'll parse that raw js data, build POJOs out of it and then pass
these pojos into ES. (Was hoping I could dump this data into Elasticsearch
without any trouble).
Also, sorry to ask this, is Elastic search a good choice for my goals? I've
never used any search technology before.
On Friday, February 6, 2015 at 6:02:40 AM UTC+8, David Pilato wrote:
Unsure but your JSON looks incorrect to me. You are trying to send in an
array a number 0 and an object.
David
Le 5 févr. 2015 à 22:53, Vicente de Rivera III <thirdy....@gmail.com
<javascript:>> a écrit :
I guess I'll parse that raw js data, build POJOs out of it and then pass these pojos into ES. (Was hoping I could dump this data into Elasticsearch without any trouble).
Also, sorry to ask this, is Elastic search a good choice for my goals? I've never used any search technology before.
On Friday, February 6, 2015 at 6:02:40 AM UTC+8, David Pilato wrote:
Unsure but your JSON looks incorrect to me. You are trying to send in an array a number 0 and an object.
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.