Forums Forums Search & Filter Pro Can I combine AND and OR on one form?

Tagged: 

Viewing 10 posts - 1 through 10 (of 11 total)
  • Anonymous
    #226909

    My search results are all AND:

    experience with gene drive = 4
    Experience = 10
    Gene = 381
    Gene experience = 5

    Is there way to have both AND and OR, so:

    Gene AND Experience = 5
    Gene OR Experience = 391

    (using operands maybe? && and || ?)

    Trevor
    #226927

    If you wish to offer the user the option to use either OR or AND, that is not possible. Are you able to send me a live link/URL to your search page so I can take a look and see what fields are in the form?

    Anonymous
    #227144
    This reply has been marked as private.
    Trevor
    #227184

    Thanks for the logins. I can see three fields. Search Text, Date and Category. At the moment you have them set to OR (each selection would therefore increase the results).

    Where do you need the AND (where each selection would narrow the results)?

    Anonymous
    #227218

    How would I perform this search:

    All articles that contain the words “gene” and “drive” plus any articles by author “Tremblay”

    (Gene && Drive) || (Tremblay)

    Trevor
    #227220

    Setting the form to how you have partly does this. Then, install the (free) Relevanssi plugin and set it like this:

    https://www.screencast.com/t/vjsSNzXf8u

    You can get it to search taxonomies as well. You must build the index in Relevanssi.

    Then enable Relevanssi support (the first checkbox) on our Advanced tab.

    Anonymous
    #227277

    I already had the paid Relevansii plugin activated and enabled. (Althought I do not see (in Relevansii) how to set Keyword Matching to “whole words”.)

    Nevertheless, I am still baffled at how to perform the search that combines AND and OR!

    Will I need two different search boxes or can I use operands in the single search box?

    Sorry if I am being thick.

    Trevor
    #227285

    I was hoping you could simply type the two words in, but may they get treated as a phrase. Otherwise, I cannot see how this can be done. We cannot have two search boxes in the form.

    Anonymous
    #227287

    can you suggest anyone that I could hire to create a search feature that looks like this

    https://www.ncbi.nlm.nih.gov/pubmed/advanced

    i.e. generate a search like this: (((Gene) AND Drive) OR Tremblay) AND (“2011″[Date – Publication] : “2014”[Date – Publication])

    Trevor
    #227306

    I am sorry, I cannot. I will ask our developer, Ross, if he has any thoughts.

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