I'm trying to execute the following query in Vortex:
"select SiteID,URL,CGIPath,BBSType,SiteType,TotalPosts,RegisteredCount,Active from sites where URL like '%help%'"
But, I'm getting the error:
"Query `%help%' would require post-processing: Set `=%80help%' not indexable"
This query is working in the cmd prompt,, I tried to set apicp variable $alpostproc to on , when I did that,
I got the error:
"Query '%help%' would require linear search "
I have 2 indexes on the URL field: a Unique Index and a Metamorph(regular) index.
See the Vortex manual on <apicp>. Special pattern matchers such as XPM cannot be resolved using a Metamorph index, and require a linear search of the table. Since this can take significant time, and therefore load a live search engine, linear processing is disabled in Vortex by default. It is allowed in tsql because that is a command-line admin tool not intended for production usage (this is why your query worked in tsql but not Vortex).
You can allow linear searches with <apicp allinear on>, but beware that searches such as your example can take a long time especially on a large table, and load your server if highly hit. A better solution is to require the query to be refined with the addition of indexable terms (normal alphanumeric words) that can narrow the amount of post-processing needed, speeding up the query.
You probably don't need XPM syntax in the first place; what exactly are you querying for?
Finding random substrings requires a linear search. You could use
matches '%help%'
or
like '/help'
or
like '*help*'
after enabling linear searching. Keeping in mind that a linear search on a large dataset will be slow.