I'm trying to allow the user to search for a dexterity content type with partial strings, but not just 'starting with'. I was reading about Products.AdvancedQuery and it had a function MatchRegex and I was hoping to be able to use it.
An example off the top of my head of what I mean:
I have a ZCTextIndex 'Model' that a dexterity content type 'Asset' has.
The user wants to search for assets by model number and enter in a field on a search form '7600' and there are assets with model numbers WE7600VE, XE7600WX, TV7600VY. I want them to be able to get the assets with these models. Is it possible to use AdvancedQuery to solve this?
I was trying to check if I could use '' in a regex expression for testing to see if I could get to something that would allow [0-9A-Fa-f], and then build from there.
As a starting point, I tried this:
q = AdvancedQuery.MatchRegexp('Model','[W]E7600VE')
brains = p_catalog.evalAdvancedQuery(q)
I was hoping it would return the Asset with the model WE7600VE just to see if using 's worked, but it returns 0. Am I on the wrong track trying to use AdvancedQuery?
I'm using Plone 5.1.4.