autocomplete icon indicating copy to clipboard operation
autocomplete copied to clipboard

Search giving wrong results / typing "ama" is interpreted as "amd"

Open wondering639 opened this issue 1 year ago • 1 comments

Description

I created a sample application following on https://www.algolia.com/doc/ui-libraries/autocomplete/integrations/using-react/ When I type "ama" like "Amazon", I only get "AMD" as result, very confusing. see the following video:

wrong_results_codesandbox

Find the sandbox at https://codesandbox.io/p/sandbox/sy2vq6

Reproduction

Find the sandbox at https://codesandbox.io/p/sandbox/sy2vq6 Steps

  1. Create React TS project
  2. install @algolia/autocomplete-js @algolia/autocomplete-plugin-query-suggestions @algolia/autocomplete-plugin-recent-searches @algolia/autocomplete-theme-classic algoliasearch (yes, that might be more packages than needed)
  3. Copy & paste from https://www.algolia.com/doc/ui-libraries/autocomplete/integrations/using-react/ (need to fix one import: import algoliasearch from 'algoliasearch'; had to be changed to import { algoliasearch } from 'algoliasearch';)

Expected behavior

matching search results ;-)

Environment

  • OS: [e.g. Windows / Linux / macOS / iOS / Android] Windows
  • Browser: [e.g. Chrome, Safari] Chrome
  • Autocomplete version:
    "@algolia/autocomplete-js": "^1.17.9",
    "@algolia/autocomplete-plugin-query-suggestions": "^1.17.9",
    "@algolia/autocomplete-plugin-recent-searches": "^1.17.9",
    "@algolia/autocomplete-theme-classic": "^1.17.9",
    "algoliasearch": "^5.19.0",

wondering639 avatar Jan 07 '25 23:01 wondering639

looks like its coming in wrong from the server: request: image reply: image

Doesn't make things less strange though. Note when I continue typing to "amaz", results are then again correct. but not for "ama".

wondering639 avatar Jan 07 '25 23:01 wondering639