in entity-browser-app/src/main/kotlin/jetbrains/xodus/browser/web/search/SearchTerm.kt [132:152]
override fun search(txn: StoreTransaction, entityType: String, entityTypeId: Int): EntityIterable {
val equalityResult = if (value != null) {
val localId = value.toLongOrNull()
txn.fullSearch(entityType, name, value).let {
if (name.isIdProperty && localId != null) {
val entityId = PersistentEntityId(entityTypeId, localId)
it.union(txn.getSingletonIterable(txn.getEntity(entityId)))
} else {
it
}
}
} else {
txn.getAll(entityType).minus(txn.findWithProp(entityType, name))
}
return if (equals) {
equalityResult
} else {
txn.getAll(entityType).minus(equalityResult)
}
}