Skip to content

Commit

Permalink
Merge pull request #197 from Ontotext-AD/GDB-4395-fix-similarity-auto…
Browse files Browse the repository at this point in the history
…complete-triples

GDB-4395 Fix autocomplete triples in similarity search
  • Loading branch information
desislava-hristova-ontotext authored Mar 30, 2020
2 parents ec52c4b + c819d72 commit 7dbc5bf
Showing 1 changed file with 5 additions and 1 deletion.
Original file line number Diff line number Diff line change
Expand Up @@ -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 + '>';
};

Expand Down Expand Up @@ -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'];
Expand Down

0 comments on commit 7dbc5bf

Please sign in to comment.