Skip to content
Snippets Groups Projects
Commit be3bd2e6 authored by HeikkiR's avatar HeikkiR
Browse files

Add config option for maximum instances in text query which has default value of only 10000

parent faa925c8
No related branches found
No related tags found
No related merge requests found
......@@ -111,21 +111,25 @@ const generateTextFilter = ({
? `( ${queryTargetVariable} ?score ?literal )`
: queryTargetVariable
let queryObject = ''
let textQueryMaxInstances = ''
if (facetConfig.textQueryMaxInstances) {
textQueryMaxInstances = facetConfig.textQueryMaxInstances
}
if (has(facetConfig, 'textQueryProperty') && facetConfig.textQueryGetLiteral &&
has(facetConfig, 'textQueryHiglightingOptions')) {
queryObject = `( ${facetConfig.textQueryProperty} '${queryString}' "${facetConfig.textQueryHiglightingOptions}" )`
queryObject = `( ${facetConfig.textQueryProperty} '${queryString}' ${textQueryMaxInstances} "${facetConfig.textQueryHiglightingOptions}" )`
}
if (!has(facetConfig, 'textQueryProperty') && facetConfig.textQueryGetLiteral &&
has(facetConfig, 'textQueryHiglightingOptions')) {
queryObject = `( '${queryString}' "${facetConfig.textQueryHiglightingOptions}" )`
queryObject = `( '${queryString}' ${textQueryMaxInstances} "${facetConfig.textQueryHiglightingOptions}" )`
}
if (has(facetConfig, 'textQueryProperty') && !facetConfig.textQueryGetLiteral &&
!has(facetConfig, 'textQueryHiglightingOptions')) {
queryObject = `( ${facetConfig.textQueryProperty} '${queryString}' )`
queryObject = `( ${facetConfig.textQueryProperty} '${queryString}' ${textQueryMaxInstances})`
}
if (!has(facetConfig, 'textQueryProperty') && !facetConfig.textQueryGetLiteral &&
!has(facetConfig, 'textQueryHiglightingOptions')) {
queryObject = `'${queryString}'`
queryObject = `'${queryString}' ${textQueryMaxInstances}`
}
const filterStr = facetConfig.textQueryPredicate
? `${queryTargetVariable} text:query ${queryObject} .
......
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