Skip to content

Commit

Permalink
Removed search.js
Browse files Browse the repository at this point in the history
  • Loading branch information
justinlittman committed Oct 30, 2019
1 parent 33f4f85 commit a0c4db7
Show file tree
Hide file tree
Showing 3 changed files with 4 additions and 72 deletions.
8 changes: 0 additions & 8 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -67,14 +67,6 @@ $ curl -i -X POST -H 'Content-Type: application/ld+json' -H 'Link: <http://www.w

See [Sinopia Server notes](https://github.com/LD4P/sinopia_server/wiki/Draft-Notes-for-Sinopia-Server-API-Spec) for more Trellis `curl` incantations.

### Inspect indexing behavior

While testing the pipeline, it may be useful for you to run test searches against ElasticSearch to inspect the resulting index entries that the pipeline created. To do this, a `npm run search` script has been included:

```shell
$ npm run search A Tale of Two Cities
```

## Development

For development purposes, you may wish to spin up all the components other than the pipeline if you'll be iterating:
Expand Down
60 changes: 0 additions & 60 deletions search.js

This file was deleted.

8 changes: 4 additions & 4 deletions src/Indexer.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ export default class Indexer {
this.knownDeleteResults = ['deleted']
this.indexers = {
sinopia_templates: SinopiaTemplateIndexer,
sinopia_resources : ResourceIndexer
sinopia_resources: ResourceIndexer
}
}

Expand All @@ -40,7 +40,7 @@ export default class Indexer {

return this.client.index({
index: index,
type: 'sinopia',
type: config.get('indexType'),
id: this.identifierFrom(uri),
body: new indexer(json, uri).index()
}).then(indexResponse => {
Expand Down Expand Up @@ -68,7 +68,7 @@ export default class Indexer {
}
return this.client.delete({
index,
type: 'sinopia',
type: config.get('indexType'),
id: this.identifierFrom(uri)
}).then(indexResponse => {
if (!this.knownDeleteResults.includes(indexResponse.result))
Expand Down Expand Up @@ -111,7 +111,7 @@ export default class Indexer {

await this.client.indices.putMapping({
index: index,
type: 'sinopia',
type: config.get('indexType'),
body: this.indexers[index].indexMapping
})
}
Expand Down

0 comments on commit a0c4db7

Please sign in to comment.