How to force description as text snippet in search results


I’m integrating YaCy via the JSON-API to list search results on the webpage. So far it is working fine, but the text snippet is not always very helpful. Is there a way to always use the text extracted from the meta-Tag of the crawled page?

I found it as “dc:description” in every document. But how to get it to the result listing?

The snippet should always document where the searched word appears in the document. If dc:document does not contain it, then it’s wrong. What then?

I could solve this by using the Solr API as described here: Dev:APISolrSelect – YaCyWiki

Then modified the parameters to &hl=true&hl.fragsize=220&

So only description_txt will be used for the snippet.