database indexing and fixing search parameter