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

Rewritten solr converter is outputting JSON (without facets)

parent c6b2eddd
Branches
No related merge requests found
......@@ -266,7 +266,7 @@ class CatalogSolr {
const solr = this.baseSolr(cfMap, item);
_.each(item, ( value, field ) => {
if( ! field in cfMap ) {
if( !(field in cfMap) ) {
if( cf.flatten && cf.flatten[field] ) {
solr[field] = this.flatten(cf.flatten[field], value);
} else {
......@@ -276,10 +276,10 @@ class CatalogSolr {
});
// TODO - add facets
if( ! type in solrDocument ) {
if( !(type in solrDocument) ) {
solrDocument[type] = [];
}
console.log(JSON.stringify(solrDocument))
solrDocument[type].push(solr)
}
}
......@@ -336,7 +336,7 @@ class CatalogSolr {
flatten(value) {
return JSON.stringify(object).replace(/"/g, '\'')
return JSON.stringify(value).replace(/"/g, '\'')
}
......
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