award.number filter returning 0 results in Public REST API after ES cutover, but still working in Polite pre-cutover

Background

REST API user reported that his queries that used filter=award.number: returned 0 results whereas the same queries used to return some results.

e.g. https://api.crossref.org/works?filter=award.number:FA9550-18-1-0383

Observed behavior

I confirmed this behavior and, in light of the recent elasticsearch cutover for Public, tried the same query on Polite.

https://api.crossref.org/works?filter=award.number:FA9550-18-1-0383&mailto=support@crossref.org

That returns results as expected.

Update: Polite has also been cutover, so this observed behavior is no longer true.

Expected behavior

How urgent

Definition of ready

  • Product owner: @ppolischuk1
  • Tech lead: @dtkaczyk
  • Service:: or C:: label applied
  • Definition of done updated
  • Acceptance testing plan: staging
  • Weight applied

Definition of done

  • Unit tests identified, implemented, and passing
  • Code reviewed
  • Available for acceptance testing via a staging URL, or otherwise
  • Knowledge base reviewed and updated
  • Public documentation reviewed and updated
  • Acceptance criteria met
    • index award.number as keyword instead of text
    • award.number filter retrieves DOIs with given award numbers
  • Acceptance testing passed
  • Deployed to production

Notes

The procedure to fix (see also https://docs.google.com/document/d/1T2C5Ng1Fc608Gm6xEMRnQa-9tAwJypbxnRpLMhacs_E/edit#heading=h.hazctw4jli5f ):

  1. Prepare
    1. add new field :award-keyword of type keyword to ES work mapping
    2. modify the indexing code to index the data in both :award and :award-keyword
    3. deploy the above changes to production
  2. Scan & reindex
  3. Finalise
    1. make retrieval and award.number filter use the field :award-keyword
    2. remove updating :award field from indexing
    3. make sure nothing else uses :award field anymore
    4. deploy the above changes to production
Edited by Patrick Polischuk