custom fields in main search box

Home Forums Product Support Forums Ajax Search Pro for WordPress Support custom fields in main search box

This topic contains 25 replies, has 2 voices, and was last updated by Ernest Marcinko Ernest Marcinko 2 years, 1 month ago.

Viewing 15 posts - 1 through 15 (of 26 total)
  • Author
    Posts
  • #36385
    yaron10891
    yaron10891
    Participant

    I have a custom field called country.
    if i select for example France from the drop down:
    see image #1

    i get 33 results of posts that has this value in this custom field.
    but it i put France in the search box i get only 7 and none of them are posts that has france in the country – they are post that has this value in the content
    see image #2

    I use index table and this field is added in the list of custom field the search sould index
    see image #3

    this issue happens also with other custom fields

    Attachments:
    You must be logged in to view attached files.
    #36399
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi!

    Thank you very much for the details, it helped a lot.

    I checked the configuration, and the “country” custom field was not selected in the index table options panel, so I added it: https://i.imgur.com/wLFZAfX.png
    After re-indexing, the results appear to contain the missing items as well.

    Best,
    Ernest Marcinko

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


    #36430
    yaron10891
    yaron10891
    Participant
    You cannot access this content.
    #36438
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

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


    #36447
    yaron10891
    yaron10891
    Participant
    You cannot access this content.
    #36485
    yaron10891
    yaron10891
    Participant
    You cannot access this content.
    #36492
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    Thank you for the details, I had to investigate this further on our local setups.

    Seem like there was something not okay with the ACF label indexing, somehow only the values of the fields were insterted into the databsase. I have made a direct correction to the index table file, searching the fields by their labels should now yield at least the same amount of results for those queries.

    I will include this fix in the upcoming release.

    Best,
    Ernest Marcinko

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


    #36506
    yaron10891
    yaron10891
    Participant
    You cannot access this content.
    #36510
    Ernest Marcinko
    Ernest Marcinko
    Keymaster

    Hi,

    I tested again, but it seems to be all right on our ends regarding the “school” custom field: https://i.imgur.com/DR1nWvF.png

    The partners field values are requested from ACF directly. It is possible, that the ones, which may not have any posts assigned to them may not be returned by ACF yet.
    Another possibility is that ACF simply does not return those choices. It is notoriously hard to get object storage field values correctly via using their API, it is known to them as well.

    If you want, you can add temporary FTP details, and I will try to go through the relevant code, to see if there is any way to get the missing elements somehow programmatically.

    Best,
    Ernest Marcinko

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


    #36515
    yaron10891
    yaron10891
    Participant
    You cannot access this content.
    #36523
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

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


    #36589
    yaron10891
    yaron10891
    Participant
    You cannot access this content.
    #36609
    Ernest Marcinko
    Ernest Marcinko
    Keymaster
    You cannot access this content. Best,
    Ernest Marcinko

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


    #36611
    yaron10891
    yaron10891
    Participant
    You cannot access this content.
    #36732
    yaron10891
    yaron10891
    Participant
    You cannot access this content.
Viewing 15 posts - 1 through 15 (of 26 total)

You must be logged in to reply to this topic.