diff --git a/config.json b/config.json index e9862eb9ebc15a00509ade02bd6287126c9eff1b..d86dcd2cd2a0eff07fc0610c664eeb5131976d9c 100644 --- a/config.json +++ b/config.json @@ -1,13 +1,15 @@ { "repo": "http://localhost:8080/repo/", "core": "repo", - "api": "/solr/ocflcore", + "api": "/_search", "dev": { "proxy": { - "/solr/ocflcore": { - "target": "http://localhost:8080", - "secure": false + "/_search": { + "target": "http://localhost:9200/ocfl/_search", + "secure": false, + "logLevel": "debug" } } + } } \ No newline at end of file diff --git a/src/components/Router.js b/src/components/Router.js index bf6943670905b630a215172f1ff1034731e3df91..20a6fc6504f161597584632d01673a4ddba73a69 100644 --- a/src/components/Router.js +++ b/src/components/Router.js @@ -8,7 +8,7 @@ const ViewDoc = require('./views/ViewDoc'); const ViewError = require('./views/ViewError'); const FacetController = require('./FacetController'); -const solrService = require('./SolrService'); +const elasticService = require('./ElasticService'); const Router = async function (state) { const route = window.location.hash; @@ -27,7 +27,7 @@ const Router = async function (state) { //Removing orcid.org to have better matches state.main.doc.id = state.main.doc.id.replace("http://orcid.org/0000-000", ""); //state.main.doc.id = encodeURIComponent(state.main.doc.id); - const res = await solrService.search({api: state.config.api}, { + const res = await elasticService.search({api: state.config.api}, { start: 0, page: 1, searchParam: 'author_id%3A', @@ -49,7 +49,7 @@ const Router = async function (state) { const start = splits[0] || state.main.start; const page = splits[1] || ''; let searchText = splits[2] || ''; - const {data, status} = await solrService.search({api: state.config.api}, { + const {data, status} = await elasticService.search({api: state.config.api}, { start: start, page: page, searchParam: 'main_search%3A', @@ -72,7 +72,7 @@ const Router = async function (state) { } } else { // TODO: Move some of these config data to config - const res = await solrService.search({api: state.config.api}, { + const res = await elasticService.search({api: state.config.api}, { start: state.main.start, page: state.main.page, searchParam: '*%3A', diff --git a/src/index.js b/src/index.js index b604403aaf2290ab4871f8aa644fa74fe3eb713a..ffa4ce5cc1d1f5ba9972a62f67e93cb2f4072adb 100644 --- a/src/index.js +++ b/src/index.js @@ -39,7 +39,7 @@ let state = { viewFields: [ {display: "SubDocHorizontal", field: "author", fieldName: 'Author/s'}, //{display: "", field: "affiliation", fieldName: 'Affiliation'}, - {display: "", field: "license", fieldName: 'Licence'}, + {display: "", field: "licenseOriginal", fieldName: 'Licence'}, {display: "SubDocDate", field: "datePublished", fieldName: 'Date Published'}, {display: "SubDoc", field: "contactPoint", fieldName: 'Contact Point', template: '${item.name} ${item.email}'}, ] diff --git a/webpack.config.js b/webpack.config.js index a62febd3230638df113fb60b19f0b47b26e6c7ec..f2a67cca466403c1111e3ae7ceee8edf0e76665f 100644 --- a/webpack.config.js +++ b/webpack.config.js @@ -34,7 +34,8 @@ module.exports = { proxy: config.dev.proxy, historyApiFallback: { index: 'index.html' - } + }, + clientLogLevel: 'debug' }, module: { rules: [