Skip to content
Snippets Groups Projects
Commit 132651d2 authored by Mike Lynch's avatar Mike Lynch
Browse files

elasticsearch queries are getting through the webpack dev proxy

parent 348e1e36
No related merge requests found
{
"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
......@@ -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',
......
......@@ -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}'},
]
......
......@@ -34,7 +34,8 @@ module.exports = {
proxy: config.dev.proxy,
historyApiFallback: {
index: 'index.html'
}
},
clientLogLevel: 'debug'
},
module: {
rules: [
......
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment