Third Light Developer Exchange

Code and templating community forum for developers and software integrators

You are not logged in.

Announcement

If you wish to join the Developer Exchange, please contact your account manager - this is to avoid unnecessary spam in the forums. Many thanks for your understanding.

#1 2016-05-24 18:54:35

moddhayward
Member
Registered: 2016-05-24
Posts: 3

Complex search possibilities

Hi,

Is it possible to combine AND and OR matching in a search?

We are hoping to implement a custom advanced search panel on the home page.  Some of the fields will reference vocabularies where the searcher might want to find a match in several selected categories (OR).  At the same time, they might choose a single keyword or enter a bit of text to match (AND).

i.e. can the advanced search be run to achieve:

      ( field1=cat1 OR field1=cat5 OR field1=cat28 ) AND ( field2=text-to-match)

And if so, can someone give an example!?  :)

Many thanks

Mike

Offline

#2 2016-09-22 14:19:55

thirdlight
Third Light Staff
Registered: 2013-06-06
Posts: 23

Re: Complex search possibilities

Hi Mike,

I think you would have to perform two searches in the API, and manually combine the results (essentially, building a search to send to the JSON API in two separate requests to emulate the logic you've described!).

Best wishes
Michael

Offline

Board footer