Skip to content

NYPL/sfr-bookfinder-front-end

Folders and files

NameName
Last commit message
Last commit date

Latest commit

699094f · Mar 9, 2021
Mar 9, 2021
Jun 24, 2019
Feb 8, 2021
Mar 9, 2021
Mar 4, 2021
Jan 20, 2021
Feb 26, 2021
Jan 21, 2021
Nov 27, 2018
Feb 22, 2021
Feb 9, 2021
Feb 25, 2021
Feb 25, 2021
Jan 27, 2020
Apr 3, 2020
Mar 1, 2021
Jun 16, 2020
Feb 25, 2021
Dec 15, 2020
Jan 20, 2021
Feb 25, 2021
Mar 4, 2021
Jan 20, 2021
Dec 15, 2020
Dec 30, 2020
Mar 9, 2021
Mar 9, 2021
Jan 25, 2021
Feb 25, 2021

Repository files navigation

NYPL ResearchNow

Version

0.9.3

ResearchNow Search & Retrieval Application

GitHub version Build Status Dependencies Status devDependencies Status

ResearchNow front end application based on NYPL's React Design System.

Provides a "Welcome page" entry point with heading, search box, and tagline. Connects to an ElasticSearch index via an API endpoint (https://platform.nypl.org/research-now/search-api). Simple keyword searches can be entered in the form and an index response is displayed back to the user.

Querying

Requirements

This is a Next.js project bootstrapped with create-next-app.

Installation

Clone the repo and run npm install. ResearchNow also uses [webpub viewer] (https://github.com/NYPL-Simplified/webpub-viewer/tree/SFR-develop) to serve epubs. Clone this branch and run npm install and npm run streamed

For local development, run npm run dev to start the local server at localhost:3000 with default environment variables.

Configurations are environment specific with different values per environment so it's necessary to set the appropriate environment when starting the application.

Dependencies

  • NextJS
  • Redux
  • NYPL Header and Footer npm modules
  • NYPL Design System

Usage

Currently takes in a query string to pass along to the ResearchNow Search API which submits a keyword search to the Elasticsearch instance, and renders the returned output. Sends the q parameter specified in the rendered search form on the main page.

The server route /search should also take a q query string parameter and perform the same keyword search via the ResearchNow Search API.

Search via keyword, author, title, subject have been implemented against v1 of the ResearchNow Search API. Terms use the AND boolean operator by default. Search terms can also use the OR boolean operator and search terms can be quoted for phrase searching. Combinations of these can be used as well for more complex searching using the basic search input.

Term combinations

  • One term: jefferson
  • Multiple terms: world war
  • Phrase: "English Literature"
  • Single term and phrase: james AND "English Literature"

These types of combinations can be used with any available field selection.

Advanced search to introduce multiple form inputs including field select.

Feature Flag Testing

To test Request Digitization, append to the url feature=RequestDigital To test Total Number of Works, append to the url feature=BooksCount To test displaying citations, append to the url feature=DisplayCitations Appending to URL doesn't work for more than one feature, to test more than one feature, edit the object in featureFlagConfig.js

Test

To run unit tests, run npm test in the terminal. Or run npm run test-with-coverage to run the test and see the test coverage.