NO search results after adding additional info into index

Ivory Search Forums Support NO search results after adding additional info into index

Viewing 3 reply threads

You must be logged in to create new topic or reply to the topic.

  • Author
    Posts
    • #21640
      dmitry
      Participant
      • Topics: 1
      • Replies: 1

      I use Ivory search to search in WooCommerce products. I want to add some fields created with Carbon Fields into search index. Because all of them are private meta fields i decided to add content of this field into post content via hook.

      So i added this function:

      add_filter('is_index_post_content', 'crb_add_field_to_search', 10, 2);

      function crb_add_field_to_search($to_index, $post): string
      {
      $to_index .= carbon_get_post_meta($post->ID, 'crb_long_name');
      return $to_index;
      }

      After creating index i can see words from this field in wp_is_inverted_index table. I can find them assosiated with desired product. But search results doesn’t show.

      Attachments:
      You must be logged in to view attached files.
    • #21644
      Ivory Search
      Keymaster
      • Topics: 0
      • Replies: 1,744

      I hope you are well today and thank you for your question.

      By default, the plugin doesn’t search private custom fields.

      You can make it search private hidden custom fields by using the shared small custom plugin or by using the code from it.

      Not able to select custom fields to search

      Best regards,
      Ivory Search Support

    • #21646
      dmitry
      Participant
      • Topics: 1
      • Replies: 1

      This helped! Thank you very much

    • #21664
      Ivory Search
      Keymaster
      • Topics: 0
      • Replies: 1,744

      You are always welcome, I’m glad I was able to help you with this matter. There is no obligation but by your kind words I wonder if I could trouble you to leave a review based on this experience here:

      https://wordpress.org/support/plugin/add-search-to-menu/reviews/?filter=5

      I’d appreciate that. 🙂

      If I can further assist you, please don’t hesitate to ask.

Viewing 3 reply threads

You must be logged in to create new topic or reply to the topic.