Esempio n. 1
0
        public TH CreateIndexByConnStr <T, TH>(string ConnStr, string coreIndex)
            where T : Entity
            where TH : IIndex <T>
        {
            var contextObj = BuildSolrServer <T> .CreateSolrServer(ConnStr, coreIndex, _SIndexSettings.Value.indexType);

            return(_createIndex.Get <TH>(new object[] { contextObj }));
        }
Esempio n. 2
0
        public TH CreateDefaultIndex <T, TH>(string coreIndex)
            where TH : IIndex <T>
            where T : Entity
        {
            var contextObj = BuildSolrServer <T> .CreateSolrServer(_SIndexSettings.Value.defaultConnectionString, coreIndex, _SIndexSettings.Value.indexType);

            return(_createIndex.Get <TH>(new object[] { contextObj }));
        }
Esempio n. 3
0
        //得到所有分库的Index
        public List <TH> CreateAllIndex <T, TH>(string coreIndex)
            where T : Entity
            where TH : IIndex <T>
        {
            var contextList = BuildSolrServer <T> .CreateAllSolrServer(_SIndexSettings.Value.connectionList, coreIndex, _SIndexSettings.Value.defaultConnectionString, _SIndexSettings.Value.indexType);

            List <TH> rlist = new List <TH>();

            contextList.ForEach((contextObj) => { rlist.Add(_createIndex.Get <TH>(new object[] { contextObj })); });
            return(rlist);
        }
Esempio n. 4
0
 public HashSet <string> GetConnectionStrings()
 {
     return(BuildSolrServer <T> .GetConnectionStrings(_SIndexSettings.Value.connectionList, _SIndexSettings.Value.defaultConnectionString, _SIndexSettings.Value.indexType));
 }
Esempio n. 5
0
 private AuthAdminSolrServer <T> getSolrServer(string Id, string coreIndex)
 {
     return(BuildSolrServer <T> .CreateSolrServerFromId(Id, coreIndex, _SIndexSettings.Value.connectionKeyList, _SIndexSettings.Value.connectionList, _SIndexSettings.Value.defaultConnectionString, _SIndexSettings.Value.indexType));
 }