Remove not needed records from Index Table

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Remove not needed records from Index Table

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

Viewing 4 posts - 1 through 4 (of 4 total)
  • Author
    Posts
  • #13956
    warrior7089
    warrior7089
    Participant

    Hi,
    I would like the index table to contain only records relevant to woocommerce products.
    How to achieve that?
    I’ve looked at the table contents and there are not needed html classes names in term column.
    Have not changed the default settings:
    Index titles, excerpt and content is on
    Thanks in advance.

    #13959
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    Before any of the fields is split up to keywords, it goes through a very long pre-processing method, which removes any suspicios characters, tags, deals with shortcodes as well as HTML tags. In fact, there are two methods applied to the content, stripping down HTML tags, perserving as much relevant content as possible – this should prevent any HTML related content from appearing within the database.

    Problems however may arise when there are any unclosed or unconventional tags, which may be hard to deal with. Changing the options will very likely not help in this case.
    I’ve put however a filter just before the content is tokenized, so additional functions can be applied before the indexing process. You could try placing this function to the functions.php file in your active theme directory (copy from line 3):

    Make sure to re-create the index after this code is applied. This code will forcefully strip any HTML tags before the tokenization process, using the PHP built in strip_tags() function.

    IMPORTANT: Before making any direct changes in your site files, please make sure you have a back-up of everything. To edit the files, I highly recommend using an (s)FTP client, instead of the internal file editor in WordPress – as any tiny mistake there can potentially lead to a site error.

    Best,
    Ernest Marcinko

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


    #13982
    warrior7089
    warrior7089
    Participant

    Hi, Ernest.
    Thanks a lot for your support explanation.
    So it safe to delete index table contents completely? Then ill add this code and recreate the index?
    Thanks in advance.

    #13983
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    Sure of course! If you click on the ‘Create new index’ button, the plugin always deletes all the records before starting re-creating it 🙂

    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.