Only import haystack in resourcebase_api if enabled