fix php notice
use new config option to select queried index (all by default)