Hello,
I'm storing some disk partition names (eg. /, /boot, etc.) into the following field:
"partition": {
"type": "text",
"fields": {
"keyword": {
"type": "keyword",
"ignore_above": 256
}
}
}
On Discover screen, I can search for partition:"/boot", but not partition:"/". Char "/" is not an special char (https://lucene.apache.org/core/2_9_4/queryparsersyntax.html#Escaping%20Special%20Characters ).
Any thought on how I can search for it?
Thanks!
tsullivan
(Tim Sullivan)
May 31, 2018, 8:00pm
2
You probably should just have the partition field mapped as keyword
. I made some sample data like this in 6.2.4 and I can filter for /
in Discover:
My mapping looks like:
{
"partitions": {
"mappings": {
"doc": {
"properties": {
"partition": {
"type": "keyword"
},
...
}
}
}
}
}
Thanks @tsullivan .
I was using Lucene query, partition:"/"
But as you mentioned, using 'keyword' helps to find it in search box: partition.keyword:"/"
system
(system)
Closed
June 29, 2018, 7:02am
4
This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.