Skip to content
This repository was archived by the owner on Mar 12, 2025. It is now read-only.

Search is inconsistent #33

Closed
jmgasper opened this issue Apr 26, 2020 · 5 comments
Closed

Search is inconsistent #33

jmgasper opened this issue Apr 26, 2020 · 5 comments
Assignees

Comments

@jmgasper
Copy link

The search appears inconsistent, in that it's not matching partial words, only whole words.

Working

This search for mobility works and returns the expected project, using an auth token for TonyJ / appirio123 in dev:

https://api.topcoder-dev.com/v5/projects?name=mobility&sort=lastActivityAt&status=active

Screen_Shot_2020-04-27_at_06_59_31

Doesn't work

This search for mobil, which is a substring of mobility does NOT work

Screen_Shot_2020-04-27_at_07_00_31

Expectation

The search should:

  • Be case insensitive (if it isn't already)
  • Match partial strings, not just full words
@rootelement
Copy link
Contributor

@vikasrohit Please check this out. This is to support search in the challenges.topcoder-dev.com UI. Let me know if we're doing something wrong with the way we're searching project names, or if you can get this on the list to fix soon.

@maxceem
Copy link
Contributor

maxceem commented Apr 27, 2020

@rootelement @jmgasper there is support for searching by subwords also, the searching term can be wrapped into asterisks like *mobil*. The next request would find multiple projects

https://api.topcoder-dev.com/v5/projects/?sort=lastActivityAt+desc&perPage=20&page=1&name=*mobil*

@jmgasper
Copy link
Author

@maxceem - I'll let @rootelement decide if we want that to be the default. I don't see any use case where we'd be searching for whole-words only, so it doesn't make sense to have that be the default functionality.

@vikasrohit
Copy link

Thanks @jmgasper for raising the issue and thanks @maxceem for the answer.

@jmgasper @rootelement I am more inclined towards using wild cards while searching the term because that allows us to have both features: matching exact word and matching part of the word. And @jmgasper, I think there are cases where we need to match exact search terms instead of partials and infact we are using that right now in Connect e.g. when you are searching for all projects where a particular member is involved in, in such case you would tend to type the full handle of the member without any other wild cards and if we by default search for partial words, it would result in too many projects (consider a topcoder employee who has all projects access). We can not default to tokenize all possible sub words of a word. We do treat two different words in the search as separate key terms and search results are based on typical search engine algo where you would find projects with both words or single words.
Additionally, you also have option to force the order and presence of all words of a multi word search query by enclosing them in double quotes.
So, IMO, the current behavior is good for multiple use cases, many of which are already working in Connect. So, I would not like to alter this behavior unless we have very strong argument in favor it.

@jmgasper
Copy link
Author

Ok - we'll update the challenge engine UI.

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

4 participants