dgraph-io / dgraph

The high-performance database for modern applications
https://dgraph.io
Other
20.37k stars 1.5k forks source link

Cannot do equality query with term tokenizer #1737

Closed pawanrawal closed 6 years ago

pawanrawal commented 6 years ago

If you have term tokenizer and you try to use eq function

{
  bladerunner(func: eq(name@en, "Blade Runner")) {
    uid
    name@en
    initial_release_date
    netflix_id
  }
}

An error is returned

{
  "errors": [
    {
      "code": "ErrorInvalidRequest",
      "message": ": Attribute name does not have a valid tokenizer."
    }
  ],
  "data": null
}

This seems to work if the argument for eq produces just 1 token (i.e. if its a string without any space)

janardhan1993 commented 6 years ago

Fixed in master