# JoinQueryBuilder#doToQuery() should not be called

**URL:** <https://community.siren.io/t/joinquerybuilder-dotoquery-should-not-be-called/361>\
**Category:** Siren Federate (Elasticsearch Plugin)\
**Created:** [February 21, 2021, 8:34pm UTC](https://community.siren.io/t/joinquerybuilder-dotoquery-should-not-be-called/361 "2021-02-21T20:34:49Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![Pavel](https://avatars.discourse-cdn.com/v4/letter/p/a4c791/32.png) [@Pavel](https://community.siren.io/u/Pavel)\
**Post date:** [February 21, 2021, 8:34pm UTC](https://community.siren.io/t/joinquerybuilder-dotoquery-should-not-be-called/361/1 "2021-02-21T20:34:49Z")

</div>

Hi everyone, could you please help me with the join query, installed plugin

`48ca8727aa41 siren-federate 7.10.1-22.0`

I’m getting all the time the error:

`failed to create query: JoinQueryBuilder#doToQuery() should not be called`

even with demo data and instructions I’ve got from here:  
[[Query domain-specific language (DSL) :: SIREN DOCS](https://docs.support.siren.io/siren-federate-user-guide/22/siren-federate/query-dsl.html)]([https://siren](https://siren) federate guide)

here is my test indexes:

```
PUT /movies
{
  "mappings": {
    "properties": {
      "name": {
        "type": "keyword"
      },
      "actor": {
        "type": "keyword",
        "doc_values": true
      }
    }
  }
}

PUT /people
{
  "mappings": {
    "properties": {
      "name": {
        "type": "keyword"
      },
      "uid": {
        "type": "keyword",
        "doc_values": true
      }
    }
  }
}

POST /movies/_doc/1
{
  "name": "Iron",
  "actor": "1"
}

POST /people/_doc/1
{
  "name": "Matt",
  "uid": "1"
}

GET /movies/_search
{
   "query" : {
      "join" : {                      
        "indices" : ["people"],    
        "on" : ["actor", "uid"]
      }
    }
}
```

---

<div class="post-metadata">

**Author:** ![Johnny.Hujol](https://yyz2.discourse-cdn.com/flex032/user_avatar/community.siren.io/johnny.hujol/32/190_2.png) [@Johnny.Hujol](https://community.siren.io/u/Johnny.Hujol)\
**Post date:** [February 22, 2021, 6:32am UTC](https://community.siren.io/t/joinquerybuilder-dotoquery-should-not-be-called/361/2 "2021-02-22T06:32:00Z")

</div>

Hi Pavel,  
this error occurs when the endpoint is missing the word `siren` as written in the doc mentioned [Query domain-specific language (DSL) :: SIREN DOCS](https://docs.support.siren.io/siren-federate-user-guide/22/siren-federate/query-dsl.html).  
The search should instead be

`GET /siren/movies/_search` …

Best,  
Johnny

---

<div class="post-metadata">

**Author:** ![Pavel](https://avatars.discourse-cdn.com/v4/letter/p/a4c791/32.png) [@Pavel](https://community.siren.io/u/Pavel)\
**Post date:** [February 22, 2021, 8:49am UTC](https://community.siren.io/t/joinquerybuilder-dotoquery-should-not-be-called/361/3 "2021-02-22T08:49:28Z")

</div>

Yeah, it works! Thank you Johnny!
