Does not search custom fields (worked well in Lite)

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Does not search custom fields (worked well in Lite)

This topic contains 10 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 1 year, 11 months ago.

Viewing 11 posts - 1 through 11 (of 11 total)
  • Author
    Posts
  • #29846
    Andrew
    Andrew
    Participant

    I love your work and (finally) purchased Ajax Search Pro. Very excited to implement it in different places on my site. However, I’m having an issue currently: the custom fields feature is not working. (General options, Source, section titled “..or search in selected custom fields?”) When I was using the Lite version of the plugin, this was something that worked really well. In fact, I imported those settings when starting to use the Pro version. I’ve also disabled the Lite version, as directed by the Pro plugin.

    Before (when I used the Lite version), the search bar would search among posts (titles and excerpts) and the custom field “wprm_ingredients” (ingredients from the recipe card plugin I use). This was ideal because it would allow for specific ingredients to be searched. However, with Pro, it will not search among ingredients (so, now, the only items that appear are those with the search term in the title or excerpt). Again, searching among the ingredients worked with the Lite version up until I installed the Pro version. The settings for the search were all imported from the Lite version, and I’ve compared the two and the settings they share are identical.

    Also, side note: I noticed that the ajax performance between the Lite and Pro versions is different, with the Pro version taking a noticeable amount of time longer to display results than the Lite version.

    Your help is very much appreciated! Thanks

    #29854
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Thank you for the details!

    Can you please check if the “wprm_igredients” custom field is indeed selected on the General Options -> Sources panel?
    Can you also add temporary back-end and FTP details? I would like to do test searches to see what is exactly happening there.

    Best,
    Ernest Marcinko

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


    #29883
    Andrew
    Andrew
    Participant

    Hi Ernest,

    Thank you for the prompt reply! Yes, the custom field is selected (see attached screenshot).

    I’ll include the login details in a separate, private reply.

    Thanks!
    Andrew

    Attachments:
    You must be logged in to view attached files.
    #29885
    Andrew
    Andrew
    Participant
    You cannot access this content.
    #29887
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Thank you for the details. I logged in to the back-end, and I think I see the issue. Perhaps the post type field was not correctly imported, but currently I am seeing the “Post” custom post type selected, and I believe it should be the “Recipes” instead: https://i.imgur.com/D7b2Ops.png
    Please try changing that option on both search bars, it should very likely resolve the issue.

    Best,
    Ernest Marcinko

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


    #29909
    Andrew
    Andrew
    Participant

    Thanks for checking it out and getting back to me so fast.

    No, unfortunately that’s not the solution. I want it to be “posts” and then be able to restrict by category, especially because I will be using this same bar for other categories. This was actually why I bought the plugin — the Life version was doing such a great job and I wanted to create more search bars just like it but in different categories.

    Anyway, if you’ve identified that the issue is with a bad import then perhaps the solution is to create a new search from scratch (instead of importing from lite)?

    #29910
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    But the “wprm_ingredients” field is not defined with the posts, at least I cannot see any contents associated with that field with the post objects. It is used with the recipes post type for sure, I am seeing associated content there.

    Can you give me a few example phrases I should try, which yielded results in the Lite version, but does not return any results in the Pro? I would like to compare them by searching via both plugins, to see where is the difference in the query, in theory it should be identical.

    Best,
    Ernest Marcinko

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


    #29915
    Andrew
    Andrew
    Participant

    Yes you’re right that the custom type wprm_recipes is typically associated with posts in the category called Recipes. What I meant was that I want to be able to make similar searches (not using the wprm_recipes type necessarily) in different categories. I want to be able to include (other) custom field types in other post categories. Anyway, sorry I wasn’t very clear before 🙂

    An example of a search term that worked great in Lite is “sesame seed.” This pulled up a recipe that didn’t have that in the title, excerpt, etc, but was in the ingredient list. Since switching to pro, it pulls up no results.

    #29916
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Thank you!

    I made a quick test, and I tried the “sesame seed” phrase in both of the plugins, but I am getting the same exact result for both:
    – Pro version: https://i.imgur.com/FYOd401.png
    – Lite version: https://i.imgur.com/L7Y2axB.png

    Can you please check? I might be looking at the wrong search or wrong page.

    Best,
    Ernest Marcinko

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


    #29921
    Andrew
    Andrew
    Participant

    Oh that’s very interesting. Hmmm.

    For the pro version, do you still have the type set to “Recipe (wprm_recipe)” instead of Post? Under source it should just be Post, and under Custom Posts include custom post “wprm_ingredients,” …then on the include/exclude tab make it only for category Recipe.

    #29929
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    No, I used the same exact configuration for both plugins for testing, I didn’t change anything – in both cases the “Post” custom post type was selected, the wprm_ingredients was also selected. I didn’t check the exclusions, but I guess they are the same probably as well, since I didn’t change anything there.

    Best,
    Ernest Marcinko

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


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

You must be logged in to reply to this topic.