Does the Kotlin Realm Full Text Search support or?

I’m using the Kotlin SDK for realm. In the docs it mentions that

// Find all frogs with “muppet-” and “rain-” in the physical description
val muppetsInTheRain =
realm.query(“physicalDescription TEXT $0”, “muppet* rain*”).find()

However it does not document a way to search for "muppet* Or rain*

Im just wondering if that is a possibility.

Thanks,

Hi Zach,

You can do that using an OR operator in the query. For example:

// Find all frogs with “muppet-” and “rain-” in the physical description
val muppetsInTheRain =
realm.query(“physicalDescription TEXT $0 OR physicalDescription TEXT $1", "muppet*", "rain*").find()

Let me know if that helps! And there’s more info on how to construct queries on the Realm Query Language (RQL) page.

Thanks,
Cory

1 Like

This topic was automatically closed 5 days after the last reply. New replies are no longer allowed.