diff options
author | freva <valerijf@yahoo-inc.com> | 2016-12-21 12:41:07 +0100 |
---|---|---|
committer | freva <valerijf@yahoo-inc.com> | 2016-12-21 12:41:07 +0100 |
commit | 5c173c381845f84e21d0f0550945e0be680b0dd6 (patch) | |
tree | 62ea9366b6d26216289295ab5fbc644ea11ab3a1 /node-admin/README.md | |
parent | 7f80e9910e1df82caa770c3284ab8dba62818ea3 (diff) |
Moved basic-search-for-docker to node-admin test/resources
Diffstat (limited to 'node-admin/README.md')
-rw-r--r-- | node-admin/README.md | 37 |
1 files changed, 30 insertions, 7 deletions
diff --git a/node-admin/README.md b/node-admin/README.md index 2302d1346e6..c8c423876d2 100644 --- a/node-admin/README.md +++ b/node-admin/README.md @@ -45,14 +45,14 @@ To start a local zone, simply run: Package and deploy vespa application by running: ``` + Path pathToApp = Paths.get("node-admin/src/test/resources/basic-search-for-docker"); runVespaLocal.deployApplication(pathToApp); ``` -where `pathToApp` is for example [vespa/sample-apps/basic-search-for-docker](../sample-apps/basic-search-for-docker). If the deployment is successful, the final log entry should be something like ``` INFO: Endpoint http://cnode-1:4080/ is now ready ``` -use this endpoint URL to feed or query your application as described in [basic-search-for-docker/README](../sample-apps/basic-search-for-docker/README.md). +use this endpoint URL to feed or query your application. You can delete application with @@ -60,14 +60,37 @@ You can delete application with runVespaLocal.deleteApplication(); ``` +### Feed and search + 1. **Feed** the data that is to be searched + ```sh + # Feeding two documents + curl -X POST --data-binary @music-data-1.json <endpoint url>/document/v1/music/music/docid/1 | python -m json.tool + curl -X POST --data-binary @music-data-2.json <endpoint url>/document/v1/music/music/docid/2 | python -m json.tool -## Using + ``` -Trigger the incredibly rich and complex `node-admin` REST API(s) -``` -curl localhost:4080/rest/info -``` + 2. **Visit documents + + Since we do not have many documents we can list them all + ```sh + + # All documents + curl <endpoint url>/document/v1/music/music/docid | python -m json.tool + + # Document with id 1 + curl <endpoint url>/document/v1/music/music/docid/1 | python -m json.tool + + ``` + + 3. **Search** + We can also search for documents: + ```sh + + curl '<endpoint url>/search/?query=bad' | python -m json.tool + + + ``` ## Troubleshooting |