fixing bug #2719 by using a PreparedStatement
fixing bug #4659 and #5856 : filename is indexed both ANALYZE and NOT_ANALYZE