fixed db calls for contentsearch