Commit 70a2972f authored by Jörg Richter's avatar Jörg Richter

REST Client: adapt `queryTopicsFulltext()` to Core API

See dmx-platform/dmx-platform#284
parent 3a1ffbb8
Pipeline #8308 passed with stage
in 3 seconds
This diff is collapsed.
......@@ -6,7 +6,7 @@ import typeCache from './type-cache'
import permCache from './permission-cache'
import utils from './utils'
console.log('[DMX] Client API 2019/10/22')
console.log('[DMX] Client API 2019/10/23')
export default {
......@@ -51,12 +51,24 @@ export default {
queryTopicsFulltext (query, typeUri) {
* Performs a fulltext search.
* @param query A Lucene search query.
* @param topicTypeUri Only topics of this type are searched. If null all topics are searched.
* @param searchChildTopics If true the topic's child topics are searched as well. Works only if "topicTypeUri" is
* given.
queryTopicsFulltext (query, topicTypeUri, searchChildTopics) {
// suppress error handler as for incremental search the query might be (temporarily) syntactically incorrect
return _http.get('/core/topic', {params: {query, type_uri: typeUri}}).then(response => ({
topics: utils.instantiateMany(, Topic)
const params = {query, topic_type_uri: topicTypeUri, search_child_topics: searchChildTopics}
return _http.get('/core/topic', {params}).then(response => {
const {query, topicTypeUri, searchChildTopics, topics} =
return {
query, topicTypeUri, searchChildTopics,
topics: utils.instantiateMany(topics, Topic)
createTopic (topicModel) {
Markdown is supported
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