issue 384: search: wrong sql query for item index