openculinary / knowledge-graph

The RecipeRadar knowledge graph stores and provides access to recipe and ingredient relationship information.
GNU Affero General Public License v3.0
10 stars 0 forks source link

Query-time input terms should be canonicalized #26

Closed jayaddison closed 4 years ago

jayaddison commented 4 years ago

Describe the bug When building search engines it's often important to ensure that indexing-time and query-time tokenization is performed in a similar or identical way.

If we don't do this, then the underlying tokens in the index may not be found at query-time.

During development it was discovered that this may not be occurring for knowledge graph queries.

To Reproduce Steps to reproduce the behavior:

  1. Run a knowledge-graph query against #25 for soymilk - curl -H 'Host: knowledge-graph' -XPOST 192.168.100.1:30080/ingredients/query --data 'descriptions[]=soymilk' | jq
  2. Observe that no results are found:
    {
    "results": {
    "soymilk": null
    }
    }

Expected behavior soy milk should be returned as a match, because it exists in the ingredient hierarchy and is a canonicalization of `soymilk.