Full-text search


Simple query

Sometimes, users just want to enter a term of search and see results. Full-text search are made for that. This is the easy way to make search in the Navigart 3 API : curl http://api.navigart.fr/123/artworks?q=<your_word> Replace with the word set by the user. Results are the same as other queries.

Highligting

If you want Highligting of results, you need to use global_query instead of q : curl https://api.navigart.fr/123/artworks?global_query=<your_word>

Then you will have results and a new filed highlight in each result. For example : curl https://api.navigart.fr/123/artworks?global_query=poesie | jq '.results[0]'

{
 "_index": "vm-stg_123_2017-04-06_11-36-artworks",
 "_type": "artworks",
 "_id": "420000000004124",
 "_score": 6.7319136,
 "highlight": {
     "ua.artwork.expositions": [
     "<ul><li><span class='yellow-highlight'>Poésie</span> balistique : Bruxelles (Belgique), La Verrière, 23 avril 2016-02 juillet 2016</li></ul>"
     ]
 },
 "_source": {...}
}

As you can see, you have one field highlighted : it's ua.artwork.expositions. If you want, you may replace the value in .results[0].ua.artwork.expositions by the value in .results[0].highlight."ua.artwork.expositions".

Combining filters and full text searches

Of course you can combining full text searches and filters : curl https://api.navigart.fr/123/artworks?global_query=poesie&filters=authors:MIRRA+Helen↹MIRRA+Helen

Contact us

You may contact us by sending an email to aide@videomuseum.fr