Closed jorol closed 5 years ago
Problem is, how values are stored in MongoDB: as string or int. Use fix int() to convert a value to an integer:
$ catmandu import -v MARC --fix 'marc_map(260c,year);replace_all(year,"\D","");int(year);remove_field(record)' to MongoDB --database_name camel < camel.mrc
imported 10 items
done
catmandu export -v cql --cql-query 'year < 2000' to YAML
---
_id: 'fol05843555 '
year: 1999
...
---
_id: 'fol05843579 '
year: 1999
...
---
_id: 'fol05872355 '
year: 1999
...
exported 3 items
done
Relations like "<", "<=", ">" and ">=" doesn't work for numbers/number strings:
catmandu.yml:
Store records:
Export records:
~Fix: Delete 'trick' in /Catmandu/Store/MongoDB/CQL.pm, line 137~
Can someone please cross check this?