I never had to do this before, do we have an Indexes for number (float/int) for Zcatalog so that you can compare number and in a Collection say, give me all items with value x > 5? There's a lot for comparing and advanced searching of Dates in Zope Plone, but do we have the same for simple numbers?
I do this:
items = portal_catalog(
{'age': {
'query':[18,38],
'range':'min:max' }
}
)
look in the catalog docs
Thanks! I missed that snippet in the Plone documentation. So it seems FieldIndex supports number and allows for comparison/range operations on them. I was looking it up in the ZCcatalog/Zope documentation and Fieldindex is being documented as only being able to find 'unique' fields.
https://docs.plone.org/develop/plone/searching_and_indexing/query.html#id27
It does not only apply to number but to any ordered data. TextIndexNG3 uses the underlaying functionality of the ZODB - BTrees in particular - for searching for example all strings between "aa" and "cc".