From the man page, it looks like dir_index just give the filesystem a place to see where things are located so it can go there more quickly.
I think you need to put the feature after -O . For example:
mke2fs -j -O dir_index /dev/hda1
or
mkfs.ext3 -O dir_index /dev/hda1
Code:
-O feature[,...]
Create filesystem with given features (filesystem options), overrid-
ing the default filesystem options. Currently, the sparse_super and
filetype features are turned on by default when mke2fs is run on a
system with Linux 2.2 or later (unless creator-os is set to the
Hurd). Filesystems that may need to be mounted on pre-2.2 Linux or
other kernels should be created with -O none (or -r 0 for Linux 1.2)
which will disable these features, even if mke2fs is run on a system
which can support them.
The following filesystem options are supported:
dir_index
Use hashed b-trees to speed up lookups in large directo-
ries.