SpanMultiTermQuery with wildcards


(michal samek) #1

Hi everybody,

forgive me my lame question, but how can I combine more wildcard queries in
SpanMultiTermQuery? I have tried

{
"query": {
"span_multi": {
"match": [
{
"wildcard": {
"message": {
"value": "elastic*"
}
}
},
{
"wildcard": {
"message": {
"value": "rock*"
}
}
}
]
}
}
}

but this doesn't work :-/

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.


(Ivan Brusic) #2

Span query terms are not analyzed, so you cannot use wildcards. Try using
the prefix option or switching to match phrase queries.

Cheers,

Ivan

On Mon, Sep 30, 2013 at 11:29 PM, michal samek samek.michal@gmail.comwrote:

Hi everybody,

forgive me my lame question, but how can I combine more wildcard queries
in SpanMultiTermQuery? I have tried

{
"query": {
"span_multi": {
"match": [
{
"wildcard": {
"message": {
"value": "elastic*"
}
}
},
{
"wildcard": {
"message": {
"value": "rock*"
}
}
}
]
}
}
}

but this doesn't work :-/

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.


(system) #3