How can I search a specific index via the API using curl? When I try to use
curl -u user:pass -k -d 'search=search index="indexname" OR curl -u user:pass -k -d 'search=search index="indexname"
I get results but the following messages returned...
No Matching index found for 'index=indexname'
No mmatching index found for index::indexname
Any help would be appreciated..
The problem here is because your request isn't URL encoded. Specifically, your:
search index="indexname"
Needs to be URL encoded. You can easily fix this by doing:
curl -k -u admin:changeme https://localhost:8089/services/search/jobs --data-urlencode 'search=search index="_internal" | head 1'
The problem here is because your request isn't URL encoded. Specifically, your:
search index="indexname"
Needs to be URL encoded. You can easily fix this by doing:
curl -k -u admin:changeme https://localhost:8089/services/search/jobs --data-urlencode 'search=search index="_internal" | head 1'