Search Works Beginning with Punctuation

Post Reply
sroth
Posts: 44
Joined: Mon Jul 23, 2007 11:21 am

Search Works Beginning with Punctuation

Post by sroth »

I would like to find words beginning with punctuation such as
?uestlove
*NSYNC

I when searching on LIKEP *NSYNC, I get this error:
Query `*NSYNC' would require linear dictionary search: Index expression(s) match non-prefix substring of term `*nsync'


I also tried ecaping the * with \*, same error.

Do I need to add a specific index expression to handle this?
User avatar
Kai
Site Admin
Posts: 1272
Joined: Tue Apr 25, 2000 1:27 pm

Search Works Beginning with Punctuation

Post by Kai »

If your Webinator version has it, set Allow Leading Wildcards to Y under All Walk Settings. This will allow leading-wildcard searches such as `*nsync'. These searches are normally disabled, because they require a linear dictionary search: this can be slower than a normal (binary-dictionary) index search, though it is not as slow as a full linear search.
sroth
Posts: 44
Joined: Mon Jul 23, 2007 11:21 am

Search Works Beginning with Punctuation

Post by sroth »

Thanks, I'm not using vortex script. Is there and equivalent apicp setting? Do I need this set when creating the index or just when running the query?
sroth
Posts: 44
Joined: Mon Jul 23, 2007 11:21 am

Search Works Beginning with Punctuation

Post by sroth »

Sorry, typo. I meant to say I am using vortex script not webinator.
sroth
Posts: 44
Joined: Mon Jul 23, 2007 11:21 am

Search Works Beginning with Punctuation

Post by sroth »

I'm now setting these for the query, but still get the same error.

<!-- 202 /test/search:173: set likepallmatch=1; -->
<!-- 202 /test/search:175: set allineardict=1; -->
<!-- 202 /test/search:176: set qminprelen=0; -->
<!-- 202 /test/search:177: set wildsingle=1; -->

'prefixes less than 2 characters (*NSYNC)' not allowed in query
User avatar
Kai
Site Admin
Posts: 1272
Joined: Tue Apr 25, 2000 1:27 pm

Search Works Beginning with Punctuation

Post by Kai »

Make sure you set any APICP settings via <apicp> where possible, instead of <sql "set ...">, as the latter may not propagate properly all the time. E.g. qminprelen is settable via <apicp>, whereas wildsingle is not, so they should be set thusly:

<sql "set wildsingle=1"></sql>
<apicp qminprelen 0>
sroth
Posts: 44
Joined: Mon Jul 23, 2007 11:21 am

Search Works Beginning with Punctuation

Post by sroth »

using <apicp qminprelen 0> fixed it. Thanks.
Post Reply