-
Notifications
You must be signed in to change notification settings - Fork 56
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
Comments
@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 |
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): So I logged it in case we could find a better approach. |
Would quoting the user enter text automatically won't work for you @maxceem ? I mean when user enters |
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. |
@vikasrohit the way you suggested with "" works good for the QA team. So I'm closing this issue for now. |
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:
name
,description
or user name on topOne more example:
taas
returns a lot of projects withtest taas
words https://connect.topcoder-dev.com/projects?keyword=taas&sort=updatedAt%20desc:but if we search
test taas
we would not get them https://connect.topcoder-dev.com/projects?keyword=test%20taas&sort=updatedAt%20desc:when searching by
test taas
I would expect found projects with the direct order of wordtest taas
to be on the top. And they could be followed projects with reverse ordertaas test
or mixed pharses liketest [other words] taas
andtaas [other words] test
.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
The text was updated successfully, but these errors were encountered: