You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
* Start of adding CMS page
* CMS delete works
* CMS first attempt feature complete
* First attempt at API Reference
* tidy up API ref
* cache parameter
* Data based examples on input forms, Inline deletes, Clickable Facets, Some tidy up
* Cleaner local configuration
* Readme tidy up
* Update README.md
* Use Passport to allow basic HTTP auth in lockdown mode
* Endpoints for autocompletes
* Use SAS with hardcoded config
* Start to implement service discovery/registration
* A few tweaks
* Websockets and UI auto-updating for discovery - env not quite working yet
* All working, with a few caveats
* Tidy up of discovery branch
* Tidy up of SOS, remove un-needed debug
* Etcd with unstrict SSL
* Add Simple Metrics Microservice as discoverable service
* Update Readme to include Discovery Mode and remove cache
* Enable caching and autocompletes when those services are password protected
* Changes made to reflect renaming
* Change metrics to Logging
Copy file name to clipboardExpand all lines: README.md
+27-17Lines changed: 27 additions & 17 deletions
Original file line number
Diff line number
Diff line change
@@ -12,17 +12,16 @@ The application uses these Bluemix services:
12
12
* a Cloudant database
13
13
* a Redis in-memory database from Compose.io (Optional)
14
14
15
-
Once the data is uploaded, you can use the UI to browse and manage your data via the integrated CMS. Additionally, a CORS-enabled, cached API endpoint is available at `<your domain name>/search`. The endpoint takes advantage of Cloudant's built-in integration for Lucene full-text indexing. Here's what you get:
15
+
Once the data is uploaded, you can use the UI to browse and manage your data via the integrated CMS. Additionally, a CORS-enabled API endpoint is available at `<your domain name>/search`. The endpoint takes advantage of Cloudant's built-in integration for Lucene full-text indexing. Here's what you get:
You can use this along with the rest of the API to integrate the Simple Search Service into your apps. For a full API reference, [click here](https://github.com/ibm-cds-labs/simple-search-service#api-reference).
24
23
25
-
While this app is a demo to showcase how easily you can build an app on Bluemix using Node.js and Cloudant, it also provides a mature search API that scales with the addition of multiple Simple Search Service nodes and a centralized cache using Redis by Compose.io. In fact, a similar architecture powers the search experience in the Bluemix services catalog.
24
+
While this app is a demo to showcase how easily you can build an app on Bluemix using Node.js and Cloudant, it also provides a mature search API that scales with the addition of multiple Simple Search Service nodes. In fact, a similar architecture powers the search experience in the Bluemix services catalog.
26
25
27
26
A more detailed walkthrough of using Simple Search Service is available [here](https://developer.ibm.com/clouddataservices/2016/01/21/introducing-simple-faceted-search-service/).
28
27
@@ -44,25 +43,43 @@ The fastest way to deploy this application to Bluemix is to click the **Deploy t
44
43
45
44
Clone this repository then run `npm install` to add the Node.js libraries required to run the app.
46
45
47
-
Then create some environment variables that contain your Cloudant URL, and optionally, your Redis details:
46
+
Then create some environment variables that contain your Cloudant URL.
replacing the `USERNAME`, `PASSWORD` and `HOSTNAME` placeholders for your own Cloudant account's details. If your Redis server does not require a password, do not set the `SSS_REDIS_PASSWORD` environment variable.
53
+
replacing the `USERNAME`, `PASSWORD` and `HOSTNAME` placeholders for your own Cloudant account's details.
59
54
60
55
Then run:
61
56
62
57
```sh
63
58
node app.js
64
59
```
65
60
61
+
## Service Registry
62
+
63
+
The Simple Search Service utilises [Etcd](https://github.com/coreos/etcd) to discover and utilise some of our other Simple Services to extend and improve the service.
64
+
65
+
Other services that are available to the Simple Search Service are:
66
+
67
+
*[The Simple Autocomplete Service](https://github.com/ibm-cds-labs/simple-autocomplete-service) - Add auto completion to the CMS
68
+
*[The Simple Caching Service](https://github.com/MattCollins84/simple-cache-service) - Enable caching of popular searches
69
+
*[Metrics Collector Microservice](https://github.com/ibm-cds-labs/metrics-collector-microservice) - Enable logging of searches
70
+
71
+
### Enabling the Service Registry
72
+
73
+
Enabling the Service Registry requires setting an environment variable, `ETCD_URL`. This should be the URL of your Etcd instance including any basic HTTP authentication information
If the Service Registry is enabled, any discovered services will be displayed on the Services page, with a toggle to enable or disable these services.
80
+
81
+
Once enabled these services will automatically be integrated into the Simple Search Service.
82
+
66
83
## Lockdown mode
67
84
68
85
If you have uploaded your content into the Simple Search Service but now want only the `/search` endpoint to be available publicly, you can enable "Lockdown mode".
@@ -80,6 +97,7 @@ When lockdown mode is detected, all web requests will be get a `401 Unauthorised
80
97
81
98
If you wish to get access to the Simple Search Service whilst in lockdown mode, you can enable basic HTTP authentication by setting two more environment variables:
82
99
100
+
83
101
*`SSS_LOCKDOWN_USERNAME`
84
102
*`SSS_LOCKDOWN_PASSWORD`
85
103
@@ -129,13 +147,6 @@ It is possible to alter the amount of results returned using the `limit` paramet
129
147
GET /search?q=black&bookmark=<...>&limit=10
130
148
```
131
149
132
-
It is possible to alter whether or not to use the cache via the `cache` parameter (defaults to true).
133
-
134
-
```bash
135
-
# Return the next set of docs where 'black' is mentioned, don't use the cache
136
-
GET /search?q=black&bookmark=<...>&cache=false
137
-
```
138
-
139
150
#### Example Response
140
151
141
152
All searches will respond in the same way.
@@ -170,7 +181,6 @@ All searches will respond in the same way.
170
181
"Black": 19
171
182
}
172
183
},
173
-
"from_cache": true, // did this response come from the cache?
0 commit comments