query
Replaces main query expression.
Samples
import dev.evo.elasticmagic.SearchQuery
import dev.evo.elasticmagic.aggs.HistogramAgg
import dev.evo.elasticmagic.aggs.TermsAgg
import dev.evo.elasticmagic.doc.Document
import dev.evo.elasticmagic.query.Bool
import dev.evo.elasticmagic.query.FunctionScore
import dev.evo.elasticmagic.query.MatchPhrase
import dev.evo.elasticmagic.query.MultiMatch
import dev.evo.elasticmagic.query.NodeHandle
import dev.evo.elasticmagic.query.QueryExpressionNode
import dev.evo.elasticmagic.query.QueryRescore
import dev.evo.elasticmagic.query.match
import kotlin.random.Random
fun main() {
//sampleStart
searchQuery.query(MultiMatch("system", listOf(UserDoc.name, UserDoc.about)))
searchQuery.query(null)
//sampleEnd
}
See also
Parameters
query
a new query that should replace an existing one.