Hi, I am trying to send query with Swift, but it returns error below.
Routing Error. The path you have requested is invalid.
My code is below
(Using ElasticSwift)
let host = "myEndPoint"
let cred = BasicClientCredential(username: "elastic", password: "myPasswordHere")
let settings = Settings(forHost: host, withCredentials: cred,
adaptorConfig: URLSessionAdaptorConfiguration.default)
client = ElasticClient(settings: settings)
let queryBuilder = QueryBuilders.boolQuery()
let match = try QueryBuilders.matchQuery()
.set(field: "name")
.set(value: "")
.build()
queryBuilder.must(query: match)
let query = try queryBuilder.build()
let request = try SearchRequestBuilder()
.set(indices: "my-index-000001")
.set(query: query)
.build()
client.search(request, completionHandler: handler)
I've changed parameters, password, username... but nothing seems to be working...
Thank you in advance for your support.