Explain use of AND logic

This topic contains 7 replies, has 2 voices, and was last updated by

 
Keymaster
5 years, 6 months ago.

Viewing 8 posts - 1 through 8 (of 8 total)
  • Author
    Posts
  • #9371

    Participant

    Please explain exactly how to use the AND logic.The OR logic works but I get no results with multiple keyword when General Options, Keyword Logic is set to AND. I want the logic to work with combining values from custom fields. I have looked all over the help and cannot figure out how to do this.

    #9387

    Hi!

    Here is a good explanation of the logics from the documentation: https://goo.gl/TkGtbt

    In addition:
    The logic applies per object level. Meaning that each separate object is tested individually for every phrase entered. For the regular engine (default) each custom field is a separate object. So the AND logic will not match if one of the phrases matches one custom field only and another phrase matches another custom field.

    To resolve this, the index table was implemented. It basically gathers the selected field into one “text cloud” and counts the occurences and indexes each word individually – but as one single field. Therefore texts from the selected multiple custom fields (and all the other sources) are not distungished from each other.

    For more information about using the index table, you can check this chapter in the documentation: https://goo.gl/ooNYPY

    Best,
    Ernest Marcinko

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


    #9397

    Participant
    You cannot access this content.
    #9403

    Hi!

    The documentation contains all the information step-by-step to configure the index table, that’s why I was referring to it.

    I’m not sure if I can give you more explicit details, without seeing how the configuration looks like. The front-end unfortunately does not show any details from the search process itself for security reasons.

    I need much more information to be able to tell where the problem is.
    – Can you please update your ticket info with log-in and FTP details? It would help me me greatly to check your configuration and make sure there are no errors involved via FTP.
    – Were the custom fields selected on the index table configuration panel to be indexed?
    – Were the content, titles an all the other fields you want to search selected on the index table options?
    – Are the custom fields in question text based, or something more complex – like select boxes, drop-downs or anything other created by ACF? Complex custom fields usually only store reference data, not the actual data, and they are not possible to index.
    – Was the index table created successfully? If so, is the total keywords counter on the top of the page shows an more-less the expected keywords count? If it’s seems too low, it might indicate a problem.

    Best,
    Ernest Marcinko

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


    #9410

    Participant
    You cannot access this content.
    #9425

    Hi!

    Thank you, I did not need the FTP information after all, I found the problem in the configuration.

    On the Index Table options panel the “usp-” custom fields were not selected to be indexed, therefore the plugin was not able to search them. Once selected all the custom fields and generated the index table, I was able to search for the custom field information. You can check the configuration: https://i.imgur.com/ukUCrAh.png

    I was testing on the duplicate search you have created. I’ve changed the keyword logic to “AND”, and it appears to be working correctly now. To test the configuration, I’ve picked a post and searched for “teems short 1362”. It gave me post “Faster” as result, as it is the only one having all 3 of the keywords all in separate custom fields – which is correct.

    The data is stored correctly, it’s cleverly made on the front-end 🙂 I’ve also enabled the cron indexing option on the index table submenu, since adding a post from the front-end might not trigger automatic indexing. This will make sure to pick up new posts hourly even if the submission does not index them.

    Best,
    Ernest Marcinko

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


    #9429

    Participant

    Excellent! Thank you very much.

    #9434

    You are very welcome!

    If you like the plugin, feel free to rate it on your codecanyon downloads page, it’s greatly appreciated 🙂

    If you don’t mind, I will close this topic and mark it as resolved for now, feel free to open another one if you have other issues.

    Best,
    Ernest Marcinko

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


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

The topic ‘Explain use of AND logic’ is closed to new replies.