Skip to content

Full Text Search data

ddvlanck edited this page Aug 31, 2018 · 2 revisions

Bereikbaar op: /api/fullTextSearch. Volgende data worden teruggegeven:

{
        "@context": "http://www.w3.org/ns/hydra/context.jsonld",
        "@type": "IriTemplate",
        "@id": "/api/fullTextSearch",
        "search": {
            "template": baseUrl + "/api/fullTextSearch/search{?filter}",
            "variableRepresentation": "BasicRepresentation",
            "mapping": [
                {
                    "@type": "IriTemplateMapping",
                    "variable": "filter",
                    "property": "hydra:freetextQuery",
                    "required": true
                }
            ]
        }
}

Indien de client de optie heeft ingesteld om de template URL te fetchen, komt hij terecht bij /api/fullTextSearch/search. Daar wordt willekeurig bepaald in welk formaat (JSON of JSONLD), data worden teruggestuurd. Beide hebben 50% kans.

In het geval van JSONLD worden volgende data teruggegeven:

{
        "@context":["http://www.w3.org/ns/hydra/context.jsonld",
            {
                "schema" : "http://schema.org/"
            }
            ],
        "@type": "IriTemplate",
        "@id": "/api/fullTextSearch/search",
        "http://rdfs.org/ns/void#subset": req.url,
        "schema:type" : "Person",
        "schema:name" : "TestName",
        "schema:jobTitle" : "Software Developer"
}

In het geval van JSON worden volgende data teruggegeven:

{
        'Name' : "TestName",
        'jobTitle' : 'Software Developer'
}

Clone this wiki locally