{
  query: {
    bool: {
      should: [
        {
          term: {
            name: {
              value: x
            }
          }
        },
        {
          bool: {
            should: {
              term: {
                name: {
                  value: x
                }
              }
            },
            _name: rightBool
          }
        }
      ]
    }
  }
}