Siren-join query cause high io

i use siren-join plugin replace es parent-child. but now many siren-join query cause machine high io.

GET test_1/1/_coordinate_search
  "from" : 0,
  "size" : 50,
  "timeout" : 30000,
  "query" : {
    "filterjoin" : {
      "id" : {
        "indices" : [ "test_2" ],
        "types" : [ "0" ],
        "path" : "id",
        "query" : {
          "bool" : {
            "filter" : {
              "bool" : {
                "must" : {
                  "wildcard" : {
                    "detail" : "*test detail*"
        "maxTermsPerShard" : 10000000
  "sort" : [ {
    "time" : {
      "order" : "desc"
  } ]

this is my query. test_1 has 3m docs, test_2 has 50m docs, and this query "detail" : "test detail" hit 1000+ result.
this is total cost 100+s, and cause high io and load:

top - 20:42:09 up 36 days,  8:37,  1 user,  load average: 28.38, 25.04, 14.90
Tasks: 541 total,   1 running, 540 sleeping,   0 stopped,   0 zombie
Cpu0  :  8.0%us,  1.9%sy,  0.0%ni,  1.0%id, 88.4%wa,  0.0%hi,  0.6%si,  0.0%st
Cpu1  :  2.3%us,  0.3%sy,  0.0%ni, 21.4%id, 76.1%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu2  :  0.7%us,  1.0%sy,  0.0%ni, 54.4%id, 43.9%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu3  :  2.6%us,  0.3%sy,  0.0%ni, 52.6%id, 44.4%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu4  :  0.3%us,  0.3%sy,  0.0%ni, 79.1%id, 20.2%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu5  :  0.3%us,  0.0%sy,  0.0%ni, 67.0%id, 32.7%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu6  :  9.6%us,  1.0%sy,  0.0%ni, 15.1%id, 74.0%wa,  0.0%hi,  0.3%si,  0.0%st
Cpu7  :  2.3%us,  1.3%sy,  0.0%ni, 50.2%id, 46.2%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu8  :  1.0%us,  1.3%sy,  0.0%ni, 60.0%id, 37.4%wa,  0.0%hi,  0.3%si,  0.0%st
Cpu9  :  0.3%us,  0.0%sy,  0.0%ni, 72.8%id, 26.8%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu10 :  0.7%us,  0.3%sy,  0.0%ni, 79.2%id, 19.9%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu11 :  0.6%us,  0.3%sy,  0.0%ni, 79.5%id, 19.5%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu12 :  2.6%us,  1.3%sy,  0.0%ni, 20.2%id, 75.9%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu13 :  0.3%us,  0.3%sy,  0.0%ni, 81.5%id, 17.8%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu14 :  0.3%us,  0.3%sy,  0.0%ni, 94.4%id,  4.9%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu15 :  0.3%us,  0.0%sy,  0.0%ni, 92.7%id,  7.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu16 :  0.3%us,  0.0%sy,  0.0%ni, 99.7%id,  0.0%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu17 :  0.3%us,  0.0%sy,  0.0%ni, 98.4%id,  1.3%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu18 :  2.3%us,  0.3%sy,  0.0%ni, 45.1%id, 52.3%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu19 :  0.7%us,  0.7%sy,  0.0%ni, 73.9%id, 24.8%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu20 :  0.7%us,  0.0%sy,  0.0%ni, 86.9%id, 12.5%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu21 :  0.3%us,  0.0%sy,  0.0%ni, 97.0%id,  2.7%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu22 :  1.0%us,  0.3%sy,  0.0%ni, 94.1%id,  4.6%wa,  0.0%hi,  0.0%si,  0.0%st
Cpu23 :  0.3%us,  0.3%sy,  0.0%ni, 97.0%id,  2.3%wa,  0.0%hi,  0.0%si,  0.0%st
Mem:  131909748k total, 131494052k used,   415696k free,   147640k buffers
Swap:  2088952k total,  2088948k used,        4k free, 88329696k cached

this machine has 6 hard drives , no raid.

How to Optimize?

2.5% (12.3ms out of 500ms) cpu usage by thread 'elasticsearch[data-][generic][T#4944]'
5/10 snapshots sharing following 41 elements Method)$NIOFSIndexInput.readInternal(

I don't know this plugin but for sure you should never write something like "detail" : "*test detail*"

This is one of the worse query you can run on elasticsearch.
Don't do this!

thanks. then how i use another query to replace "wildcard" : {
"detail" : "test detail"

You can use a match query instead.

It's potentially a big join. So either:

  1. a lot of expensive random disk seeks (searches to find terms from index 1 in index 2)
  2. a big scan (serially scan all terms in index 1 to see if they are in the result set from index 2)

Either way it will cost.
Probably best to take up with the Siren peeps.