1

YQL (simplified):

select * from sources * where language contains "de" and description contains "computer";

Result (simplified):

{
  "root": {
    ...
    "children": [
      {
        "id": "id:post:post::123",
        "relevance": 0,
        "source": "content",
        "fields": {
          "sddocname": "post",
          "description": "<sep /> coffee machine <hi>de</hi> longhi contains a <hi>computer</hi> <sep />",
        }
      }
    ]
  }
}

How to tell Vespa to create the snippets from "computer" but not from "de"?

doublemax
  • 443
  • 1
  • 4
  • 11

1 Answers1

2

Use the "filter" annotation, https://docs.vespa.ai/documentation/reference/query-language-reference.html. Terms with filter: true will not be highlighted.

select * from sources * where language contains ([{"filter":true}]"de") and description contains "computer";
Jo Kristian Bergum
  • 2,984
  • 5
  • 8