I am using Elasticsearch w/ logstash, currently running .20, but will be
moving to .90 soo.
What is the best means (both in .20 and .90) to search for url matching?
I was using a a match, but it tokenized the query? I want to more like
^/my_url.*. I understand regex/wildards are inefficient searches?
{
"match": {
"@fields.request_uri": {
"query": "/site/api/call_data.json"
}
}
}
I do also have a mapping for the "raw" field (non-analyzed)
I think you'd be better off by defining a custom analyzer, where you'd use
the Pathhierarchy
Tokenizerhttp://www.elasticsearch.org/guide/reference/index-modules/analysis/pathhierarchy-tokenizer/.
This way you'd be able to search for ^/my_url.* by running a simple term
query for "/myurl". That would be faster than the match query, and waay
faster than regex/wildcards, which are indeed slow.
I am using Elasticsearch w/ logstash, currently running .20, but will be
moving to .90 soo.
What is the best means (both in .20 and .90) to search for url matching?
I was using a a match, but it tokenized the query? I want to more like
^/my_url.*. I understand regex/wildards are inefficient searches?
{
"match": {
"@fields.request_uri": {
"query": "/site/api/call_data.json"
}
}
}
I do also have a mapping for the "raw" field (non-analyzed)
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.