Hello Andrew ,
Thanks for your reply , but then i still haven’t grasped the concept.
files = { "company.config" , "people.config" , "skill.config"}
for(Strinf configFile : files){
GenericTypeahead<TypeaheadElement> gta = createTypeahead(configFile);
indexerList.add(gta);
searcherList.add(gta);
}
MultiIndexer<TypeaheadElement> indexer = new MultiIndexer<TypeaheadElement>("completeList", indexerList);
Typeahead<TypeaheadElement> searcher = new MultiTypeahead<TypeaheadElement>("Company", searcherList);
In the above code , how will i add a TypeaheadElement to the skill TypeAhead Index ?
Should i maintain a map between string and GenericTypeahead<TypeaheadElement>.
If so , what is the use of MultiIndexer ?
This is my first doubt.
The second part is how will i search between all these indexes ?
MultiSourceCollector<TypeaheadElement> collector = new MultiSourceCollector<TypeaheadElement>();
Collector<TypeaheadElement> result = searcher.search(1, new String[] {"i"}, collector);
Here , i don’t understand why i should pass the collector instance to the search method.
From getting the result , things are clear from your previous mail.
Thanks
Vineeth