# Elastic search is crashing on running multi span query

**URL:** <https://discuss.elastic.co/t/elastic-search-is-crashing-on-running-multi-span-query/105332>\
**Category:** Elasticsearch\
**Created:** [October 26, 2017, 5:21am UTC](https://discuss.elastic.co/t/elastic-search-is-crashing-on-running-multi-span-query/105332 "2017-10-26T05:21:29Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![vdvc](https://avatars.discourse-cdn.com/v4/letter/v/3ab097/32.png) [@vdvc](https://discuss.elastic.co/u/vdvc)\
**Post date:** [October 26, 2017, 5:21am UTC](https://discuss.elastic.co/t/elastic-search-is-crashing-on-running-multi-span-query/105332/1 "2017-10-26T05:21:29Z")

</div>

Hi All,  
We have noticed an error in using multi span queries. We ran the following query from Kibana interface and noticed that elastic server is consistently crashing. We are having large volume of documents indexed in elastic server.

We are using the elastic search server with version 5.5.2 and Kibana with version 5.5.2

Failed query is

GET \_search  
{  
"size" : 50,  
"query" : {  
"bool" : {  
"must" : [

```
    {
      "span_near" : {
        "clauses" : [
          {
            "span_term" : {
              "content.content" : {
                "value" : "hello",
                "boost" : 1.0
              }
            }
          },
          {
            "span_multi" : {
              "match" : {
                "regexp" : {
                  "content.content" : {
                    "value" : "[0-9]+[\\.,\\,,0-9]*",
                    "flags_value" : 65535,
                    "max_determinized_states" : 10000,
                    "boost" : 1.0
                  }
                }
              },
              "boost" : 1.0
            }
          }
        ],
        "slop" : 10,
        "in_order" : false,
        "boost" : 1.0
      }
    }
  ],
 
  "disable_coord" : false,
  "adjust_pure_negative" : true,
  "boost" : 1.0
}

```

}  
}

- Thanks for your help advance

---

<div class="post-metadata">

**Author:** ![spinscale](https://sea2.discourse-cdn.com/elastic/user_avatar/discuss.elastic.co/spinscale/32/25011_2.png) [@spinscale](https://discuss.elastic.co/u/spinscale)\
**Post date:** [October 27, 2017, 3:04pm UTC](https://discuss.elastic.co/t/elastic-search-is-crashing-on-running-multi-span-query/105332/2 "2017-10-27T15:04:31Z")

</div>

can you be more specific what `crashes` means? Is it unresponsive? Do you have to restart the process? Are there any log files you can share on the node you are hitting?

I assume the culprit is the regex query which might just be super expensive and slows everything down.

Maybe you could explain your use-case so people could search for possible alternatives. Regexes are usually a smell of wrong indexing chains that require fixing on that side...

--Alex

---

<div class="post-metadata">

**Author:** ![system](https://us1.discourse-cdn.com/elastic/original/3X/1/a/1ac57faf039f6b580b3f104ef42a2a89e41014de.png) [@system](https://discuss.elastic.co/u/system)\
**Post date:** [November 24, 2017, 3:04pm UTC](https://discuss.elastic.co/t/elastic-search-is-crashing-on-running-multi-span-query/105332/3 "2017-11-24T15:04:34Z")

</div>

Closed on November 24, 2017, 3:04pm UTC

This topic was automatically closed 28 days after the last reply. New replies are no longer allowed.
