challenge-api
challenge-api copied to clipboard
Search only searching in challenge spec and not title
@rootelement , when we search for a specific term, challenge api returns only when search term is found in the challenge description. It does not consider title. This was working fine before.
Example:

@SathyaJayabal in order to fix/improve our search functionality, can you please create a list of expected search queries and results along with a simple explanation so we can improve our code? Something like:
- Searching for
node APIshould returnImplement an API using NodeJs. Explanation: all query terms are partially present in any order
We need as many use case scenarios as possible so we build a strong searching mechanism.
Might be a question for @Oanh-and-only-Oanh as well.
@SathyaJayabal @Oanh-and-only-Oanh any update here?
@ThomasKranitsas , the basic search which was working before is :
Searching for node API should return challenges which have the words node API either in the title or the description(contest spec).
@Oanh-and-only-Oanh , please add any further requirements.
IMHO, searching for node API should return challenges that:
- have the
node APIin the title (case insensitive) - OR have the
node APIin the description (case insensitive) - OR have the tag
node(partial match - case insensitive) - OR have the tag
API(partial match - case insensitive)
we could make this more advanced by extracting all words in step 1 and use them separately as a query with lower weight so we can also match things like Implement an API using NodeJS (both terms are present but in a different order)
Let me know if we should implement the search this way
I almost think the weight should be:
- Title Exact Match Phrase
- Tag exact match
- Description Exact Match
- Title Fuzzy Match (tokenized)
- Tag Fuzzy
- Description Fuzzy
I agree with @rootelement but as a minimum we'd like it to return challenges which has the search terms either in the title or the description(contest spec).
@rootelement @ThomasKranitsas, when will this fixed be released?
@Oanh-and-only-Oanh there's a PR https://github.com/topcoder-platform/challenge-api/pull/428 for this.
@rootelement should we merge that to prod?
This was pushed to prod earlier today
@ThomasKranitsas, still search does not return the challenge when we search by a word in the challenge title

@ThomasKranitsas , search is now not returning when the search term is found in a tag.
For example, when we click on any of the tags for a challenge in listings page, it doesn't return any results.

cc @luizrrodrigues