limit historic results based on $history parameter
automatically create index for historic results