elasticsearch.api.parameters

* Defines the ESParams type for use in the API * * Copyright: © 2015 David Monagle * License: Subject to the terms of the MIT license, as written in the included LICENSE.txt file. * Authors: David Monagle

Members

Aliases

ESParams
alias ESParams = vibe.inet.message.InetHeaderMap

ESParams is just an alias for a vibe.d dictionary list

Functions

defaultParameter
void defaultParameter(ESParams p, string name, string defaultValue)

Sets a parameter to a default value if if does not exist

enforceParameter
void enforceParameter(ESParams p, string name)

Throws an argument exception if the given parameter is not included in p

esEscape
string esEscape(string value)

Escapes the given string for use with ES API

esListify
string esListify(string[] list)

Create a list from the given arguments

esPathify
string esPathify(string[] path)

Takes an array of strings representing a path and returns a clean path string

filterESParams
ESParams filterESParams(ESParams p, string[] allowed)

Filters the given ESParams to only include the given keys. Returns a new range containing the allowed keys

hasField
bool hasField(ESParams p, string key)
Undocumented in source. Be warned that the author may not have intended to support it.
validateAndExtract
ESParams validateAndExtract(ESParams params, string[] allowed)

Returns a new list of params which will only included common parameters plus those allowed passed in parameters

valueOrDefault
T valueOrDefault(ESParams p, string key, T defaultValue)

Returns the value of the supplied ESParams or returns the defaultValue if it doesn't exist

Static variables

ES_COMMON_PARAMETERS
enum ES_COMMON_PARAMETERS;

Common ES parameters

ES_COMMON_QUERY_PARAMETERS
enum ES_COMMON_QUERY_PARAMETERS;

Common ES parameters used in queries

Meta