The limitation of only able to use term queries comes from Lucene. I never looked into why there is such a limitation in Lucene, but since they have a lot of smart people working on the code, I assume there must be a good reason. :) Phrase queries do not have such a limitation.
I use span queries a lot where I require phrase queries with in order terms. I pre-analyzed my queries by instantiating an AnalysisService locally, which is only doable if using the Java API. Hackish, but it works. Ultimately I need to move away from span queries. Cheers, Ivan On Wed, Jun 4, 2014 at 1:37 PM, Nikolas Everett <[email protected]> wrote: > Is there a way to perform a span_first query against a query_string or > match query? I'd like to use this in a rescore to improve relevance. > > If I can't do that I'll have to do something silly like create another > field pre-chopped on the way into Elasticsearch. > > Nik > > -- > 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 [email protected]. > To view this discussion on the web visit > https://groups.google.com/d/msgid/elasticsearch/CAPmjWd124LZ25Kc0cvoSpjkSc3-2nrq4FVk1MrqmFvp%3DxW%3DJug%40mail.gmail.com > <https://groups.google.com/d/msgid/elasticsearch/CAPmjWd124LZ25Kc0cvoSpjkSc3-2nrq4FVk1MrqmFvp%3DxW%3DJug%40mail.gmail.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 the Google Groups "elasticsearch" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. To view this discussion on the web visit https://groups.google.com/d/msgid/elasticsearch/CALY%3DcQBOv7d5_yg0ei0Z%3DbE-oL-Ghxa-dMrV8Qqk09OT9TPTAQ%40mail.gmail.com. For more options, visit https://groups.google.com/d/optout.
