StringCache entityTypesCache; // Given those ids, we retrieve the set of types
public List<EntityLexicalEntry> lookupEntries(String query, SearchStrategy strategy) throws ParseException, IOException {
switch (strategy) {
case exact:
if (exactSearcher == null) exactSearcher = new FbEntitySearcher(opts.exactMatchIndex, opts.numOfDocs, "exact");
return lookupEntries(exactSearcher, query);
case inexact:
if (inexactSearcher == null) inexactSearcher = new FbEntitySearcher(opts.inexactMatchIndex, opts.numOfDocs, "inexact");
return lookupEntries(inexactSearcher, query);
case fbsearch:
if (freebaseSearch == null) freebaseSearch = new FreebaseSearch();
if (mid2idCache == null) mid2idCache = StringCacheUtils.create(opts.mid2idPath);
if (entityTypesCache == null) entityTypesCache = StringCacheUtils.create(opts.entityTypesPath);