Skip to content
Snippets Groups Projects
Commit 23b73682 authored by Baptiste Toulemonde's avatar Baptiste Toulemonde
Browse files

Merge branch 'fix/search_feature' into 'master'

fix search feature

See merge request !38
parents a5c8e13f 54834f08
No related branches found
No related tags found
1 merge request!38fix search feature
......@@ -31,9 +31,10 @@
</thead>
<tbody >
<tr *ngFor="let result of results">
<td><a href="{{result.uri.value}}" target="blank">{{result.uri.value}}</a></td>
<td><a href="{{result.dataset.value}}" target="blank">{{result.dataset.value}}</a></td>
<td>{{result.title.value}}</td>
<td>{{result.description.value.substr(0,250)}}</td>
<td>{{result.description.value.substr(0,250)}}</td>
<td>{{result.keyword.value}}</td>
</tr>
</tbody>
</table>
......
......@@ -46,14 +46,14 @@ export class SearchComponent implements OnInit {
this.searchedTerm = term;
let query='query=PREFIX dcat: <http://www.w3.org/ns/dcat#>\n\
PREFIX dcterms: <http://purl.org/dc/terms/>\n\
SELECT ?title ?description ?uri \n\
SELECT ?title ?description ?keyword ?uri ?dataset \n\
where {\n\?dataset a dcat:Dataset ;\n\
dcterms:title ?title ;\n\
dcterms:description ?description; \n\
dcterms:isPartOf* <'+ environment.fdpUrl +'>;\n\
dcat:keyword ?uri ; \n\
dcat:keyword ?keyword ; \n\
FILTER (contains( ?description, "' +
term +'") || contains( ?title, "'+ term +'"))\n\.\n\
term +'") || contains( ?title, "'+ term +'") || contains( ?keyword, "'+ term +'"))\n\.\n\
}'
this.parserService.getXmlResult(query).subscribe(
......
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