All Low add-ons are now owned by EEHarbor. Read the blog post.

Support archive

Always display search string in excerpt

Marco 10 Oct 2012 09:30 question, complete

Hi!
Thanks for a great plug in! i have it working quite well on a multi language site!
Is is possible to display the specific search string in all excerpts?
Right now, It outputs the first 35 words of the defined excerpt field, and I have styled the search string so that it is highlighted. The problem is that if the search string is not in the first 35 words, it wont display or get highlighted.
Is there a way that I can for example output the first 15 words before and 15 words after the search string?

Thanks!

Replies

  1. Low 10 Oct 2012 09:45

    Hi Marco,

    What version are you on? This was added in 2.0.4:

    Search excerpts now take the position of keywords in it into account


    Caveat here is that the highlighting of keywords is diactitic sensitive.

  2. Marco 10 Oct 2012 10:13

    Thanks!
    I have now upgraded from 2.0.1 to 2.1.0, but now my whole search is broken :/ and my indexes are not rebuilding?

  3. Low 10 Oct 2012 10:14

    Can I take a look? I'll need superAdmin access. You can send login credentials to hi at gotolow dot com.

  4. Marco 10 Oct 2012 10:15

    ahhh...maybe because I am running PHP 5.1.6 ?

  5. Low 10 Oct 2012 10:17

    Ah, yes, that'll do it...

    Any chance you can upgrade to php 5.2+?
    Otherwise you'll need to revert back using a DB backup of at least the Low Search tables.

  6. Low 10 Oct 2012 10:17

    (FYI, the upcoming EE version, 2.6.0, will also require PHP 5.2+)

  7. Marco 10 Oct 2012 10:37

    Ok, I dont have full server rights so unfortunately I can't upgrade it myself. I have re-installed 2.0.1 and restored the table of collections...everything is back to normal now :)
    You said that the feature is in 2.0.4...is that still running on the older PHP version?

    I purchased Low Search from devot-ee.com... but I cant seem to download anything older than 2.1.0. Is it possible to download older versions?

  8. Low 10 Oct 2012 10:42

    Yeah, 2.0.4 should run on PHP 5.1.

    If you send me an email to the address I mentioned above, I can send you a copy.

  9. Marco 10 Oct 2012 11:14

    Thank you again for your help!
    I'll ensure I update to PHP 5.2 asap, but in the mean time 2.0.4 is working great and the search results are much better :)
    nice to always see improvements.