Post-Processing

Post Reply
source1Tamer
Posts: 91
Joined: Tue Nov 13, 2001 3:49 pm

Post-Processing

Post 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??
User avatar
Kai
Site Admin
Posts: 1272
Joined: Tue Apr 25, 2000 1:27 pm

Post-Processing

Post 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?
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

Post-Processing

Post 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.
source1Tamer
Posts: 91
Joined: Tue Nov 13, 2001 3:49 pm

Post-Processing

Post 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
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

Post-Processing

Post 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.
source1Tamer
Posts: 91
Joined: Tue Nov 13, 2001 3:49 pm

Post-Processing

Post by source1Tamer »

thanks mark, The 'matches' key with '%keyword%' is working fine and fast as well..
Post Reply