Page MenuHomeSoftware Heritage

Fix boolean mapping in metadata document
ClosedPublic

Authored by vsellier on Jun 15 2021, 10:15 AM.

Details

Summary

Ensure all the fields metadata.* are created as a string in the mapping

Related to T3373

This mapping change will imply to recreate the index and reindex all the data (origins + metadata)

Diff Detail

Repository
rDSEA Archive search
Lint
Automatic diff as part of commit; lint not applicable.
Unit
Automatic diff as part of commit; unit tests not applicable.

Event Timeline

Build is green

Patch application report for D5867 (id=21006)

Rebasing onto f3739ba16d...

Current branch diff-target is up to date.
Changes applied before test
commit b7294a87a5ff0e089d6d3b3c7989a2ca8a63fedd
Author: Vincent SELLIER <vincent.sellier@softwareheritage.org>
Date:   Tue Jun 15 10:02:54 2021 +0200

    Fix boolean mapping in metadata document
    
    Ensure all the fields metadata.* are created as a string in the mapping
    
    Related to T3373

See https://jenkins.softwareheritage.org/job/DSEA/job/tests-on-diff/138/ for more details.

Build is green

Patch application report for D5867 (id=21028)

Rebasing onto 8b2c87f4e1...

Current branch diff-target is up to date.
Changes applied before test
commit 08102cea12079c1c9b5ebea465820e1082d18b76
Author: Vincent SELLIER <vincent.sellier@softwareheritage.org>
Date:   Tue Jun 15 10:02:54 2021 +0200

    Fix boolean mapping in metadata document
    
    Ensure all the fields metadata.* are created as a string in the mapping
    
    Related to T3373

See https://jenkins.softwareheritage.org/job/DSEA/job/tests-on-diff/140/ for more details.

anlambert added inline comments.
swh/search/tests/test_search.py
515

maybe you could add a test checking searching "True" returns that origin ?

530

same here

You should rename the test, it doesn't just test the date anymore

Thanks, the diff is updated according to your reviews:

  • rename the test to something more generic
  • add searches on the boolean field

Build is green

Patch application report for D5867 (id=21058)

Rebasing onto 8b2c87f4e1...

Current branch diff-target is up to date.
Changes applied before test
commit 69364b3b0aca84c211f83b5cbb664a828a552a34
Author: Vincent SELLIER <vincent.sellier@softwareheritage.org>
Date:   Tue Jun 15 10:02:54 2021 +0200

    Fix boolean mapping in metadata document
    
    Ensure all the fields metadata.* are created as a string in the mapping
    
    Related to T3373

See https://jenkins.softwareheritage.org/job/DSEA/job/tests-on-diff/141/ for more details.

This revision is now accepted and ready to land.Jun 16 2021, 2:48 PM
This revision was automatically updated to reflect the committed changes.