static SearchManager() { searchConfig = new SearchConfig(); optimizeOptions = new OptimizeOptions(); binaryResponseHeaderParser = new BinaryResponseHeaderParser(); IUpdateParametersConvert <NamedList> updateParametersConvert = new BinaryUpdateParametersConvert(); ISolrUpdateConnection <NamedList, NamedList> solrUpdateConnection = new SolrUpdateConnection <NamedList, NamedList>() { ServerUrl = searchConfig.ServerUrl }; updateOperations = new SolrUpdateOperations <NamedList, NamedList>(solrUpdateConnection, updateParametersConvert) { ResponseWriter = "javabin" }; ISolrQueryConnection <NamedList> connection = new SolrQueryConnection <NamedList>() { ServerUrl = searchConfig.ServerUrl }; operations = new SolrQueryOperations <NamedList>(connection) { ResponseWriter = "javabin" }; }
protected ISolrUpdateOperations <NamedList> GetUpdateOperations() { IUpdateParametersConvert <NamedList> updateParametersConvert = new BinaryUpdateParametersConvert(); ISolrUpdateConnection <NamedList, NamedList> connection = new SolrUpdateConnection <NamedList, NamedList> { ServerUrl = this.SolrServerUrl, ContentType = "application/javabin" }; return(new SolrUpdateOperations <NamedList, NamedList>(connection, updateParametersConvert)); }