Page 1 of 1
Post-Processing
Posted: Tue Nov 13, 2001 3:59 pm
by source1Tamer
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.
Any help??
Post-Processing
Posted: Tue Nov 13, 2001 4:47 pm
by Kai
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?
Post-Processing
Posted: Tue Nov 13, 2001 4:48 pm
by mark
What are you really trying to search for? That's almost certainly the wrong syntax.
Note that tsql does not have protection against bad queries by default whereas vortex does.
Post-Processing
Posted: Tue Nov 13, 2001 5:03 pm
by source1Tamer
I'm trying to search for the URLs containing the word 'help'.
So I need to get all the results including:
helpline.com (starts with 'help')
Cars.Autohelp (ends with 'help')
www.helpme.com (inside the phrase)
that's it..
Tamer
Post-Processing
Posted: Tue Nov 13, 2001 5:42 pm
by mark
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.
Post-Processing
Posted: Wed Nov 14, 2001 1:00 pm
by source1Tamer
thanks mark, The 'matches' key with '%keyword%' is working fine and fast as well..