Esempio n. 1
0
        public IndexFailureInformation GetFailureRate(string index)
        {
            var readResult = storage.IndexingStats.Read(index);
            if (readResult == null)
                throw new IndexDoesNotExistsException("There is no index named: " + index);

            var indexFailureInformation = new IndexFailureInformation
            {
                Attempts = readResult.Key.Value<int>("attempts"),
                Errors = readResult.Key.Value<int>("failures"),
                Successes = readResult.Key.Value<int>("successes"),
                Name = readResult.Key.Value<string>("index"),
            };
            return indexFailureInformation;
        }
Esempio n. 2
0
		/// <summary>
		/// Initializes a new instance of the <see cref="IndexDisabledException"/> class.
		/// </summary>
		/// <param name="information">The information.</param>
		public IndexDisabledException(IndexFailureInformation information)
		{
			Information = information;
		}