1

Using equiv() on an empty table throws a strange error in vespa.ai 7.99.22:

Could not add an item of type WORD_ALTERNATIVES: Equiv can only have word/int/phrase as children

Definition:

search post {
    document post {
        field description type string {
            indexing: summary | index
            stemming: multiple
        }
    }
    fieldset text {
        fields: description
    }
}

Query (no rows in table post):

curl -s -H "Content-Type: application/json"
    --data '{"yql" : "select * from post where text contains equiv(\"Q123\",\"Q456\");"}'
    http://localhost:8080/search/ | jq .

Result:

{
  "root": {
    "id": "toplevel",
    "relevance": 1,
    "fields": {
      "totalCount": 0
    },
    "errors": [
      {
        "code": 4,
        "summary": "Invalid query parameter",
        "source": "content",
        "message": "Could not add an item of type WORD_ALTERNATIVES: Equiv can only have word/int/phrase as children"
      }
    ]
  }
}

What is the issue?

doublemax
  • 443
  • 1
  • 4
  • 11
  • 1
    I'm guessing this relates to using stemming:multiple for the text field and equiv , if add &tracelevel=9 to the request you'll see the how the query is handled/parsed etc so it's easier to pin point. – Jo Kristian Bergum Sep 11 '19 at 10:30

1 Answers1

4

Using stemming:multiple leads to a WordAlternativesItem which is not a permitted child of EquivItem, so this combination is not supported.

However, we believe this is unnecessarily restrictive. I'ill lift this restriction now, please try again in the next version which should be out on Monday (2019-09-16) if the winds are favourable.

Jon
  • 2,043
  • 11
  • 9