Skip to content

Predictive keyword suggestions - sources should be reevaluated after the suggestions loop #194

@ernestmarcinko

Description

@ernestmarcinko

Currently, the plugin loops through all the selected suggestion sources (categories, titles etc..) and grabs the first matching keyword from this list.
The problem is that the list is not re-organized after each source suggestion.

Example issue

There is a category "nsfw'" and a post titled "Woman". User selected post titles and post categories as suggestion in this exact order.

  • User types in "wsfn"
  • The suggestions array will be [woman, nsfw] because post titles were the first in source list
  • Plugin suggest results for the first element, even though the similar_text() function would rank "nsfw" higher

Solution

The list must be reorganized again after the suggestions.

Metadata

Metadata

Labels

bugSomething isn't working

Type

No fields configured for Bug.

Projects

Status
Done

Milestone

Relationships

None yet

Development

No branches or pull requests

Issue actions