challenge-api icon indicating copy to clipboard operation
challenge-api copied to clipboard

Search only searching in challenge spec and not title

Open SathyaJayabal opened this issue 4 years ago • 13 comments
trafficstars

@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: Screenshot 2021-02-23 at 10 51 07 AM Screenshot 2021-02-23 at 10 51 23 AM

SathyaJayabal avatar Feb 23 '21 05:02 SathyaJayabal

@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 API should return Implement 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.

ThomasKranitsas avatar Mar 19 '21 19:03 ThomasKranitsas

Might be a question for @Oanh-and-only-Oanh as well.

rootelement avatar Mar 19 '21 19:03 rootelement

@SathyaJayabal @Oanh-and-only-Oanh any update here?

ThomasKranitsas avatar Mar 22 '21 12:03 ThomasKranitsas

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

SathyaJayabal avatar Mar 22 '21 12:03 SathyaJayabal

IMHO, searching for node API should return challenges that:

  1. have the node API in the title (case insensitive)
  2. OR have the node API in the description (case insensitive)
  3. OR have the tag node (partial match - case insensitive)
  4. 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

ThomasKranitsas avatar Mar 22 '21 12:03 ThomasKranitsas

I almost think the weight should be:

  1. Title Exact Match Phrase
  2. Tag exact match
  3. Description Exact Match
  4. Title Fuzzy Match (tokenized)
  5. Tag Fuzzy
  6. Description Fuzzy

rootelement avatar Mar 22 '21 12:03 rootelement

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

Oanh-and-only-Oanh avatar Mar 22 '21 14:03 Oanh-and-only-Oanh

@rootelement @ThomasKranitsas, when will this fixed be released?

Oanh-and-only-Oanh avatar Jul 12 '21 16:07 Oanh-and-only-Oanh

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

ThomasKranitsas avatar Jul 13 '21 13:07 ThomasKranitsas

This was pushed to prod earlier today

rootelement avatar Jul 13 '21 18:07 rootelement

@ThomasKranitsas, still search does not return the challenge when we search by a word in the challenge title Screenshot 2021-07-16 at 9 42 55 AM Screenshot 2021-07-16 at 9 43 16 AM

SathyaJayabal avatar Jul 16 '21 04:07 SathyaJayabal

@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. Screenshot 2021-09-28 at 11 52 32 AM

SathyaJayabal avatar Sep 28 '21 06:09 SathyaJayabal

cc @luizrrodrigues

SathyaJayabal avatar Sep 28 '21 06:09 SathyaJayabal