示例#1
0
        /// <summary>
        /// Index objects to the specified index and the inferred type name for T
        /// and SimpleBulkParameters to control the entire operation
        /// </summary>
        public IBulkResponse IndexMany <T>(IEnumerable <T> objects, string index, SimpleBulkParameters bulkParameters) where T : class
        {
            var json = this.GenerateBulkIndexCommand(@objects, index);
            var path = this.PathResolver.AppendSimpleParametersToPath(this.BulkIndexPath(index), bulkParameters);

            return(this._indexManyToPath(path, json));
        }
示例#2
0
        /// <summary>
        /// Index objects to the default index and the inferred type name for T
        /// and SimpleBulkParameters to control the entire operation
        /// </summary>
        public Task <IBulkResponse> IndexManyAsync <T>(IEnumerable <T> objects, SimpleBulkParameters bulkParameters) where T : class
        {
            var json = this.GenerateBulkIndexCommand(@objects);
            var path = this.PathResolver.AppendSimpleParametersToPath("_bulk", bulkParameters);

            return(this._indexManyAsyncToPath(path, json));
        }
示例#3
0
        public void IndexAsync <T>(IEnumerable <BulkParameters <T> > objects, SimpleBulkParameters bulkParameters) where T : class
        {
            var json = this.GenerateBulkIndexCommand(@objects);
            var path = this.AppendSimpleParametersToPath("_bulk", bulkParameters);

            this.Connection.Post(path, json, null);
        }
示例#4
0
        public void IndexAsync <T>(IEnumerable <T> objects, string index, SimpleBulkParameters bulkParameters, Action <ConnectionStatus> continuation) where T : class
        {
            var json = this.GenerateBulkIndexCommand(@objects, index);
            var path = this.AppendSimpleParametersToPath("_bulk", bulkParameters);

            this.Connection.Post(path, json, continuation);
        }
示例#5
0
        public void DeleteAsync <T>(IEnumerable <BulkParameters <T> > objects, SimpleBulkParameters bulkParameters, Action <ConnectionStatus> continuation) where T : class
        {
            var json = this.GenerateBulkDeleteCommand(@objects);
            var path = this.AppendSimpleParametersToPath("_bulk", bulkParameters);

            this.Connection.Post(path, json, continuation);
        }
示例#6
0
        public ConnectionStatus Index <T>(IEnumerable <T> objects, string index, SimpleBulkParameters bulkParameters) where T : class
        {
            var json = this.GenerateBulkIndexCommand(@objects, index);
            var path = this.AppendSimpleParametersToPath("_bulk", bulkParameters);

            return(this.Connection.PostSync(path, json));
        }
示例#7
0
        /// <summary>
        /// Deletes all the objects by inferring its id in the specified index and the inferred type for T
        /// </summary>
        /// <param name="bulkParameters">allows you to control the replication and refresh behavior</param>
        public IBulkResponse Delete <T>(IEnumerable <T> objects, string index, SimpleBulkParameters bulkParameters) where T : class
        {
            var json = this.GenerateBulkDeleteCommand(@objects, index);
            var path = this.PathResolver.AppendSimpleParametersToPath("_bulk", bulkParameters);

            return(this._deleteToBulkPath(path, json));
        }
示例#8
0
        /// <summary>
        /// Index objects to the default index and the inferred type name for T
        /// and SimpleBulkParameters to control the entire operation
        /// </summary>
        public Task <ConnectionStatus> IndexAsync <T>(IEnumerable <T> objects, SimpleBulkParameters bulkParameters) where T : class
        {
            var json = this.GenerateBulkIndexCommand(@objects);
            var path = this.AppendSimpleParametersToPath("_bulk", bulkParameters);

            return(this.Connection.Post(path, json));
        }
示例#9
0
        /// <summary>
        /// Index objects to the specified index and the specified type name, using bulk parameters to control the individual objects
        /// and SimpleBulkParameters to control the entire operation
        /// </summary>
        public Task <IBulkResponse> IndexManyAsync <T>(IEnumerable <BulkParameters <T> > objects, string index, string type, SimpleBulkParameters bulkParameters) where T : class
        {
            var json = this.GenerateBulkIndexCommand(@objects, index, type);
            var path = this.PathResolver.AppendSimpleParametersToPath(this.BulkIndexPath(index), bulkParameters);

            return(this._indexManyAsyncToPath(path, json));
        }
示例#10
0
        public ConnectionStatus Delete <T>(IEnumerable <BulkParameters <T> > @objects, SimpleBulkParameters bulkParameters) where T : class
        {
            var json = this.GenerateBulkDeleteCommand(@objects);
            var path = this.AppendSimpleParametersToPath("_bulk", bulkParameters);

            return(this.Connection.PostSync(path, json));
        }
示例#11
0
        /// <summary>
        /// Deletes all the objects by inferring its id in the specified index and type
        /// By wrapping the T in BulkParamaters<T> one can control each objects parameters
        /// </summary>
        /// <param name="bulkParameters">allows you to control the replication and refresh behavior</param>
        public Task <IBulkResponse> DeleteAsync <T>(IEnumerable <BulkParameters <T> > objects, string index, SimpleBulkParameters bulkParameters, string type) where T : class
        {
            var json = this.GenerateBulkDeleteCommand(@objects, index, type);
            var path = this.PathResolver.AppendSimpleParametersToPath("_bulk", bulkParameters);

            return(this._deleteToBulkPathAsync(path, json));
        }
示例#12
0
        /// <summary>
        /// Deletes all the objects by inferring its id in the specified index and type
        /// By wrapping the T in BulkParamaters<T> one can control each objects parameters
        /// </summary>
        /// <param name="bulkParameters">allows you to control the replication and refresh behavior</param>
        public Task <ConnectionStatus> DeleteAsync <T>(IEnumerable <BulkParameters <T> > objects, string index, SimpleBulkParameters bulkParameters, string type) where T : class
        {
            var json = this.GenerateBulkDeleteCommand(@objects, index, type);
            var path = this.AppendSimpleParametersToPath("_bulk", bulkParameters);

            return(this.Connection.Post(path, json));
        }