Skip to content
This repository has been archived by the owner on Sep 5, 2023. It is now read-only.

Disable search as you type: it does not work and causes performance issues on the server #553

Closed
Tracked by #912
stephanegigandet opened this issue Jan 15, 2020 · 4 comments
Assignees
Milestone

Comments

@stephanegigandet
Copy link

The app currently sends a search query to the server for each character typed by the user in the search box:

--- 1579086525 25322 h - map: - graph: - download: page: 1 count:
--- 1579086525 25317 ha - map: - graph: - download: page: 1 count:
--- 1579086525 25294 ham - map: - graph: - download: page: 1 count:
--- 1579086526 25322 hamb - map: - graph: - download: page: 1 count:
--- 1579086526 25302 hambur - map: - graph: - download: page: 1 count:
--- 1579086528 25317 hamburger char - map: - graph: - download: page: 1 count:
--- 1579086528 25302 hamburger charal - map: - graph: - download: page: 1 count:

This does not work: the server does not support searching on parts of words, so the results will be bogus. Plus it makes useless queries to the server.

Please either disable search as you type, or only send a query when the user types a space, so that we have whole words.

@stephanegigandet
Copy link
Author

Plus it actually prevent us from building a useful search as you type feature: if we have only whole queries in the search logs, then we can use them to build a working such as you type feature.

@teolemon teolemon added the P1 label Jan 15, 2020
@chaubss
Copy link
Contributor

chaubss commented Feb 20, 2020

Hi, I would like to work on this issue.

chaubss added a commit to chaubss/openfoodfacts-ios that referenced this issue Feb 20, 2020
@teolemon
Copy link
Member

Hi @chaubss I just assiged the issue to you 👍

@chaubss
Copy link
Contributor

chaubss commented Feb 20, 2020

Thanks, I have made a pull request which fixes this. Could you please review it?

@aleene aleene closed this as completed in bf83cc4 Feb 22, 2020
@aleene aleene added this to the Version 3.4 milestone Jun 14, 2020
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

4 participants