Skip to content
Snippets Groups Projects
Commit d600ee39 authored by esikkala's avatar esikkala
Browse files

type --> facetType

parent 287fcc34
No related branches found
No related tags found
No related merge requests found
......@@ -19,8 +19,8 @@ export const getFacet = async ({
backendSearchConfig,
facetClass,
facetID,
sortBy,
sortDirection,
sortBy = null,
sortDirection = null,
constraints,
resultFormat,
constrainSelf
......@@ -30,7 +30,7 @@ export const getFacet = async ({
// choose query template and result mapper:
let q = ''
let mapper = null
switch (facetConfig.type) {
switch (facetConfig.facetType) {
case 'list':
q = facetValuesQuery
mapper = mapFacet
......@@ -112,7 +112,7 @@ export const getFacet = async ({
? facetConfig.facetLabelFilter
: ''
)
if (facetConfig.type === 'hierarchical') {
if (facetConfig.facetType === 'hierarchical') {
q = q.replace('<ORDER_BY>', '# no need for ordering')
q = q.replace(/<PREDICATE>/g, `${facetConfig.predicate}/${facetConfig.parentProperty}*`)
q = q.replace('<PARENTS>', `
......@@ -149,7 +149,7 @@ export const getFacet = async ({
: ''
)
}
if (facetConfig.type === 'timespan') {
if (facetConfig.facetType === 'timespan') {
q = q.replace('<START_PROPERTY>', facetConfig.startProperty)
q = q.replace('<END_PROPERTY>', facetConfig.endProperty)
}
......@@ -167,7 +167,7 @@ export const getFacet = async ({
resultMapperConfig: facetConfig,
resultFormat
})
if (facetConfig.type === 'hierarchical') {
if (facetConfig.facetType === 'hierarchical') {
return ({
facetClass: facetClass,
id: facetID,
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment