Best Query for URLs

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)

Thanks!

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

Hello,

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.

Best regards,
Radu

http://sematext.com/ -- ElasticSearch -- Solr -- Lucene

On Thu, May 9, 2013 at 4:40 PM, Kubes philip@freepricealerts.com wrote:

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)

Thanks!

--
You received this message because you are subscribed to the Google Groups
"elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an
email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.

--
You received this message because you are subscribed to the Google Groups "elasticsearch" group.
To unsubscribe from this group and stop receiving emails from it, send an email to elasticsearch+unsubscribe@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.