Do filters allow IS IN logic?

I’m using instant search and have this structure

My app has a table with a list of students:

Name | List of Majors
Betty | Science, Math
Joe | Science

My index professors has field = major

Major | Professor
Science | Nancy
Math | Mike
English | Pat

I want to do an instant search to return the teachers each student will have

filter Professors Index where major IS IN current_users$list_of_majors

In the examples I’ve seen, filter is on a single value (eg filter field = value). Can I also apply a filter to a list?

So Betty results = Nancy, Mike
So Joe results = Mike

Hi @kramwe

Filters do not have an inclusion syntax per se, but you should be able to achieve the same outcome using OR.

E.g. type:phone AND (color:red OR color:blue OR color:green)

Let us know if you have any further questions!

Okay. Is there any limit to the # of ORs I can do? I may have lists of up to 100.

(Majors was just a easier example to explain)

There is no hard limit on the size of the filters search parameter. Did you get a chance to try it? Let us know how it goes :).

Thanks. I implemented this and it works at the scale of data I have today (which is very small <1000 records with concatenated ORs of <10 in length).

@alexandre.meunier - Do you take feature requests? I’m running into quotation mark headaches with this hack.

The request would be support for a SQL like IN clause

Instead of …

filters: 'productType in ( book, dvd ) and genre: “sci-fi” ’

Ideally if there are quotation marks in the IN statement, they’re ignored.