Open eadamsatx opened 7 years ago
Hey again @eadamsatx. Sorry about that -- we don't have any active instances backed by Elastic, so we must have missed this when updating the Notice schema. I'd have to dig in more, but I'm betting the problem is that the amendments
(a list) have different schemas (the first has an authority
but no changes
, for example). It probably makes sense to encode a single schema at parse time rather than tweaking these in the API.
When parsing 37 CFR 42 and core configured to use elastic search, every
PUT
to a notice URI fails the same way. Here are some snippets that don't make it to the console but provide a great deal of context, pulled from local variables in paused client.py post-exception:Can't merge a non object mapping [amendments.changes] with an object mapping [amendments.changes]` [{'reason': '[YW_wNku][127.0.0.1:9300][indices:data/write/index[p]]', 'type': 'remote_transport_exception'}] '[YW_wNku][127.0.0.1:9300][indices:data/write/index[p]]'
As the request is made,
regulations-core/regcore/db/es.py
line 115 local variablenotice
has the following under theamendments
key (ie. notice[‘amendments’]):With the debugger paused immediately after this failure, I attempted to pull what we already have there. There is no record:
And pulling the schema didn't give me any hints about the preferred structure of
amendments
.