Search results with RELEVANCY – Please?

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

This topic contains 5 replies, has 2 voices, and was last updated by Timothy Hall Timothy Hall 10 years, 6 months ago.

Viewing 6 posts - 1 through 6 (of 6 total)
  • Author
    Posts
  • #669
    Timothy Hall
    Timothy Hall
    Participant

    I don’t see any sort-by-relevency option in the search results options.
    Do you have plans to add this anytime soon, or evan at all?
    I sure hope so.

    It sure would be great (if you added this feature) to also give a way to configure how much weight would be given to Page Title / Page Content / Post Title / Post Content / Categories & Tags ‘when determining search results. And maybe even add an indicator (i.e., the count of matches for each found page) with the result list.

    Also, I notice that since I told this plugin to not display images with the results – where I also set the search results thumbnail width to “0” – ‘that there’s a hole where the thumbnail would have appeared, which is a waste of horizontal real-estate.

    The wider green margin on the left is a waste of space.

    One more thing..

    I’m wondering if there’s a way to set text links in a page or post to populate (and return the results in the search results list) on the same page.. for example:

    Ho would I do this..

    I am sorry to have posted three different questions all at once – but I did not want to have to fill in all the same private details three separate times.

    Thanks so much for all your kind help here.

    #670
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    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:

    (function($){
      $(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
        });
      });
    })(jQuery);

    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, 7 months ago by Ernest Marcinko Ernest Marcinko. Reason: spelling
    Best,
    Ernest Marcinko

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


    #672
    Timothy Hall
    Timothy Hall
    Participant

    Thanks for the great response.
    I’m not a JS coder – but I tested the code you sent, placing it at the top of the body part of the page, like this..

    Although it did not throw any errors, It didn’t do anything either.

    The more I think about it though, wouldn’t each link need to be configured differently?
    I mean, I always thought that an OnClick method would have to be inserted in the link’s source; and that there would be some parameter passing to the function. Yes?

    Parameters I would think would need to be passed to the function are..

    1. The exact term(s) to be sent for searching on.
    2. And any additional params needed to turn on/off the search filters (as needed).

    I do not want to suck up your time pursuing this any farther however. And will shelve this idea for now – maybe at some point you can come up with a shortcode that can be inserted in any link’s source, with a method for doing this?

    I really appreciate the time you took to send your last reply to this thread.

    I do have another question – a simpler one to answer..
    ‘Where I have been struggling with some of the CSS around the tools dropdown.

    I want this to be taller, and not require scrolling by the users; since most of my site visitors are older and not sophisticate enough to be able to figure out on their own that the filter list is actually scrollable.

    I have been working with the CSS to try to either make the scroll bar (see screen shot) to remain always visible, or to become visible whenever the mouse pointer enters the inner div that has the text overflow.

    BTW – I already tried this method..

    <pre class=”lang:default decode:true ” title=”Attempted CSS mod to always show the inner scroll bar” >div.categoryfilter {
    overflow-y: scroll !important;
    }

    But it did not work.

    I also tried just increasing the inner div’s vertical height using CSS, with no luck.
    Here are my custom CSS mods from the site’s style.css

    <pre class=”height-set:true nums:true lang:default decode:true ” title=”At the end of the site’s main style.css file – custom mods..” >/* BEGIN Settings for the search tools dropdown */
    div.categoryfilter {
    overflow-y: scroll !important;
    }
    div.categoryfilter div.label {
    font-size: 11px !important;
    line-height: 14px !important;
    text-align: left;
    padding-top: 5px !important;
    }
    div.categoryfilter div.option label {
    width: 14px !important;
    height: 14px !important;
    }
    div#ajaxsearchprosettings1 {
    height: 319px !important;
    background-color: rgba(246, 232, 202, 0.98) !important;
    border: 1px solid #f18d47;
    }
    div#ajaxsearchprosettings1.searchsettings form fieldset legend {
    width: 188px;
    background-color: #EDF0E9;
    padding-top: 10px;
    padding-bottom: 7px;
    margin-left: 5px;
    border-top-left-radius: 0.5em;
    border-top-right-radius: 0.5em;
    border: 1px solid #b2b29f;
    border-bottom: 1px solid #d9c4c4;
    }
    div#ajaxsearchprosettings1.searchsettings form fieldset div.categoryfilter {
    width: 188px;
    margin-left: 5px;
    background-color: #EDF0E9;
    padding-top: 0px;
    padding-bottom: 10px;
    border-top-left-radius:0em;
    border-top-right-radius:0em;
    border-bottom-left-radius: 0.5em;
    border-bottom-right-radius: 0.5em;
    border: 1px solid #b2b29f;
    border-top: 0px solid #b2b29f;
    }
    div#ajaxsearchprosettings1.searchsettings form div.label {
    font-size: 11px !important;
    line-height: 14px !important;
    text-align: left;
    padding-top: 5px !important;
    }
    div#ajaxsearchprosettings1.searchsettings form div.option label {
    width: 14px !important;
    height: 14px !important;
    }
    /* END Settings for the search tools dropdown */

    Maybe you can suggest something?
    And then, I will leave you alone for awhile. LOL

    Thanks again for all your help.

    #673
    Timothy Hall
    Timothy Hall
    Participant

    PS – the above CODE sections did not render properly when I submitted my last response.

    #676
    Timothy Hall
    Timothy Hall
    Participant

    PS – I just temporarily hid most of the categories shown above, and I temporarily shortened it’s vertical height accordingly – which I plan to reveal later, once I am able to show the scroller when the mouse enters the div, or just show it all the time.

    #732
    Timothy Hall
    Timothy Hall
    Participant

    Hi – please forgive my asking again; as I don’t want to be pesky.

    I’m wondering if your v2 has any chance of being ready before the end of the year?
    I am really looking forward to a search capability that works better in presenting search results based on relevancy.

    Would you mind giving me an update, and perhaps a rough estimate for it’s completion?

    Thanks so much.

Viewing 6 posts - 1 through 6 (of 6 total)

You must be logged in to reply to this topic.