From d9d47e500d426dad3aab73a7f0ab77d9a0b559fd Mon Sep 17 00:00:00 2001 From: desislava Date: Mon, 30 Mar 2020 15:26:20 +0300 Subject: [PATCH] GDB-4395 Fix autocomplete triples in similarity search --- .../similarity/controllers/similarity-list.controller.js | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/src/js/angular/similarity/controllers/similarity-list.controller.js b/src/js/angular/similarity/controllers/similarity-list.controller.js index 029ce3b58..204129493 100644 --- a/src/js/angular/similarity/controllers/similarity-list.controller.js +++ b/src/js/angular/similarity/controllers/similarity-list.controller.js @@ -18,6 +18,10 @@ function SimilarityCtrl($scope, $interval, toastr, $repositories, ModalService, }; const iriForQuery = function (iri) { + // Do not put brackets on nested triples + if (iri.startsWith("<<") && iri.endsWith(">>")) { + return iri; + } return '<' + iri + '>'; }; @@ -195,7 +199,7 @@ function SimilarityCtrl($scope, $interval, toastr, $repositories, ModalService, $scope.lastSearch.termOrSubject = termOrSubject; - const headers = {Accept: 'application/sparql-results+json'}; + const headers = {Accept: 'application/x-sparqlstar-results+json, application/sparql-results+json;q=0.9, */*;q=0.8'}; let sparqlQuery; if (searchType === 'searchAnalogical') { sparqlQuery = ($scope.selected.analogicalQuery) ? $scope.selected.analogicalQuery : $scope.searchQueries['analogical'];