startsWith

fun startsWith(field: String, value: String, ignoreCase: Boolean = false): Condition

Creates a starts-with condition for string fields. Matches documents where the specified field starts with the given prefix.

Return

A new starts-with condition.

Parameters

field

The field name to check.

value

The prefix to match.

ignoreCase

Whether to perform case-insensitive matching. Defaults to false.