Search results with more structure and context
Send metadata such as author, publication date or content type along through the API
This update gives you more control over how search results are presented. You can now send extra metadata through the API, such as author, publication date or content type. You can then show that metadata in the search results, so visitors see more quickly what they have found and why it is relevant.
How to set it up
Step 1: send metadata through the API or the Drupal Search API
Make sure your CMS sends the metadata you want. Use clear system names. We link these to vragen.ai, where they show up as metadata.
Step 2: configure it in vragen.ai
For every new field you send through the API, create a new metadata field in vragen.ai under Settings.
When adding one:
-
Use the system name from the API as the name.
-
Pick the right type, which determines how it is displayed:
-
Text
-
Number
-
Date
-
Boolean (yes/no)
-
-
Add a description if you want.
-
Set a default value for documents without this metadata, if useful.
-
Tick Is multiple when a field can hold several values (multiple authors, for example).
Existing documents don't get metadata retroactively. Start a reindex from the API to add missing metadata. Get in touch if you'd like help with that reindex.
Step 3: show metadata with search results
Go to My integrations and edit the integration you want. Under Semantic search you'll find Search result fields. When this is empty, the default display is used (title and short description).
-
Click Add field to search results.
-
For each field, select the metadata you want and optionally give it a label, for example: Author: [metadata].
-
Put them in the order you want them displayed.
Changes become visible within about 15 minutes.
Step 4: adjust the layout
We use a standard layout. Want something different? You can adjust the display on the website side with custom CSS.
Why this makes a difference
Well-structured search results help visitors understand faster what they are looking at. Metadata such as publication date and author gives context that makes the relevance of a result immediately clear. That is especially valuable for longer content, documents or knowledge articles, where context is the difference between finding and understanding. Exactly what visitors expect from an AI search experience.
This update ties technical improvements to practical readability, so your search function gives more relevant results and shows why something is relevant.