Search for wildcards

Post Reply
astrid.grossboetzl
Posts: 40
Joined: Tue Jan 15, 2002 9:54 am

Search for wildcards

Post by astrid.grossboetzl »

hallo,
we want to search for wildcards at the end of the word.
i.e.: when we search for "killer*" we want find also words as "killerphrases"
we have no searchform. the search is startet over an url and the result is an xml-file.
before the sql-statement i set the following:
<sql "set wildsingle=1"></sql>
<apicp qminprelen 0>
but it doesn't work. are these the wrong parameters?
thanks for help
astrid
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

Search for wildcards

Post by John »

Wildcards should work. Do you get any messages in the vortex.log? Does searching for non-wildcards work? Does it work without the settings?
John Turnbull
Thunderstone Software
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

Search for wildcards

Post by mark »

And what's the "where" clause of your sql query where that search term is used?
astrid.grossboetzl
Posts: 40
Joined: Tue Jan 15, 2002 9:54 am

Search for wildcards

Post by astrid.grossboetzl »

There is no message in the vortex.log.
The normal search without wildcard works correctly.
It also doesn't work without the settings.
but it works, when we make the search over form and not directly over the url: http://servername/scripts/.../main.xml? ... query=kill*

<$sql="from html where Title\Description\Keywords\Meta\Body " $liketype " $$q
and Url matches $$uq
and Depth <= $$dq
and Catno matches $$cq ">
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

Search for wildcards

Post by mark »

Looks like a standard Webinator search.
Compare what variables are set by the form vs. your url.
You could temporarily change the form method to GET instead of POST to aid in getting the necessary settings into the url. Check the browser's address bar after submitting the form. All the variables should be there with method GET.
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

Search for wildcards

Post by John »

Does it work it you URL encode the asterisk with %2A?
John Turnbull
Thunderstone Software
astrid.grossboetzl
Posts: 40
Joined: Tue Jan 15, 2002 9:54 am

Search for wildcards

Post by astrid.grossboetzl »

Id doesn't work with %2A.
Maybe the problem is, that i set the variables at the wrong position, because i set the same values as searching with a form.
i set the variables directly in the central search function.
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

Search for wildcards

Post by mark »

Order doesn't matter. Clearly you're setting something different than the form if you're getting different results. So try the GET method I suggested before to ensure that everything's the same.

If you're setting custom values in the form to override the defaults make sure you set them after the defaults are set in fpar and qpar. Best would be to place your settings at the end of fpar or after fpar or qpar is called.
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

Search for wildcards

Post by mark »

p.s.

Or if you're setting the form vars in the script instead of the internal settings you should do that before fpar instead of after.
Post Reply