create index and query using whoosh