elasticsearch


Struggling to define the mapping for nested schema where same element name is used in parent and child


I have been trying to define the proper mapping for my json schema. but after trying all possible variable types and other attributes I have not been able to upload my json.
In my json I have a key "P" which is nested and complex in nature. this element is present in different sibling level objects and exhibits text,array,nested,object .
after my schema gets created when I try to load my json it fails with below error
$ curl -XPnST 'http://localhost:9200/ridev2/1' -d #v22.jso
{"error":{"root_cause":[{"type":"illegal_argument_exception","reason":"Can't merge a non object mapping [EXPLA.SIDEHED.P] with an object mapping [EXPLA.SIDEHED.P]"}],"type":"illegal_argument_exception","reason":"Can't merge a non object mapping [EXPLA.SIDEHED.P] with an object mapping [EXPLA.SIDEHED.P]"},"status":400}
Not sure what to do if this issues doesn't get resolved I might have to switch to some other text search db to try out. Please help me understanding where am doing wrong.
My mapping json:
curl -XDELETE 'localhost:9200/ridev2?pretty'
curl -H 'Content-Type: application/json' -XPUT http://localhost:9200/ridev2 -d '{
"mappings": {
"title21": {
"properties": {
"CFRDOC": {
"properties": {
"AMDDATE": {
"type": "text"
},
"FMTR": {
"properties": {
"EXPLA": {
"properties": {
"PRTPAGE": {
"type": "object",
"properties": {
"_P": {
"type": "text"
}
}
},
"SIDEHED": {
"type": "object",
"properties": {
"HD": {
"type": "object"
},
"P": {
"type": "object",
"properties": {
"_": {
"type": "text"
},
"E": {
"type": "object",
"properties": {
"_": {
"type": "text"
},
"T": {
"type": "text"
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
}
The real json which am uploading :-------
{
"EXPLA": {
"SIDEHED": [
{
"HD": {
"_": "HOW TO USE THE CODE OF FEDERAL REGULATIONS",
"SOURCE": "HED"
},
"P": [
"The Code of Federal Regulations is...atest version of any given rule.",
"To det..ent of any given rule."
]
},
{
"HD": {
"_": "OMB CONTROL NUMBERS",
"SOURCE": "HED"
},
"P": {
"_": "The Paperwork Reductio...rdkeeping or reporting requirements.",
"PRTPAGE": {
"P": "vi"
}
}
},
{
"HD": {
"_": "“[RESERVED]” TERMINOLOGY",
"SOURCE": "HED"
},
"P": "The term “[Reserved]” is used as a pl...dentally dropped due to a printing or computer error."
},
{
"HD": {
"_": "CFR INDEXES AND TABULAR GUIDES",
"SOURCE": "HED"
},
"P": [
{
"_": "A subject index t...anua...also included in this volume ",
"E": {
"_": "Index and Finding Aids.",
"T": "04"
},
"PRTPAGE": {
"P": "vii"
}
},
"An index to ...” is carried within that volume.",
"The Fed....ral Register.",
"A List of C..FR titles."
]
},
{
"HD": {
"_": "SALES",
"SOURCE": "HED"
},
"P": "The Government Publishing Office (GPO) ... 979050, St. Louis, MO 63197-9000."
},
{
"HD": {
"_": "ELECTRONIC SERVICES",
"SOURCE": "HED"
},
"P": [
{
"_": "The full text of the C...Phone 202-512-1800, or 866-512-1800 (toll-free). E-mail, ",
"E": [
{
"_": "www.ofr.gov.",
"T": "03"
},
{
"_": "ContactCenter#gpo.gov.",
"T": "03"
}
]
},
{
"_": "The e-CFR is..rnment Publishing Office. It is available at ",
"E": {
"_": "www.ecfr.gov.",
"T": "03"
}
},
{
"E": {
"_": "January 1, 2016.",
"T": "03"
}
}
]
}
]
}
}
Need urgent help

Related Links

Can't seem to delete indices on my 3-node elasticsearch cluster
Issue in installing marvel plugin elasticsearch
How to Analyze logs from multiple sources in ELK
Elasticsearch NEST 2 How to correctly map and use nested classes and bulk index
ElasticSearch Aggregate vs Count api
full text searching elasticsearch
How to reverse all the strings inside an array in an elasticsearch document with a groovy script?
Unassigned shards of the index in ElasticSearch
Elasticsearch Query for getting field with 'AND' relation
Tokenizer vs token filters
Elasticsearch historical data handling
Elasticsearch 2.0 scripting: Invoke custom script from plugin
sorting on date field with Range filter
Titan 1.0[Berkeley+ES] - Delayed update of ES index
How do I aggregate over top_hits results in elasticsearch
ways of monitoring filesystem for new files and ship them to elasticsearch

Categories

HOME
events
matrix
keyboard
openxml
long-integer
activex
risk-management
whmcs
typeerror
jersey-2.0
twitter-fabric
nsis
swift2
hyperledger
navigation
position
phpmqtt
cisco
yeoman-generator-angular
fasm
nexus3
slide
corona
google-tasks-api
reselect
scheduled-tasks
spring-ldap
dashdb
gollum-wiki
amazon-sns
chronicle-queue
introspection
unrar
beego
xdebug
ruby-daemons
openbr
audit
envoy
es6-modules
winsock
quick-nimble
sql-execution-plan
advanced-filter
runtimeexception
stackpanel
mv
sspi
android-n
iscroll
netapp
type-inference
destroy
image-registration
android-5.0-lollipop
nusoap
iptv
mura
htmlspecialchars
stateless-session-bean
glassfish-4.1
kendo-editor
swiperefreshlayout
wildfly-9
msg
jsonix
clp
always-on-top
xcode8-beta4
declarative
maven-release-plugin
textblock
taco
wikimedia-commons
cryptojs
sqlbase
domino-designer-eclipse
com0com
kotlin-android-extensions
password-recovery
cakephp-2.2
ildasm
inputbox
jini
frontbase
stty
quickgraph
mongo-jackson-mapper
idispatch
clearinterval
websphere-6.1
zotonic
gamesalad
series-40
infopath-2007
rtd
airprint
reliability
fgetc
asdoc
firephp
.net-client-profile
gtktextview
iphone-sdk-3.1.3

Resources

Encrypt Message



code
soft
python
ios
c
html
jquery
cloud
mobile