Skip to content

Commit c53420b

Browse files
thehabesCopilot
andauthored
Search Against Annotation Text Indexes (#223)
* Bring in search logic * It searches! * idNegotiation on search results * All the search logic * Lint, and add support for passing search options into the endpoint * polish * Update API documentation * polish * polish * polish * polish * polish * polish * polish * polish * exists test for new routes * Update public/API.html Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update public/API.html Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update public/API.html Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update controllers/search.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update controllers/search.js Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * get rid of utils. prefix from createExpressError * Update public/API.html Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * Update public/API.html Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com> * slop formatting * Touch ups to API.html as discussed at standup. * bump version because of new search feature --------- Co-authored-by: Copilot <175728472+Copilot@users.noreply.github.com>
1 parent 3c32a20 commit c53420b

File tree

12 files changed

+1002
-11
lines changed

12 files changed

+1002
-11
lines changed

.github/copilot-instructions.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ RERUM API v1 is a NodeJS web service for interaction with the RERUM digital obje
2828
3. **Create .env configuration file** (required for operation):
2929
```bash
3030
# Create .env file in repository root
31-
RERUM_API_VERSION=1.0.0
31+
RERUM_API_VERSION=1.1.0
3232
RERUM_BASE=http://localhost:3005
3333
RERUM_PREFIX=http://localhost:3005/v1/
3434
RERUM_ID_PREFIX=http://localhost:3005/v1/id/

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -39,7 +39,7 @@ npm install
3939
Create a file named `.env` in the root folder. In the above example, the root is `/code_folder/rerum_api`. `/code_folder/rerum_api/.env` looks like this:
4040

4141
```shell
42-
RERUM_API_VERSION = 1.0.0
42+
RERUM_API_VERSION = 1.1.0
4343
COLLECTION_ACCEPTEDSERVER = acceptedServer
4444
COLLECTION_V0 = annotation
4545
AUDIENCE = http://rerum.io/api

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -64,7 +64,7 @@ npm install
6464
Create a file named `.env` in the root folder. In the above example, the root is `/code_folder/rerum_api`. `/code_folder/rerum_api/.env` looks like this:
6565

6666
```shell
67-
RERUM_API_VERSION = 1.0.0
67+
RERUM_API_VERSION = 1.1.0
6868
RERUM_BASE = URL_OF_YOUR_DEPLOYMENT
6969
RERUM_PREFIX = URL_OF_YOUR_DEPLOYMENT/v1/
7070
RERUM_ID_PREFIX = URL_OF_YOUR_DEPLOYMENT/v1/id/

__tests__/routes_mounted.test.js

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -105,6 +105,14 @@ describe('Check to see that all /v1/api/ route patterns exist.', () => {
105105
expect(routeExists(api_stack, '/api/release')).toBe(true)
106106
})
107107

108+
it('/v1/api/search -- mounted ', () => {
109+
expect(routeExists(api_stack, '/api/search')).toBe(true)
110+
})
111+
112+
it('/v1/api/search/phrase -- mounted ', () => {
113+
expect(routeExists(api_stack, '/api/search/phrase')).toBe(true)
114+
})
115+
108116
})
109117

110118
describe('Check to see that critical static files are present', () => {

app.js

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,6 +58,7 @@ app.use(
5858
)
5959
app.use(logger('dev'))
6060
app.use(express.json())
61+
app.use(express.text())
6162
app.use(express.urlencoded({ extended: true }))
6263
app.use(cookieParser())
6364

0 commit comments

Comments
 (0)