I am using solrj for a distributed search. Based on certain user preferences, I will have to search through a particular set of indexes. Is there any way through which I can programatically(duh!) specify the datadir for that particular search query?
I did snoop through the documentation, but couldn’t find anyway other than having the datasets in different cores, is there a better way?
Edit 1 : All the set of indexes have the same schema format.
You can change the
dataDiralmost dynamically using the CREATE CoreAdmin action, and specifying adataDirparameter.Anyway you’ll need to load a new core, it isn’t possible changing the data directory without doing it.
You can use solrj to invoke CoreAdmin action using the
CoreAdminRequestandCoreAdminResponseclasses.