Reply To: Returning more than a minimum number of results

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Returning more than a minimum number of results Reply To: Returning more than a minimum number of results

#8965
trw226
trw226
Participant

Thanks, Ernest!

In case it helps, here is one thought on how to potentially implement this. (This is offered very humbly as a brainstorm and you should probably talk to a search expert.)

I think right now when you create an index table, only the posts with a keyword match are captured in the results for that keyword. (This is a first-order result.) However, if at least one first-order result is found, you can use the keywords in the found result(s) to look for matches in the remaining unindexed posts. (These are second-order results.) The algorithm should be recursive until all posts are indexed in a specific order for each keyword.

Example: If I search for lion, and there is only one post for lion, that post is added to the top of the lion keyword index. But if the post for lion also contains the keywords “cat” and “animal”, then the post for tiger, which also contains the words “cat” and “animal” and “zoo”, should be added second to the lion keyword index. If there is a post for a bear, which only has the word “animal” in it, that could be added third to the lion keyword index. Then search the remaining posts for “zoo” (a third-order search), etc.

This would be useful because if I only have one or two post results, the algorithm will highly rank those other posts which have similar tagging to the original results.

If, after that process, some posts remain unindexed, they can be added to the table by default (such as by most recent post), but every post should have a ranking for every keyword in the index. If a user entered a word that is not found in any post, then I think you should just say “no results found” but leave the default ranked results in place.

Separately, (and this is probably a separate feature and way beyond this scope here,) it would be awesome if someday Ajax Search Pro also let you weight the ranking of results based on what frequency of search, and frequency of click-through, rather than just by post date. When people come to my site, I would like to also show some of the most searched-for items in the default result, or the most clicked-on items over the last 3 months, as well as some of the more recent items.

Highest regards,
Tom