WordPress.org

Making WordPress.org

Opened 4 years ago

Last modified 3 years ago

#2416 new enhancement

Plugin Search Should Autocorrect when few results

Reported by: gibrown Owned by:
Milestone: Improved Search Priority: normal
Component: Plugin Directory Keywords: ux-feedback needs-patch
Cc:

Description

Although the work in #1692 has improved search results for most queries, it does not do well when the user makes a mistake or if the user is looking for something that simply does not exist.

Based on evaluations of queries from logs I see:

  • top 1000 queries have 4.2% of all queries getting zero results
  • random 1k queries from the top 100k: 5% getting no results
  • random 1k queries from the bottom 400k: 32% getting no results

Based on the previous analysis of these queries I estimate that overall 18% of all queries will get no results. Also, 35-40% of all queries will get less than 5 results.

Based on those numbers, implementing some sort of "Did You Mean" UI when there are less than 5 results seems like it would improve the user experience.

I think there are four cases to consider given that a user searches for "abc" and our suggester suggests "XYZ":

  1. Zero results: Show a "No results message". Then show results for "XYZ" (hopefully it will have results)
  2. <5 results: Show the 1-4 results for "abc" and after those results show the results for "XYZ". Link to "XYZ" and "XYZ" paging.
  3. >= 5 results and we got a suggestion. Show the results we got, but provide a link to go to "XYZ" results.
  4. >= 5 results and no suggestions. Show results for "abc" as we currently are.

We could use some mockups of what this should look like.

Based on looking at failing queries I see a number of patterns:

  • Lots of misspellings or slight typos. We should try and detect them and correct them
  • Lots of cases where the user is searching for a particular plugin that is not in the repo
  • Lots of cases where adding a space within a term would allow the query to match something
  • "woo commerce" no longer matches. Indicative of lots of potential cases where a misspelling prevents the user from finding what they are looking for.

I've only briefly experimented with implementing the suggestions by using the Elasticsearch term suggester like so:

  "suggest" : {
    "text" : "week calemdar",
    "term" : {
      "phrase" : {
        "field" : "content_en",
        "size" : 1
      }
    }
  }

Gives results of:

  "suggest": {
    "term": [
      {
        "text": "week calemdar",
        "offset": 0,
        "length": 13,
        "options": [
          {
            "text": "week calendar",
            "score": 0.0005956095
          }
        ]
      }
    ]
  }

A lot more testing of the backend is needed, and there are other methods for creating ES suggestions that we have not experimented with yet.

Change History (6)

This ticket was mentioned in Slack in #meta by gibrown. View the logs.


4 years ago

#2 @jorbin
4 years ago

Welcome to the WordPress meta trac @gibrown.

I also think it could be useful to link to the general search https://wordpress.org/search/Sam+Sidler gives me useful information while https://wordpress.org/plugins/search/sam+sidler/ does not.

#3 @gibrown
4 years ago

Or just show those results if we think that's important.

I'm doubtful there are very many end users actually searching for a user's name though. But there are lots and lots who can't type or spell.

#4 @jorbin
4 years ago

I mostly worry about people accidently searching for something that they would find in the codex or developer.wordpress.org, though I'm sure the data that you see on search will be able to truly inform the decision making process here.

#5 @lukecavanagh
4 years ago

Another valid result where nothing found is.

https://wordpress.org/plugins/search/formidableforms/

Last edited 4 years ago by lukecavanagh (previous) (diff)

#6 in reply to: ↑ description @SergeyBiryukov
3 years ago

  • Milestone changed from Plugin Directory v3 - Future to Improved Search

Replying to gibrown:

Based on those numbers, implementing some sort of "Did You Mean" UI when there are less than 5 results seems like it would improve the user experience.

It would also be helpful not just for less than 5 results, but for some popular typos as well.

@sevlad has reported that https://wordpress.org/plugins/search/woocomerce doesn't return the expected results ("WooCommerce" should come first).

It took me a while to notice the typo (woocomerce vs. woocommerce). The latter does return the expected results, while the former mostly returns 7 pages of plugins with a typo in their title or description.

It would be helpful if the directory asked: "Did you mean woocommerce?"

Note: See TracTickets for help on using tickets.