Because the results shown in the ZObjectSelector dropdown in the front-end are paginated, there might be the case in which an exact match doesn't show the correct result.
Steps to reproduce
- Overwrite the object Z3/Key with an object with more keys. For example:
- Go to https://wikifunctions.beta.wmflabs.org/wiki/Special:ApiSandbox#action=wikilambda_edit&format=json&summary=More%20Keys&zid=Z3&zobject={}&token=%2B\
- Paste the following ZObject in the zobject field, generate the token and click "Make request"
{ "Z1K1": "Z2", "Z2K1": { "Z1K1": "Z6", "Z6K1": "Z3" }, "Z2K2": { "Z1K1": "Z4", "Z4K1": "Z3", "Z4K2": [ "Z3", { "Z1K1": "Z3", "Z3K1": "Z4", "Z3K2": "Z3K1", "Z3K3": { "Z1K1": "Z12", "Z12K1": [ "Z11", { "Z1K1": "Z11", "Z11K1": "Z1002", "Z11K2": "value type" } ] } }, { "Z1K1": "Z3", "Z3K1": "Z6", "Z3K2": "Z3K2", "Z3K3": { "Z1K1": "Z12", "Z12K1": [ "Z11", { "Z1K1": "Z11", "Z11K1": "Z1002", "Z11K2": "key id" } ] } }, { "Z1K1": "Z3", "Z3K1": "Z12", "Z3K2": "Z3K3", "Z3K3": { "Z1K1": "Z12", "Z12K1": [ "Z11", { "Z1K1": "Z11", "Z11K1": "Z1002", "Z11K2": "label" } ] } } ], "Z4K3": "Z103" }, "Z2K3": { "Z1K1": "Z12", "Z12K1": [ "Z11", { "Z1K1": "Z11", "Z11K1": "Z1002", "Z11K2": "Key" }, { "Z1K1": "Z11", "Z11K1": "Z1003", "Z11K2": "Clave" }, { "Z1K1": "Z11", "Z11K1": "Z1004", "Z11K2": "Clé" }, { "Z1K1": "Z11", "Z11K1": "Z1430", "Z11K2": "Schlüssel" }, { "Z1K1": "Z11", "Z11K1": "Z1037", "Z11K2": "Chave" }, { "Z1K1": "Z11", "Z11K1": "Z1314", "Z11K2": "Kodea" } ] } }
- Also using the Sandbox, make a call to wikilambdasearch_labels with the exact match "Key" and language "en"
Observed behavior
- The exact match "Key" doesn't appear until the end of the second page.
Expected behavior
- If there's an exact match it should appear the first
- Or there should be some kind of API parameter to determine how the results are being ordered, with an option of "best match"