Not able to select custom fields to search

Ivory Search Forums Support Not able to select custom fields to search

Tagged: 

Viewing 6 reply threads

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

  • Author
    Posts
    • #13286
      philgyford
      Participant
      • Topics: 2
      • Replies: 4

      Before using Ivory Search I’d added some code to my functions.php so that I could search Media photos by some custom fields I’d created for them. I think Ivory Search (understandably) overrides that code. This would be OK in theory, because I can ask Ivory Search to search those fields. But I don’t see my custom meta_keys listed in the “Custom Fields” part of the Default Search Form settings. It lists these fields:

      book_byline
      geo_public
      menu_text
      sharing_disabled
      switch_like_status

      But none of the other fields I’ve used on images. Looking into the wp_postmeta table, the meta_keys I’ve used on images all start with an underscore (e.g. _mysite_ref, _mysite_date_taken) – is this why they’re not showing up as options in the form? Is there a way to get them to show up? Thanks.

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

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

      It seems your shared custom fields are private and 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.

      Best regards,
      Ivory Search Support

      Attachments:
      You must be logged in to view attached files.
    • #13377
      philgyford
      Participant
      • Topics: 2
      • Replies: 4

      Thank you so much for this, and apologies for not replying sooner ā€“ I must have missed the notification email.

      Unfortunately, adding that to my functions.php and selecting a single custom field name to search, results in search queries taking around 130 seconds to complete!

      I’m not clear why it takes so long, or if there’s an index I can add to the database that would drastically speed it up. This is the search query (searching for “myterm”):

    • #13378
      philgyford
      Participant
      • Topics: 2
      • Replies: 4

      Hmm, all my SQL etc got stripped out! I’ve tried attaching it as a text file instead…

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

      You don’t need to add the shared custom plugin code in to the functions.php file because you can use it directly by activating it on your website.

      To speed up the search, please build the index from the plugin index option and use the Inverted index search engine in the search form as shown in the below screenshots.

      View post on imgur.com

      View post on imgur.com

    • #13394
      philgyford
      Participant
      • Topics: 2
      • Replies: 4

      Aha, I missed the index entirely!

      I also had to scroll down the “Index” page and, in “Custom Fields” check “Index all custom fields values” before it searched them. It seems to work great now.

      Thank you so much for your help.

    • #13406
      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:

      Click to leave a review

      Iā€™d really appreciate that. šŸ™‚

      And if I can be of any further assistance please don’t hesitate to ask.

Viewing 6 reply threads

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