Problem with custom field search

Home Forums Product Support Forums Ajax Search Pro for WordPress Support Problem with custom field search

This topic contains 25 replies, has 2 voices, and was last updated by shahrooz shahrooz 6 years, 8 months ago.

Viewing 11 posts - 16 through 26 (of 26 total)
  • Author
    Posts
  • #7510
    shahrooz
    shahrooz
    Participant

    It’s disabled now. BTW, the login url was not the same with other WP. Please see FTP LOGIN URL in private section. I think its same with others now.

    Thanks,

    #7511
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    I have found the problem. When I open the “Shoji Door – Kyoto” page in the editor, I noticed that none of the custom fields are defined. No door type, material, brand nor fire rating. When I type in “kyoto” into the search and have everything selected, it wont show up – which is correct, since no custom fields selectors are matching at all – but at least one should from at least one of the groups.

    As a testing I added the “Door type” custom field to the page and set it to “Bifold”, it immediately showed up in the search results.

    All you need to do is add the custom fields to the door page, and it will work.

    Best,
    Ernest Marcinko

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


    #7512
    shahrooz
    shahrooz
    Participant

    Ernest,

    I know its working with custom fields but why it doesn’t show the normal page as result. I need to have this feature to search in title and content because I have to add more than 600 door page and its really hard to define these factors for each door.

    Why it doesn’t search the title and content?

    #7513
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    It does search the title and the content – but the custom field filters must also match. Filters are also part of the search query, it’s their purpose.

    I don’t know if it’s even possible to distinguish between the fields not existing and not matching, as custom field matches are not evaluated one-by-one as it would take much more time for the plugin to process, resulting in really slow responses. ( I know, I tried that solution when designing the plugin)

    Currently not matching means, that the number of matches is compared to the overall selected custom field count if the AND logic is selected, or compared to 0 if the OR logic is selected – it’s very effective and very fast. If the field does not exist it would return 0 as well, which either means it’s not matching or not existing – however in one case the result needs to be discarded, while in the other it needs to be displayed.

    Since you are the first one to face this issue, if you can add FTP access as well, I can try to experiment with a possible solution on your server directly. If I can make it work, I would definitely add it to the upcoming version as well.

    Best,
    Ernest Marcinko

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


    #7520
    shahrooz
    shahrooz
    Participant

    Ernest,

    Thanks for explanation..
    When you login to Admin panel, you have a WPide editor (3 items above Ajax search pro) which gives you access to all files you need to edit. Is that enough for you?

    For now, I’ve changed the search to another one, so you can use a temp page to do the experiments.
    I will enable the security plugin, then you can login from the url i put in ftp field (private) or give me an email, then I will send you the credentials again.
    Please let me know if you need anything else to make it work… it would be good for next update..

    Thanks,

    #7521
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    In the meantime I did some research and I might have found a possible solution 🙂 It looks amazingly simple, it might as well work.

    I’m going to test it as much as I can on my test environment, and then I will add it to your installation as well. The WPide editor should be enough.
    Some time tomorrow I will try to log-in and this modification to your installation as well if it works.
    I will message you here if I have trouble logging in.

    Best,
    Ernest Marcinko

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


    #7522
    shahrooz
    shahrooz
    Participant

    Thanks a lot Ernest,

    I like the way you support your clients.. Keep it up..

    Cheers,

    #7543
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    I believe I have solved the issue. I was able to log back in, and apply the changes on one of the files affected. So far it looks like it’s working on both my test environment and your server as well.

    Currently when checking through the custom field groups, the plugin performs an additional sub-query to see if the given custom field is defined for the actual post/page. If there is no record of the custom field, then the post/page is considered as a potential result. If there is a record of the custom field with the post, then the normal check is performed as before. So it still filters, but only the ones which have the custom fields defined – and leaving the ones without the custom fields defined in the filters.

    Best,
    Ernest Marcinko

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


    #7548
    shahrooz
    shahrooz
    Participant

    Hi Ernest,

    I’ve checked it and seems its working now but with a minor issue. There is a page “Zebra pivot”, it doesn’t come to the result of the one with custom field but it comes to the normal search bar.

    BTW, the functionality is doing right and its searching content and title too.

    Thanks for all helps and efforts.

    #7550
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Just checked the Zebra Pivot page in the editor, it has the custom fields defined, but I guess incorrectly (all is 0): https://i.imgur.com/JPsLUa6.png
    It gets caught in the filter. If you remove or fill the custom fields correctly, it should work as well.

    You are welcome, I’m glad I could help! Let me know if you find any other issues.

    Also, if You like the plugin, feel free to leave a rating on it on your codecanyon downloads page, it’s greatly appreciated.

    Best,
    Ernest Marcinko

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


    #7552
    shahrooz
    shahrooz
    Participant

    Great! Thanks again, I will let you know if I face anything else.

    and.. I reviewed and 5 Starred the plugin long time ago.. it’s one of the best plugins in WP market and best search forever..

    Cheers,

Viewing 11 posts - 16 through 26 (of 26 total)

You must be logged in to reply to this topic.