Skip to content

Searching projects with space does't sort results in expected way #645

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
maxceem opened this issue Mar 16, 2021 · 5 comments
Closed

Searching projects with space does't sort results in expected way #645

maxceem opened this issue Mar 16, 2021 · 5 comments
Milestone

Comments

@maxceem
Copy link
Contributor

maxceem commented Mar 16, 2021

We come across this issue when using Projects API in TaaS App topcoder-archive/topcoder-platform-taas-app#37 (comment)

But it can be also reproduced in Connect App:

  • what I'm expecting is to have projects which has both words in name, description or user name on top
  • but instead, I'm getting a mix of results with only one of these words present

image

One more example:

Here is the code which builds the search requests to the ES https://github.com/topcoder-platform/tc-project-service/blob/develop/src/routes/projects/list.js#L73

@maxceem maxceem changed the title Searching projects with space giving some irrelevant results Searching projects with space does't sort results in expected way Mar 16, 2021
@vikasrohit
Copy link

@maxceem I don't think it is easy to achieve what we are required here because it might mess up the existing working searches for users. Do you think we have any good solution for this in ES?

However, I do know that we can force the combination of words to be searched in order and in fact it is already supported. https://connect.topcoder-dev.com/projects?keyword=%22test%20taas%22&sort=updatedAt%20desc You have to pass the keywords in quotes and you can force them in order. however it won't search the reverse order by default and that is what I am concerned above when I said it is not easy without effecting existing queries.
Personally, I never need such generic search because it most of the time confuses with results and it is always better to have predictable results. In your examples above test taas returns projects which have any of these keywords, however, because test is present in many of projects, you don't see the taas projects in first page.

@maxceem
Copy link
Contributor Author

maxceem commented Mar 16, 2021

I agree that it's most likely not easy to achieve. The reason why I logged this issue is that during the QA of the TaaS App such behavior of Projects API was not expected by the QA team topcoder-archive/topcoder-platform-taas-app#37 (comment):

image

So I logged it in case we could find a better approach.
At the moment the team of the Topcoder Challenge API is working on improving the search feature there. Maybe we can wait for them, and see what results they could achieve there and see if we could incorporate similar improvements in Projects API after.

@vikasrohit
Copy link

Would quoting the user enter text automatically won't work for you @maxceem ? I mean when user enters TAAS PROJECT SAAR you pass "TAAS PROJECT SAAR"?

@maxceem
Copy link
Contributor Author

maxceem commented Mar 18, 2021

Great suggestion @vikasrohit I would update the logic to use quotes during searching and would ask QA team for the feedback if they see any drawback of such an approach.

@maxceem
Copy link
Contributor Author

maxceem commented Mar 19, 2021

@vikasrohit the way you suggested with "" works good for the QA team. So I'm closing this issue for now.

@maxceem maxceem closed this as completed Mar 19, 2021
@drasticdpk drasticdpk added this to the 3.4.0 milestone May 25, 2021
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants