tasking-manager icon indicating copy to clipboard operation
tasking-manager copied to clipboard

Create autocomplete project search

Open JorgeMartinezG opened this issue 4 years ago • 7 comments

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

JorgeMartinezG avatar Sep 05 '19 16:09 JorgeMartinezG

  • 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 an OR 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.

thadk avatar Sep 10 '19 22:09 thadk

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:

image

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: image

  • [ ] 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 avatar Sep 20 '19 08:09 thadk

@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:

Screenshot_2019-10-08 HOT Tasking Manager

Some searches works, for example when I type "re"

Screenshot_2019-10-08 HOT Tasking Manager(1)

But if I type "review", it doesn't return anything (both in the autocomplete or in the project search)

Screenshot_2019-10-08 HOT Tasking Manager(3)

willemarcel avatar Oct 08 '19 08:10 willemarcel

@JorgeMartinezG Can you please share the status on this issue? Thank you.

xamanu avatar Dec 12 '19 12:12 xamanu

@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.

thadk avatar Dec 25 '19 13:12 thadk

@JorgeMartinezG What is needed to get this in?

xamanu avatar Mar 12 '20 18:03 xamanu

@JorgeMartinezG @willemarcel - should we recreate this fix in a separate branch?

ramyaragupathy avatar Jun 29 '20 04:06 ramyaragupathy

stale

ramyaragupathy avatar May 01 '24 03:05 ramyaragupathy