fixed bug in insert document
add view db docs.length