Bug Html code included in search results?

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Bug Html code included in search results?

This topic contains 3 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 4 years, 7 months ago.

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #15477
    Nico
    Nico
    Participant

    I made some test.The plugin looks in html tags for is result.Can you explain me that?
    Exemple:
    if a have a page with a comment <!– Lecomte –> -> if I search for Lecomte, the page will be listed..
    if I have a page with the html tags <h2 align=”center> -> if I search for Lecomte, the page will be listed..
    If I have a page with the shortcode [divider_line]) -> if I search for divider_line, the page will be listed..
    ect..

    #15478
    Nico
    Nico
    Participant

    Here’s some sceeenshoots

    Attachments:
    You must be logged in to view attached files.
    #15483
    Nico
    Nico
    Participant

    Others

    Attachments:
    You must be logged in to view attached files.
    #15487
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    It is because WordPress stores HTML data along with post content, and non-executed shortcode content. There is no field that has only the ‘readable’ characters. MySQL (database engine) is however not capable of distinguishing HTML or shortcode text from human readable text, so the query is executed on the content field as if it was all just simple text. There is no way around this, however a possible solution is implemented in the plugin.

    The index table engine allows pre-processing all the post contents, executing shortcodes, stripping any HTML etc.. and then storing all this information in a separate table to search queries. This allows better matching by weight and keyword logic across fields as well.

    For more information please check:

    Best,
    Ernest Marcinko

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


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

You must be logged in to reply to this topic.