add log
add direct index support