2

I'm trying to insert OR statements within some AND statements on my search and am having trouble nailing down the operators I need to use.

What I'm essentially trying to do is state the following (cue the pseudo)

query = "nematode" && (meta_M == "North" || meta_M == "South") && (meta_N == "Category value 1" || meta_N == "Category value 2")

My attempts seem to have been generating wide OR statements which inflates my initial query for nematode (425 results) into 1,000+ results instead of reducing it to a sub-set of the original results.

I've consulted http://docs.funnelback.com/12.0/query_operator.html but just need that final push.

Matt Sheppard
  • 116,545
  • 46
  • 111
  • 131
wardey
  • 169
  • 10

1 Answers1

2

Funnelback's default operator is and, and the mechanism for specifying or (in the underlying query syntax) is to wrap the or options in square brackets. What I think you want to end up with is the following query.

nematode M:[North South] N:["Category value 1" "Category value 2"]

It looks like you're trying to do that with the query broken down into CGI parameters though. Does...

query=nematode&meta_M=%5BNorth%20South%5D&meta_N=%5B%22Category%20value%201%22%20%22Category%20value%202%22%5D%20 
# Note:
#   meta_M decodes to [North South]
#   meta_N decodes to ["Category value 1" "Category value 2"]

...cover what you need, or must each of the meta_M and meta_N values be in separate CGI parameters?

Matt Sheppard
  • 116,545
  • 46
  • 111
  • 131