Reply To: Search results with RELEVANCY – Please?

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Search results with RELEVANCY – Please? Reply To: Search results with RELEVANCY – Please?

Ernest Marcinko
Ernest Marcinko


I always appreciate the effort from customers to send me useful suggestions.

As for the first request, it is my main goal to implement in the upcoming 2.0 version. I thought of many possible solutions and my final conclusion are these two:
1. Implement the search “MATCH AGAINST” fulltext search query. It’s very fast, supported by most hosts. The downsides of this solutions are, that it requires to modify the wordpress posts table to add fulltext key pairs, which may cause unforseen consequences and highly not recommended, also it may not work for all users. It’s incredibly fast, but naturally it’s not supported by wordpress database.

2. As you mentioned, adding “weight” aka. priority for each column. I have found some good resources for this solution, however it’s much slower than the first one and requires to properly set the weight for each column.

I’m leaning towards the second option, perhaps the fulltext search will be supported in a future version of wordpress.

As for the second issue, it is already patched in the next release.

I wouldn’t say it’s not possible, however it requires a high level of understanding of javascript. Basically the click event of the link would fill out the search box’s text field. After that, triggering the keyup event on the search box also trigger a search operation. The following script might do that:

  $(document).ready(function() {
    //clicking on links in post content
    $('.post a').click(function(e){
      e.preventDefault();        //prevents redirecting
      var text = $(this).html(); //gets the link text
      $(".orig").val(text);      //sets textbox value to text
      $(".orig").keyup();        //triggers the search

Add this script to the header or the footer of the page and it will probably work (I havent tested it)

  • This reply was modified 10 years, 8 months ago by Ernest Marcinko Ernest Marcinko. Reason: spelling
Ernest Marcinko

If you like my products, don't forget to rate them on codecanyon :)