Making WordPress.org

Opened 5 years ago

Last modified 3 years ago

#1072 reviewing enhancement

Plugins Directory Search for incomplete names

Reported by: johnpercivalhackworth Owned by: tellyworth
Milestone: Priority: normal
Component: API Keywords:


As a user, if I do a request to the plugins API looking for a plugin, but I don't include the full name of a plugin, but part of it, the API response doesn't include the plugin in the results

Example: if you look for "jetpac", the response returns 0 plugins found:

curl 'https://api.wordpress.org/plugins/info/1.1/?action=query_plugins' -H 'content-type: application/x-www-form-urlencoded' --data 'request%5Bpage%5D=1&request%5Bper_page%5D=24&request%5Bfields%5D%5Bicons%5D=1&request%5Bfields%5D%5Bbanners%5D=1&request%5Bfields%5D%5Bcompatibility%5D=0&request%5Bfields%5D%5Btested%5D=0&request%5Bfields%5D%5Brequires%5D=0&request%5Bfields%5D%5Bsections%5D=0&request%5Bsearch%5D=jetpac' --compressed

It would be much useful if you could search for a subtext, instead of whole words. And would make much easier for the users to find what they are looking for.

Change History (3)

#1 @Otto42
5 years ago

Possibly can be added by using expand_keywords = 1 in our Sphinx configuration. Reference: http://sphinxsearch.com/docs/current/conf-expand-keywords.html

Temporary workaround: Search for "jetpac*" instead. Star expansion is supported in the search engine.

#2 @obenland
3 years ago

  • Owner set to tellyworth
  • Status changed from new to reviewing

#3 @gibrown
3 years ago

Just noting that we should be able to do this on the current Elasticsearch index. There is a field called all_content_en.engram which has all content indexed from the starting letter. There are probably some corner cases, but mostly we can just use that field rather than the main all_content fields when searching from the API.

title and excerpt fields also have engram versions, so we can boost on those.

Note: See TracTickets for help on using tickets.