Sagar_Shah
(Sagar Shah)
February 11, 2015, 8:03pm
1
Hello everyone,
I came across few articles that says filtered query are generally faster.
I need to perform some wildcard search on one of the fields.
So my questions is...
Can I perform wildcard search on the field along with filtered query? If
so, can anyone please provide an example?
I tried few combinations of JSON for request body, but that did not work.
Example:
Method:POST
{
"query": {
"filtered": {
"filter": {
"bool": {
"must": [
{
"wildcard": {
"wildcardField": "Text "
}
},
{
"term": {
"messageId": "14406"
}
}
]
}
}
}
}
}
Appreciate your inputs!
Regards,
Sagar Shah
--
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 .
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/67eb86d0-1f10-47a0-94e0-b5f6ed166d4d%40googlegroups.com .
For more options, visit https://groups.google.com/d/optout .
dadoonet
(David Pilato)
February 11, 2015, 8:56pm
2
Not answering to your question, but...
If you are about performance, don’t use wildcard queries.
But prefer ngram analyzers with match queries.
That will be really more efficient.
In particular here, wildcard beginning with a star is the worse scenario performance wise.
--
David Pilato | Technical Advocate | Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfr https://twitter.com/elasticsearchfr | @scrutmydocs https://twitter.com/scrutmydocs
Le 11 févr. 2015 à 21:03, Sagar Shah sagarshah1983@gmail.com a écrit :
Hello everyone,
I came across few articles that says filtered query are generally faster.
I need to perform some wildcard search on one of the fields.
So my questions is...
Can I perform wildcard search on the field along with filtered query? If so, can anyone please provide an example?
I tried few combinations of JSON for request body, but that did not work.
Example:
Method:POST
{
"query": {
"filtered": {
"filter": {
"bool": {
"must": [
{
"wildcard": {
"wildcardField": "Text "
}
},
{
"term": {
"messageId": "14406"
}
}
]
}
}
}
}
}
Appreciate your inputs!
Regards,
Sagar Shah
--
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 mailto:elasticsearch+unsubscribe@googlegroups.com .
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/67eb86d0-1f10-47a0-94e0-b5f6ed166d4d%40googlegroups.com https://groups.google.com/d/msgid/elasticsearch/67eb86d0-1f10-47a0-94e0-b5f6ed166d4d%40googlegroups.com?utm_medium=email&utm_source=footer .
For more options, visit https://groups.google.com/d/optout https://groups.google.com/d/optout .
--
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 .
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/B8FA2C00-FBA6-4550-B839-9D31FF47752D%40pilato.fr .
For more options, visit https://groups.google.com/d/optout .
Sagar_Shah
(Sagar Shah)
February 12, 2015, 6:37am
3
Thank you David.
I will evaluate and look into ngram analyzer to see how it can help on the
specific scenario.
Appreciate your help!
On Thu, Feb 12, 2015 at 2:26 AM, David Pilato david@pilato.fr wrote:
Not answering to your question, but...
If you are about performance, don’t use wildcard queries.
But prefer ngram analyzers with match queries.
That will be really more efficient.
In particular here, wildcard beginning with a star is the worse scenario
performance wise.
--
David Pilato | Technical Advocate | Elasticsearch.com
http://Elasticsearch.com
@dadoonet https://twitter.com/dadoonet | @elasticsearchfr
https://twitter.com/elasticsearchfr | @scrutmydocs
https://twitter.com/scrutmydocs
Le 11 févr. 2015 à 21:03, Sagar Shah sagarshah1983@gmail.com a écrit :
Hello everyone,
I came across few articles that says filtered query are generally faster.
I need to perform some wildcard search on one of the fields.
So my questions is...
Can I perform wildcard search on the field along with filtered query? If
so, can anyone please provide an example?
I tried few combinations of JSON for request body, but that did not work.
Example:
Method:POST
{
"query": {
"filtered": {
"filter": {
"bool": {
"must": [
{
"wildcard": {
"wildcardField": "Text "
}
},
{
"term": {
"messageId": "14406"
}
}
]
}
}
}
}
}
Appreciate your inputs!
Regards,
Sagar Shah
--
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 .
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/67eb86d0-1f10-47a0-94e0-b5f6ed166d4d%40googlegroups.com
https://groups.google.com/d/msgid/elasticsearch/67eb86d0-1f10-47a0-94e0-b5f6ed166d4d%40googlegroups.com?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout .
--
You received this message because you are subscribed to a topic in the
Google Groups "elasticsearch" group.
To unsubscribe from this topic, visit
https://groups.google.com/d/topic/elasticsearch/ZOOwZx5xoCs/unsubscribe .
To unsubscribe from this group and all its topics, send an email to
elasticsearch+unsubscribe@googlegroups.com .
To view this discussion on the web visit
https://groups.google.com/d/msgid/elasticsearch/B8FA2C00-FBA6-4550-B839-9D31FF47752D%40pilato.fr
https://groups.google.com/d/msgid/elasticsearch/B8FA2C00-FBA6-4550-B839-9D31FF47752D%40pilato.fr?utm_medium=email&utm_source=footer
.
For more options, visit https://groups.google.com/d/optout .
--
Regards,
Sagar Shah
Too many people think more of security instead of opportunity. They seem
more afraid of life than death!!!
--
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 .
To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CANZnv5i0MnBn4BCx_8VX_%2BAgvdH3OoSQ4vJuV_juTY35xwLM%2BA%40mail.gmail.com .
For more options, visit https://groups.google.com/d/optout .