/// <summary> /// Deletes a specific file index from ES /// </summary> /// <param name="fileData">The file to delete</param> public void Delete(IFileData fileData) { string requestUrl = GetRequestUrl(fileData); var elasticSearchNetwork = new ElasticSearchNetwork(requestUrl, "DELETE"); elasticSearchNetwork.Send(); }
/// <summary> /// Checks if a certain file exists on ES /// </summary> /// <param name="fileData">The file to check</param> /// <returns>True if the file exists, otherwise False</returns> public bool CheckExists(IFileData fileData) { string requestUrl = GetRequestUrl(fileData); var elasticSearchNetwork = new ElasticSearchNetwork(requestUrl, "GET"); try { elasticSearchNetwork.Send(); return(true); } catch (System.Exception) { return(false); } }
/// <summary> /// Checks if a certain file exists on ES /// </summary> /// <param name="fileData">The file to check</param> /// <returns>True if the file exists, otherwise False</returns> public bool CheckExists(IFileData fileData) { string requestUrl = GetRequestUrl(fileData); var elasticSearchNetwork = new ElasticSearchNetwork(requestUrl, "GET"); try { elasticSearchNetwork.Send(); return true; } catch (System.Exception) { return false; } }