Skip to content
This repository has been archived by the owner on Apr 17, 2023. It is now read-only.

[RAINCATCH-1168] Add search handler for api #95

Merged
merged 5 commits into from
Aug 24, 2017

Conversation

JameelB
Copy link
Contributor

@JameelB JameelB commented Aug 23, 2017

Description

Ensure that the filter section in portal don't just operate on local data.

Progress

  • Create search handler
  • Add /search to routes
  • Unit tests
  • Documentation

Additional Notes

Related JIRA - https://issues.jboss.org/browse/RAINCATCH-1168

const page = defaultPaginationEngine.buildRequestFromQuery(req.query);
let filter = {};
if (req.query.filter) {
try {
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[Performance] Avoid long try catch

@@ -117,6 +150,8 @@ export class ApiController<T> {
router.route('/')
.get(this.buildExpressHandler(this.listHandler))
.post(this.buildExpressHandler(this.postHandler));
router.route('/search')
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Let's document this as well.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling dd22446 on JameelB:RAINCATCH-1168 into ** on feedhenry-raincatcher:master**.

1 similar comment
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling dd22446 on JameelB:RAINCATCH-1168 into ** on feedhenry-raincatcher:master**.

@@ -109,6 +109,16 @@ Where `:objectId` is an `id` field of the object.

Where `:objectId` is an `id` field of the object.

### Search for objects

Retrieves a list of objects that satisfies a query.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that matches user query. Satisfies suggest equality. We using LIKE (wildcard) matching

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 4af8ff8 on JameelB:RAINCATCH-1168 into ** on feedhenry-raincatcher:master**.

1 similar comment
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 4af8ff8 on JameelB:RAINCATCH-1168 into ** on feedhenry-raincatcher:master**.

@coveralls
Copy link

coveralls commented Aug 24, 2017

Coverage Status

Changes Unknown when pulling fa205af on JameelB:RAINCATCH-1168 into ** on feedhenry-raincatcher:master**.

@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 6437f4c on JameelB:RAINCATCH-1168 into ** on feedhenry-raincatcher:master**.

1 similar comment
@coveralls
Copy link

Coverage Status

Changes Unknown when pulling 6437f4c on JameelB:RAINCATCH-1168 into ** on feedhenry-raincatcher:master**.

@wtrocki wtrocki merged commit 00f2826 into feedhenry-raincatcher:master Aug 24, 2017
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Development

Successfully merging this pull request may close these issues.

None yet

3 participants