Hello,
I have simple question about searching on text field.
Let's assume we have a text field message with value: This is example of search query. Can anyone help me?
PUT index
{
"mappings": {
"properties": {
"message" : {
"type" : "text"
}
}
}
}
POST index/_doc
{
"message": "This is example of search query. Can anyone help me?"
}
I'm using standard analyzer. So sentence is tokenized like this:
POST _analyze
{
"text": "This is example of search query. Can anyone help me?",
"analyzer": "standard"
}
I found out that wildcard is possible to apply only on tokenized terms.
Yes. If I recall correctly the Kibana search bar accepts DSL if you have the "Lucene" syntax option enabled - you search string just has to be JSON so starting with a {
KQL and Lucene both support basic phrase queries if you put quotes around words e.g. "this that" but I think only the Lucene syntax supports the slop operator that dictates how many positions apart the words can be e.g. "this that"~2.
Neither of these support the more advanced features interval queries offer e.g. the ability to search for this or that near something else..
Apache, Apache Lucene, Apache Hadoop, Hadoop, HDFS and the yellow elephant
logo are trademarks of the
Apache Software Foundation
in the United States and/or other countries.