ringgaard / sling

SLING - A natural language frame semantics parser
Apache License 2.0
154 stars 11 forks source link

Circlip is missing #7

Closed dpriskorn closed 3 years ago

dpriskorn commented 3 years ago

Circlip does not show up in the top of the search results. Skärmbild_2021-03-17_19-12-36 Skärmbild_2021-03-17_19-12-55

ringgaard commented 3 years ago

The screen dump looks like it is showing the results for "cir" instead of "circlip". This could happen if the results for "cir" arrives later than the results for "circlip". I currently don't track the order of the incremental search queries, but it seems like this is needed for this to work robustly over the Internet. I think it is relatively simple to cancel queries in progress before sending a new query. Let me take a look at this and report back.

ringgaard commented 3 years ago

I have changed the browser so pending API queries are cancelled before sending new ones. Please let me know if this fixes the problem for you.

dpriskorn commented 3 years ago

It's fixed now 😃

ringgaard commented 3 years ago

I think I have seen this bug twice after I made the fix, so I am reopening this issue again. Apparently the fix with the Abort controller does not always work.

ringgaard commented 3 years ago

I have changed the approach to avoiding stale query results. I now check that the query for the results matches the current value of the search input box before updating the search list.