Search term highlighting, included categories only, surrounding search term text

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Search term highlighting, included categories only, surrounding search term text

This topic contains 12 replies, has 2 voices, and was last updated by  Ernest Marcinko 1 year, 7 months ago.

Viewing 13 posts - 1 through 13 (of 13 total)
  • Author
    Posts
  • #12254

    Ronnie_Tanner
    Participant

    There are a few kinks I'm wanting to get worked out with the pro version.

    I'm using two different search forms and have highlighting in context turned on for both. When I was using the “Lite” version I recall it working from time to time. In the Pro version, there are times when it will show some text from the content but no highlighting. I'm including a screen shot of my settings.

    – How do I change the vertical height of the drop down showing the results?

    – I have a filter to include only certain categories but had a couple posts showing up that weren't part of that category. I added them to the excluded posts are and that took care of it, but they shouldn't have been showing up in the first place.

    I'm including a screen shot of my settings for including descriptions and surrounding text. It won't allow me to add a second image.

    thank you
    Ronnie

    #12255

    Ronnie_Tanner
    Participant

    I'm adding the two screen shots showing my settings.

    Attachments:
    You must be logged in to view attached files.
    #12258

    Ronnie_Tanner
    Participant

    I've noticed that if I have a post_excerpt it is showing that over and over, even though the search term is not included in the excerpt. If I remove the post_excerpt data, it starts showing some text, but the highlighting is not consistent.

    See attached image showing my settings and the results.

    I'd expect it to show the location of the search term in every result, not just some of them.

    Thank you
    Ronnie

    Attachments:
    You must be logged in to view attached files.
    #12286

    Ernest Marcinko
    Keymaster

    Hi Ronnie,

    My apologies for the late response, this weekend yielded far more emails I was prepared for.

    Context finding and highlight
    The highlighting issue is most likely related to the context depth, which is set to 15000 characters by default. It's a lot, but shortcode tags, empty spaces, HTML tags and other things might be also calculated if present, especially if there are texts are a few pages longer. I see you have set it to 35000, if that doesn't do the trick, you can still increase it. Just in one of the recent releases I improved the context finder function, so I have safely tested the function on an over 1 million characters long text, and it was working without major performance issues.

    Vertical Height calculation and changes
    The height is not an exact value, it's calculated based on items count on vieport, which is set to 4 by default. You can of course change that on the Theme Options -> Vertical results panel: https://i.imgur.com/rvVREf3.png

    If you want a more exact height, it is also possible to change each items height to a fixed value. However the result of that usually is that the context text is cut off because of it. It's also changeable on the same panel: https://i.imgur.com/eXhrDWJ.png

    Categories issue
    Can you please give me an example here? I will cross check it with the configuration. Thank you!

    Best,
    Ernest Marcinko

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


    #12339

    Ronnie_Tanner
    Participant

    Hi Ernest, no problem on the reply. I'm working through these things right now and will get you an example on the category filter.

    Right now I'm trying to figure out why there are instances where highlighting is turned on, with 50,000 characters deep but no highlighting is showing on some of the live results. I've checked those results and there are indeed matches.

    See screen shot attached.

    Attachments:
    You must be logged in to view attached files.
    #12345

    Ernest Marcinko
    Keymaster

    Hi,

    I think the 50000 is still not enough, in some cases I just noticed texts over 90000 characters long. Maybe changing it to maybe 250000 would do the trick.

    Also, can you check the FTP details? I was going to check the context finder in the source, but logging in I can only see lots of directories, but none of them appears to be the WordPress installation. Thank you!

    Best,
    Ernest Marcinko

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


    #12357

    Ronnie_Tanner
    Participant
    You cannot access this content.
    #12358

    Ernest Marcinko
    Keymaster

    Hi Ronnie,

    I see what the problem here is now. Let me explain with your example:

    Searching for 'joel osteen' yielded some results, but there is no highlighting in some. Let's look at the first result, which is this: http://dev.thepathoftruth.com/false-teachers/cindy-trimm.htm
    When I open up that result, the words 'joel osteen' does not appear in this exact order anywhere in the text, therefore the context finder does not find it, it simply returns the beginning of the text as the context. It looks for the exact phrase, not partial, as often time one keyword may be far out of the context of the second (or third etc..).

    The reason I asked for the FTP access, was that I wanted to try a possible modification where the context finder would look for an exact match first, then for a first word match, if no luck. In this case first 'joel osteen', if no context found, looks for 'joel' instead. I've made this modification, did a few tests, and it looks like it's much better, since where the exact phrase is not found, it displays the first keyword context instead. I will definitely include this in the upcoming release, as it seemingly does not hurt the performance, and gives much better context.

    There are however ways you can improve this via configuration (if you want), but they will have a certain effect on your results:

    Alternative Configuration 1
    Enabling exact matches: https://i.imgur.com/qGcS7HT.png
    In this case the keyword logic is neglected, and the plugin will look for exactly matching phrases only. This will also ensure, that the results will always have both (or all) keywords highlighted when matching. Definitely a good choice, since you have a fairly large set of text to look for. It will also yield less results, but more accurate ones.

    Alternative Configuration 2
    Configuring and Using the index table engine.
    This is a more difficult configuration, but the index table offers relevance based on keyword occurence. As you earlier mentioned you would expect some results to be higher, some lower – this will very likely solve that as well, as occurence of keywords is also calculated to relevance weight. This is impossible with the regular engine, the regular post fields are not built for that.

    To properly configure the index table, please use these guides
    Index table introduction
    Generating the index table
    Enabling index table engine

    This alternative would be similar to what you have now, but with a likely better ordering based on relevance. And the index table relevances, you can adjust by manually inputting values, much higher like the ones for the regular engine: https://i.imgur.com/VKBI9pD.png

    I hope this helps!

    Best,
    Ernest Marcinko

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


    #12359

    Ronnie_Tanner
    Participant

    Thanks, that did take care of that problem. I'll look into and consider using the index engine, or using exact match. Right now I have exact match as an option, with it set to unchecked by default.

    Could you take a look at why some 'orphan' results show up when they are not in a selected category?

    Example, I type in “Canada” while only selecting the category 'What the Lord has done with me” but the first couple results are from a page that isn't in that category.

    #12360

    Ernest Marcinko
    Keymaster

    You are very welcome.

    I believe it's because of this option is enabled: https://i.imgur.com/jLLvoIw.png
    So the plugin is allowed to display items which does not relate to the terms selected/unselected. Turning that off will probably solve it.

    Best,
    Ernest Marcinko

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


    #12361

    Ronnie_Tanner
    Participant

    That did it, thanks!

    Okay, things are getting really close to being finished.. a couple more questions.

    1) Is it possible for the search setting selections to stay as they are when a page is refreshed? For example, by default I have several categories pre-selected and give the ability for users to de-select whichever they wish. If they go to a new page, all the options are back selected. I suspect cookies would have to be used to accomplish this. I didn't see anything in the settings.

    I'm not really even sure if that would be ideal but I did have a user ask this question. It's useful when trying to find something in a section and using different keywords. I have the search set to open results in the same window so I could change that to a new window as a suggestion.

    2) Is there a way to replace the default WordPress results page with the results from ASP? In essence a results page with the ability to refresh the results, but on an entire page. Right now I'm using search in the sidebar and it's good for quick access, but would like to limit the results there to say, 5, then use the more results option to redirect to a full page view of ASP results.

    I appreciate the plugin, and the quick responses. I know it's not always possible with the latter.

    Ronnie

    #12362

    Ronnie_Tanner
    Participant

    One other thing. Is it an option to use the index table unless the visitor selects “Exact Match” which would then use the traditional search? That would be a nice option. Seems that would give the best of both worlds.

    #12372

    Ernest Marcinko
    Keymaster

    Hi,

    1. This is not possible without massive modifications, and even then I'm not sure. Back-button actions might not be able to set/get cookies correctly, I'm not sure about that.

    2. Not entirely, but you can enable results override, to display the same results from ajax search pro on the results page: https://goo.gl/a8dJXD

    One other thing. Is it an option to use the index table unless the visitor selects “Exact Match” which would then use the traditional search?
    That is actually how it works. If you have the “Show exact matches” checkbox enabled on the front-end, but the exact matches turned off (and using the index table engine), then whenever the user clicks on that it automatically falls back to the regular engine.

    Best,
    Ernest Marcinko

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


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

The topic ‘Search term highlighting, included categories only, surrounding search term text’ is closed to new replies.