add is for numeric operations. There is no string concatenation operator in the query builder yet. I’d suggest doing the reverse and parsing the first and last name out of the search term and then using an and operation.
we may also want to add middle name in between which will make complexity higher and produce unwanted result. Secondly search term will not be having complete data.
Better we can have a field in the document as fullName which can be concatenated while saving the data. Which makes everything easy.
But
Should become a priority feature. Along with unnest functionality.
Please file both UNNEST and concatenation requests with specific use case description through the Accounts team. They are on our radar but your request will help with the prioritization.
Say I have .schema.namespace and .schema.class properties on some documents that represent the types they should parse to, and I want to select a particular sub-set of these based on the combination of both fields.
// Kotlin
// compatibleSchemas expressed as `"${namespace}.${class}"`.
val compatibleSchemas = listOf("MyNs.MyClass", "MyNs.MyClass.SubType", "OtherNs.MyClass")
.map { Expression.string(it) }
.toTypedArray()
val schemaExpr = Expression.property(".schema.namespace")
.concat(Expression.string("."))
.concat(Expression.property(".schema.class"))
// in query builder:
...
.where(schemaExpr.in(*compatibleSchemas))
...
This particular example could be done with and and or, but that will not work for large numbers of compatibleSchemas:
Hasn’t made the roadmap yet. You can track it here. Can you provide an example of your use case.
Until then, you will have to use the AND operator to filter the results …