Get WPFTS Pro today with 25% discount!

No valid search resulds, whats wrong?


  • Hello,

    i have some problems running the WP Fast Total Search plugin successfully.

    I have a wordpress site with PODS plugin, which adds some custom entities and custom fields. At first it looks really good, because all the posts are getting indexed. When using the Sandbox tools i can confirm my example post with ID 11802 is getting index. When searching something which is inside the "0" field of that post, it won't return any relevant results. Why is this?

    I attached a screen cap video to show you everything. https://youtu.be/jbkO1a2N6qc

    best Regards


  • Hi,

    i would love to get an answer to that. Am i using the plugin wrong and assuming a functionality it does not have? If you need any additional info about the system please let me know.

    Best Regards


  • Hi @stark

    Thank you for the question!

    I think you know how to deal with PODS custom meta fields because I see that you have created clusters with data in the index, and I think it was achieved by the custom code. That's 80% of the job!

    As I can see your post records are searchable in the Sandbox by words from the "0" cluster (the custom metafield).

    The only problem is you can not get your custom posts shown in the search results on the front page.

    This may be caused by a hook in your theme or custom code that intercepts pre_get_posts or another hook related to WP_Query and adds additional filtering to posts either at the input parameter level (for example, it allows searching only posts with post_type = post, page; or adds additional WHERE conditions directly to the query that is formed in WP_Query). I would advise you to review the code of your custom plugins and theme for such hooks. I also recommended that you disable all plugins that may be related to search for testing. For example, Elastic Press.
    We are not very familiar with the functionality of PODS, it is obviously similar to the ACF plugin in the database, but it probably also adds some conditions to the search.

    The presence of a conflicting hook may also be indicated by the fact that in analytics all queries show either 0 or -1 results, which is incorrect information.

    By the way, could you click on any of the rows in the analytics table and see the query details? That might give us a clue as to why this is happening.

    Also, give me some time - I need to see if The7 theme conflicts with WPFTS.

    Thanks! Let me know if any of the above tips helped you.


  • Hi,

    thanks for your answer. I will check out everything you just said and will come back with the results.

    @EpsilonAdmin said in No valid search resulds, whats wrong?:

    As I can see your post records are searchable in the Sandbox by words from the "0" cluster (the custom metafield).

    I'm not sure if this is correct. Please have a close look @ 00:49 (https://youtu.be/jbkO1a2N6qc?t=49) and notice there are results, but every results has 80% relevance and none of the top results have the searched word inside. There should be the post with ID 11802 in the top result.

    Best Regards


  • Hi @stark

    Could you test posts 22515 and 11804 on the first tab of the Sandbox? I am curious which data were indexed in those posts, may be the SAME data was indexed for all those posts. The same relevance ratio (80%) is very less probably for such amount of posts.

    Also I would see the code you are used to put meta fields to the index. Could you share?

    Thanks!


  • @EpsilonAdmin

    Hi,

    This was a very good idea. We noticed that the indexed words are the same for all indexed posts. However, each post actually contains different text. Could this be a problem with the indexing? Any idea how to fix?

    I will come back later with the shared code, since our developer is not available right now.

    Best Regards


  • Hi @stark

    Yes, as soon as you can show me your custom code for wpfts_index_post hook I think we can detect a problem and fix it.

    Thanks!


  • @EpsilonAdmin

    Hi,

    i just received information, that there is no additional custom code in our wordpress installation regarding the WPFTS plugin. The wpfts_index_post hook has not been added anywhere. I also confirmed that via a search on the filesystem itself.

    root@ubuntu-32gb-nbg1-6:/var/www/html# grep -ir "wpfts_index_post" *
    wp-content/plugins/fulltext-search/languages/fulltext-search-uk.po:"for example, when you changed custom <b>wpfts_index_post</b> filter function."
    wp-content/plugins/fulltext-search/languages/fulltext-search-uk.po:"which you can define using <b>wpfts_index_post</b> filter). You can assign "
    wp-content/plugins/fulltext-search/languages/fulltext-search-uk.po:"a custom hook <code>wpfts_index_post</code>. Enter the ID of any WordPress "
    wp-content/plugins/fulltext-search/languages/fulltext-search-uk.po:"wpfts_index_post</code> hook, then this time only the Titles and the main "
    wp-content/plugins/fulltext-search/languages/fulltext-search.pot:"which you can define using <b>wpfts_index_post</b> filter). You can assign "
    wp-content/plugins/fulltext-search/languages/fulltext-search.pot:"<code>wpfts_index_post</code> hook, then this time only the Titles and the "
    wp-content/plugins/fulltext-search/languages/fulltext-search.pot:"<code>wpfts_index_post</code> hook, then this time only the Titles and the "
    wp-content/plugins/fulltext-search/languages/fulltext-search.pot:"a custom hook <code>wpfts_index_post</code>. Enter the ID of any WordPress "
    wp-content/plugins/fulltext-search/languages/fulltext-search.pot:"for example, when you changed custom <b>wpfts_index_post</b> filter function."
    grep: wp-content/plugins/fulltext-search/languages/fulltext-search-ru_RU.mo: binary file matches
    wp-content/plugins/fulltext-search/languages/fulltext-search-es_ES.po:"for example, when you changed custom <b>wpfts_index_post</b> filter function."
    wp-content/plugins/fulltext-search/languages/fulltext-search-es_ES.po:"which you can define using <b>wpfts_index_post</b> filter). You can assign "
    wp-content/plugins/fulltext-search/languages/fulltext-search-es_ES.po:"a custom hook <code>wpfts_index_post</code>. Enter the ID of any WordPress "
    wp-content/plugins/fulltext-search/languages/fulltext-search-es_ES.po:"wpfts_index_post</code> hook, then this time only the Titles and the main "
    grep: wp-content/plugins/fulltext-search/languages/fulltext-search-de_DE.mo: binary file matches
    wp-content/plugins/fulltext-search/languages/fulltext-search-ru_RU.po:"for example, when you changed custom <b>wpfts_index_post</b> filter function."
    wp-content/plugins/fulltext-search/languages/fulltext-search-ru_RU.po:"например, если вы изменили обработчик хука <b>wpfts_index_post</b>. Помните, "
    wp-content/plugins/fulltext-search/languages/fulltext-search-ru_RU.po:"which you can define using <b>wpfts_index_post</b> filter). You can assign "
    wp-content/plugins/fulltext-search/languages/fulltext-search-ru_RU.po:"которую вы можете задать с помощью фильтра <b>wpfts_index_post</b>). Вы "
    wp-content/plugins/fulltext-search/languages/fulltext-search-ru_RU.po:"a custom hook <code>wpfts_index_post</code>. Enter the ID of any WordPress "
    wp-content/plugins/fulltext-search/languages/fulltext-search-ru_RU.po:"фильтров, включая хук <code>wpfts_index_post</code>. Укажите ID любой "
    wp-content/plugins/fulltext-search/languages/fulltext-search-ru_RU.po:"wpfts_index_post</code> hook, then this time only the Titles and the main "
    wp-content/plugins/fulltext-search/languages/fulltext-search-ru_RU.po:"создавали свой хук <code>wpfts_index_post</code>, в этот раз будут "
    grep: wp-content/plugins/fulltext-search/languages/fulltext-search-de_DE_formal.mo: binary file matches
    wp-content/plugins/fulltext-search/languages/fulltext-search-de_DE_formal.po:"for example, when you changed custom <b>wpfts_index_post</b> filter function."
    wp-content/plugins/fulltext-search/languages/fulltext-search-de_DE_formal.po:"wpfts_index_post</b> Filterfunktion geändert haben. Bitte denken Sie daran, "
    wp-content/plugins/fulltext-search/languages/fulltext-search-de_DE_formal.po:"which you can define using <b>wpfts_index_post</b> filter). You can assign "
    wp-content/plugins/fulltext-search/languages/fulltext-search-de_DE_formal.po:"des  <b>wpfts_index_post</b> Filters festlegen können). Sie können jeder "
    wp-content/plugins/fulltext-search/languages/fulltext-search-de_DE_formal.po:"a custom hook <code>wpfts_index_post</code>. Enter the ID of any WordPress "
    wp-content/plugins/fulltext-search/languages/fulltext-search-de_DE_formal.po:"wpfts_index_post</code>. Geben Sie die ID irgendeines WordPress-Beitrages "
    wp-content/plugins/fulltext-search/languages/fulltext-search-de_DE_formal.po:"wpfts_index_post</code> hook, then this time only the Titles and the main "
    wp-content/plugins/fulltext-search/languages/fulltext-search-de_DE_formal.po:"eigenen <code>wpfts_index_post</code> Hook installiert haben, dann werden "
    wp-content/plugins/fulltext-search/languages/fulltext-search-de_DE.po:"for example, when you changed custom <b>wpfts_index_post</b> filter function."
    wp-content/plugins/fulltext-search/languages/fulltext-search-de_DE.po:"wpfts_index_post</b> Filterfunktion geändert hast. Bitte denke daran, dass "
    wp-content/plugins/fulltext-search/languages/fulltext-search-de_DE.po:"which you can define using <b>wpfts_index_post</b> filter). You can assign "
    wp-content/plugins/fulltext-search/languages/fulltext-search-de_DE.po:" <b>wpfts_index_post</b> Filters festlegen kannst). Du kannst jeder Gruppe "
    wp-content/plugins/fulltext-search/languages/fulltext-search-de_DE.po:"a custom hook <code>wpfts_index_post</code>. Enter the ID of any WordPress "
    wp-content/plugins/fulltext-search/languages/fulltext-search-de_DE.po:"wpfts_index_post</code>. Gib die ID irgendeines WordPress-Beitrages ein, um "
    wp-content/plugins/fulltext-search/languages/fulltext-search-de_DE.po:"wpfts_index_post</code> hook, then this time only the Titles and the main "
    wp-content/plugins/fulltext-search/languages/fulltext-search-de_DE.po:"<code>wpfts_index_post</code> Hook installiert habst, dann werden jetzt nur "
    wp-content/plugins/fulltext-search/languages/fulltext-search-uk_UA.po:"for example, when you changed custom <b>wpfts_index_post</b> filter function."
    wp-content/plugins/fulltext-search/languages/fulltext-search-uk_UA.po:"which you can define using <b>wpfts_index_post</b> filter). You can assign "
    wp-content/plugins/fulltext-search/languages/fulltext-search-uk_UA.po:"a custom hook <code>wpfts_index_post</code>. Enter the ID of any WordPress "
    wp-content/plugins/fulltext-search/languages/fulltext-search-uk_UA.po:"wpfts_index_post</code> hook, then this time only the Titles and the main "
    wp-content/plugins/fulltext-search/admin/admin_page.php:                <p>If you didn’t install WPFTS Add-ons and didn’t set up your own <code>wpfts_index_post</code> hook, then this time only the Titles and the main Content of the publications will be included in the index. If you want other data to participate in the search (such as <b>post meta data</b>), now is the time to read the %1s WPFTS Documentation %2s and make the necessary changes.</p>
    wp-content/plugins/fulltext-search/admin/templates/blocks/step3_relevance_box.php:                                      <p class="text-secondary"><i><?php echo wp_kses(__('"Cluster" is a part of post (either title, content or even specific part which you can define using <b>wpfts_index_post</b> filter). You can assign some relevance weight to each of them.', 'fulltext-search'), array('b' => array())); ?></i></p>
    wp-content/plugins/fulltext-search/admin/templates/blocks/control_box.php:                                      <p class="text-secondary"><i><?php echo wp_kses(sprintf(__('Use this button when you need to completely rebuild search index database, for example, when you changed custom <b>wpfts_index_post</b> filter function. Remember that this operation could take a long time. Please refer for %1s documentation %2s for more information.', 'fulltext-search'), '<a href="'.esc_url($wpfts_core->_wpfts_domain.$wpfts_core->_documentation_link).'" target="_blank">', '</a>'), array('b' => array(), 'a' => array('href' => array(), 'target' => array()))); ?></i></p>
    wp-content/plugins/fulltext-search/admin/templates/blocks/index_engine_tester.php:                      <p><?php echo wp_kses(__('Before the data from your posts (pages, meta-fields, etc.) gets into the Search Index, they go through a number of built-in WPFTS filters, including a custom hook <code>wpfts_index_post</code>. Enter the ID of any WordPress record to see what data will come to the Search Index.', 'fulltext-search'), array('code' => array())); ?></p>
    wp-content/plugins/fulltext-search/includes/wpfts_core.php:             do_action('wpfts_index_post_start', $this, $post, $is_refresh_raw_cache);
    wp-content/plugins/fulltext-search/includes/wpfts_core.php:             $chunks = apply_filters('wpfts_index_post', $chunks, $post, $is_refresh_raw_cache);
    wp-content/plugins/fulltext-search/includes/wpfts_core.php:             $chunks = apply_filters('wpfts_index_post_finish', $chunks, $post, $this);
    wp-content/plugins/fulltext-search/includes/wpfts_core.php:             do_action('wpfts_index_post_start', $this, $post, $is_refresh_raw_cache);
    wp-content/plugins/fulltext-search/includes/wpfts_core.php:             $chunks = apply_filters('wpfts_index_post', $chunks, $post, $is_refresh_raw_cache);
    wp-content/plugins/fulltext-search/includes/wpfts_core.php:             $chunks = apply_filters('wpfts_index_post_finish', $chunks, $post, $this);
    root@ubuntu-32gb-nbg1-6:/var/www/html#
    
    

    It seems the index which has been built just built "out of the box". Any ideas? If you need any additional info, please let me know.

    Best Regards

Suggested Topics

Be the first to read the news!

We are always improving our products, adding new functions and fixes. Subscribe now to be the first to get the updates and stay informed about our sales! We are not spammy. Seriously.

Join Us Now!

We are a professional IT-team. Many of us have been working in a Web IT field for more than 10 years. Our advanced experience of software development has been employed in the creation of the WordPress FullText Search plugin. All solutions implemented into the plugin have been used for 5 or more years in over 60 different web-projects.

We are looking forward to your comments, requests and suggestions in relation to the current plugin and future updates.

ewm-logo-450

The forum powered by NodeBB | Contributors