Support » Plugin: Relevanssi - A Better Search » inconsistent excerpting, hyphenation the issue?

  • Resolved JCappella

    (@jcappella)



    Mostly things are working very well, with searches returning excerpts with the query highlighted just as I’ve specified in the settings. But there are a few cases in which the results for certain search terms still show just the opening few lines of the page rather than the excerpt with the query highlighted (even though when you click on the result the page itself has the search terms highlighted just as it should).

    Consider this example: A search for “vegetation” returns…

    (1) follwoing excerpt just like I want with the query highlighted: “…in California, the miner must demonstrate that vegetation has been self-sustaining without irrigation for a minimum of two years before security is released; In Washington, the regulatory authority is empowered to deny the release of security until it deems that effective re-vegetation has…”

    (2) this excerpt with the query in it but the query not highlighted (why not?): “…next five years. Environmental protection and reclamation program: Summary of areas disturbed and reclaimed and descriptions of various matters including: waste dump reclamation; re-vegetation; invasive plant management; metal uptake in vegetation; road and watercourse reclamation; existing and proposed Metal Leaching/Acid Rock Drainage (ML/ARD) prevention; control and treatment methods; and drainage…”

    (3) and this result which is not an excerpt showing the query term but rather the first lines of a page where the query term appears: “Although BC’s provincial policy outlines adequate re-vegetation and sediment prevention measures for decommissioning roads, these policies are not legally binding.” (When you click on this result the page does indeed have the search term highlighted there, which is great, but for some reason did not turn it into an excerpt on the results. Here is the sentence on the page that includes the query term: “Although BC’s provincial policy outlines adequate re-vegetation and sediment prevention measures for decommissioning roads, these policies are not legally binding.”)

    Any idea what’s going on here? It appears to me to be about hyphenated words. If the query term is part of a hyphenated term, like ‘re-vegetation,’ then it appears to get highlighted on the page but doesn’t produce an excerpt in the search results unless (1) it also just happens to appear among the first few lines of the page or (2) it happens to appear very close to a non-hyphenated use of the term and then will appear as part of the excerpt.

    Do I have this right? Is there anything to be done about this? i.e. if it’s getting highlighted on the page as part of a hyphenated term, why does that mean no excerpt is generated in the search results and I just get the first lines of the page?

    Thanks!

    https://wordpress.org/plugins/relevanssi/

Viewing 2 replies - 1 through 2 (of 2 total)
  • Plugin Author Mikko Saari

    (@msaari)

    The excerpt highlighting is a bit flaky, and in need of a revamp. Are you using word- or character-based excerpts? The word-based excerpts work more reliably.

    Thanks for your reply so quickly. I am using word-based excerpts. I’ll look forward to the revamp and in the meantime we’ll be fine. Thanks.

Viewing 2 replies - 1 through 2 (of 2 total)
  • The topic ‘inconsistent excerpting, hyphenation the issue?’ is closed to new replies.