tasking-manager
tasking-manager copied to clipboard
Create autocomplete project search
This PR closes #1850 . The endpoint returns the project_id
and name
matched given a keyword
How to test: XGET /api/v2/projects/queries/auto-complete/?keyword=colombia
- I think w should add a LIMIT of 6. The query above returns 63 results on the keyword "colombia" but takes 26,060 milliseconds for the June 29 database. With a limit of 6 this drops a lot (as long as it can find 6 results)
- Multi word searches e.g.
Peace Corps
don't seem to return any results. I think we should use anOR
search term between the words just like the search box. Alternatively, you could return the project ID of the matching project in a JSON object with the project name so I can set the search to e.g.#1111
when the project title for#1111
is clicked from the choices. - Partial word searches like
Colom
don't seem to return results yet. See my comment in the issue about:*
and we may have to figure out how translate this into sql-alchemy. - Some of the queries are still taking 23,000 ms when it doesn't have results. I think partial word might help with this somewhat.
I'm still working on the front-end design for this.
Thanks @JorgeMartinezG – mostly looks good. I put my code front-end implementation in this branch too. I just noticed that a search for ts
on the autocomplete returns these strange results:

Also some of the projects it is returning do not necessarily exist when I type the #xxxx
in the search box. #2015
was an example I think.
Here's what my implementation looks like:
- [ ] I think the last step will be to decide when and how to turn off the regular textSearch as both the autocomplete and that might slow each other down.
@thadk @JorgeMartinezG I don't know if something is missing on my environment, but it's not working well. These are the projects I have on my DB:
Some searches works, for example when I type "re"
But if I type "review", it doesn't return anything (both in the autocomplete or in the project search)
@JorgeMartinezG Can you please share the status on this issue? Thank you.
@JorgeMartinezG can you please merge the backend this week so I can make sure there isn't anything weird with the new version of the searchbox before I finish?
Wille might need to update his search index if it seems okay to you.
@JorgeMartinezG What is needed to get this in?
@JorgeMartinezG @willemarcel - should we recreate this fix in a separate branch?
stale