Core search and (boolean search with parentheses)

I was testing to find out the limits of the advanced search form. I didn’t see anything in user manual or documentation for Omeka-S. Not sure if it’s any different than Omeka? (I’m not familiar enough to rely on that knowledge though).

Below, my test case shows it doesn’t support (X or Y) AND (A or B). I wasn’t necessarily expecting it to, but anyway trying to determine how the search querystring logic is translated to a SQL query - any pointers? And I’d have to go back to my LIS textbooks to figure out the specific terminology of boolean searching, maybe compound search?

Test case:[0][joiner]=and&property[0][property]=40&property[0][type]=in&property[0][text]=India&property[1][joiner]=or&property[1][property]=40&property[1][type]=in&property[1][text]=UK&property[2][joiner]=and&property[2][property]=7&property[2][type]=eq&property[2][text]=1968&property[3][joiner]=or&property[3][property]=7&property[3][type]=eq&property[3][text]=1991&site_id=&item_set_id[]=&submit=Search

Spatial Coverage contains India
OR Spatial Coverage contains UK
AND Date is exactly 1968
OR Date is exactly 1991

The “boolean” nature of the advanced search is pretty much the same in Classic as S: neither support parentheses or grouping, so the interpretation of mixed AND and OR clauses is based on their order in the query and the standard precedence of AND and OR (AND takes precedent).

1 Like