You can build a regex. I don't have my environment up to test it, but this should help you get on track:
import com.mongodb._ val regex = languageCodeFilter map ( l => s"(?:.*\\Q$l\\E.*)" ) mkString "|" r val query = QueryBuilder.start("languageCode").regex(regex).get
- How do I write a query for mongodb using the casbah driver for scala that uses a substring and checks if the field is in a list of supplied values?
- How can I view the code that Scala uses to automatically generate the apply function for case classes?
- How to read and write from MongoDb using two different drivers (MongoDB Scala Driver and Salat)
- How to write this for iteration in scala without using the For( loop; if condition) and still use yield properlly
- How do write a date range query in mongodb using reactive mongo in scala
- How to write a toCSV method for scala case class that would generate the csv string for the class?
- How to make $filter operator inside a projection of an aggregation using the MongoDB Scala Driver
- How do I write a JSON Format for an object in the Java library that doesn't have an apply method?
- How to have a Scala standalone application that uses the playframework libraries
- What is the syntax for creating a Map in Scala that uses an enum as a key?
- How to make synchronous queries using MongoDb Scala driver
- Scala - how to get the 'type' for a field using reflection api
- What's the best way using Scala and SBT to create samples for a library that can be built from the SBT CLI?
- how to write insert query for table that contains reference column to another table in play-slick with scala?
- How to Find the maximum consecutive years for each ID using Scala / Spark
- How to make the 'public' schema default in a Scala Play project that uses PostgreSQL?
- how can I write a function in scala called Order that takes one arguement: a list of Ints. And returns the same List of Ints from least to greatest
- How can I decrease the memory heap for my scala project using Sbt?
- How do I get all the keys that are stored in the Cassandra 2.0.1 column family with scala using hector?
- Not Sure How to Write the Implicit for Equality Using Scalaz
- How to debug permgen memory errors for a project that uses sbt and play 2 framework in Scala
- How does one write a scala unit test for the "filter" function?
- The MongoDB Scala binding Casbah query DSL acts strangely with $regex
- How to reflect concrete return types for methods of classes defined at runtime using the Scala ToolBox?
- How to redirect Apache Spark logs from the driver and the slaves to the console of the machine that launchs the Spark job using log4j?
- How to accumulate aggregation results into a collection using MongoDB Scala Driver
- i have wriiten a logout code in welcome.scala.html page but getting errors in that page how can i write the code for it
- How to write a Restful client using the same Interface defined for the server
- How do I write a generic JSON parser in Play 2.7 for Scala that validates inbound requests?
- How do I write a script in Scala that converts the current time to the number of seconds since midnight?
More Query from same tag
- How do I add an XML attribute, or not, depending on an Option?
- scala loan pattern, optional function param
- Iterator of Strings to Inputstream of bytes
- What makes scala.util.matching.regex library different from java.util.regex library?
- isNullOrEmpty function in spark to check column in data frame is null or empty string
- sbt hangs during tests on travis-ci
- Akka Streams + Akka Http Pass parameter through the flow
- System.exit working in "sbt run" but not in .jar
- InheritableThreadLocal value not inherited by ExecutorService threads
- How can I name an aggregate column in spark scala sql instead of default given one?
- Marking primitive types with phantom types in Scala
- Choosing one row using a flag from group by
- How to pivot a table into a timeseries table in Scala
- Why method defined like "cons[B >: A](v: B)" accepts argument of type which is not supertype of A?
- Dependency not available in project
- Scala optimization witth specialized types: sum with longs
- How to check multiple String in a dataset in each row?
- What are the differences between a Scala Future and a Java Future
- transform list inside a dataframe to rows spark scala
- I am using spark version 2.1, I have a few of phone numbers and I need to assign same random number to the similar phone numbers, in scala
- How to inflate pair RDD on the values?
- Scala support in a maven project
- How to substitute actual type arguments in a generic method to obtain final types of its value arguments?
- Effective Exception handling with spark and scala
- How to divide Spark DataFrame one row by its next row value using Scala functions
- Is there special meaning to an underscore (_) in Type Bounds?
- Amazon Kinesis Firehose to S3
- Stuck at "Hello World" with IntelliJ IDEA 9.0.1 for Scala
- Scala: Referencing functions on object instances
- Play Framework: POST request with parameters