IHTSDO / sct-snapshot-rest-api

Rest API for SNOMED CT Snapshot views, powered by Node.js, Express & MongoDB
Apache License 2.0
60 stars 44 forks source link

MongoDB import indexing fails when using the json files from v1.3 rf2-to-json-conversion #36

Closed priyaranjan-tokachichu closed 6 years ago

priyaranjan-tokachichu commented 6 years ago

The indexing of the json import content in MongoDB fails in the middle stopping the indexing resulting in the SNOMED browser to not function properly. sct-snapshot-rest-api (latest release v2) rf2-to-json-conversion (pre-release v1.3) MongoDB (version 3.6.4) OS: Windows 10 Error message: 2018-04-30T12:53:34.070-0400 I COMMAND [conn37] command company-edition.$cmd appName: "MongoDB Shell" command: createIndexes { createIndexes: "v20180731tx", indexes: [ { key: { term: 1.0 }, name: "term_1" } ], $db: "company-edition" } exception: WiredTigerIndex::insert: key too large to index, failing 1031 { : "PAGOD syndrome is a severe developmental syndrome with characteristics of multiple congenital anomalies including cardiovascular defects, pulmonary hy..." } code:KeyTooLong numYields:0 reslen:294 locks:{ Global: { acquireCount: { r: 1, w: 1 } }, Database: { acquireCount: { W: 1 } }, Collection: { acquireCount: { w: 1 } } } protocol:op_msg 10454ms

This made me revert to sct-snapshot-rest-api (previous release v1.1) rf2-to-json-conversion (latest release v1.2)

priyaranjan-tokachichu commented 6 years ago

After the latest pull request on rf2-to-json-conversion (pre-release v1.3.1), the import completed successfully, but it seems the SNOMED UI browser doesn't load parents, members etc (see the screenshot). image

priyaranjan-tokachichu commented 6 years ago

We realized that the backend of our SNOMED edition is v1. We changed the urls (in index.html of SNOMED browser) from api/snomed to api/v1/snomed, and it resolved the issue.