Newer
Older
import { fullTextQuery } from './SparqlQueriesGeneral'
const perspectiveConfig = backendSearchConfig[resultClass]
const { endpoint, propertiesQueryBlock } = perspectiveConfig
q = q.replace('<QUERY>', `(result? ?score) <tag:stardog:api:property:textMatch> '${queryTerm.toLowerCase()}' . ?id rdfs:label ?result .`)
q = q.replace('<RESULT_SET_PROPERTIES>', propertiesQueryBlock)
const results = await runSelectQuery({
query: endpoint.prefixes + q,
resultMapper: makeObjectList,
resultFormat