Exemple #1
0
        public string GetWarmerPath(PutWarmerDescriptor descriptor)
        {
            var extension = string.Format("_warmer/{0}", descriptor._WarmerName);

            string indices;

            if (descriptor._Indices.HasAny())
            {
                indices = string.Join(",", descriptor._Indices);
            }
            else if (descriptor._Indices != null || descriptor._AllIndices)             //if set to empty array asume all
            {
                indices = "_all";
            }
            else
            {
                indices = this._connectionSettings.DefaultIndex;
            }

            string types;

            if (descriptor._Types.HasAny())
            {
                types = this.JoinTypes(descriptor._Types);
            }
            else
            {
                types = null;
            }

            return(this.SearchPathJoin(indices, types, null, extension));
        }
 protected IPutWarmerRequest CreateFluent(string name, PutWarmerDescriptor d) => d
 .Index(typeof(Project))
 .Search <Project>(s => s
                   .Query(q => q
                          .Match(m => m
                                 .Field(p => p.Name)
                                 .Query("NEST")
                                 )
                          )
                   );