Page 1 of 1
Search for wildcards
Posted: Thu Jan 03, 2008 3:43 am
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
Search for wildcards
Posted: Thu Jan 03, 2008 8:41 am
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?
Search for wildcards
Posted: Thu Jan 03, 2008 12:21 pm
by mark
And what's the "where" clause of your sql query where that search term is used?
Search for wildcards
Posted: Fri Jan 04, 2008 2:45 am
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 ">
Search for wildcards
Posted: Fri Jan 04, 2008 10:15 am
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.
Search for wildcards
Posted: Fri Jan 04, 2008 11:30 am
by John
Does it work it you URL encode the asterisk with %2A?
Search for wildcards
Posted: Mon Jan 07, 2008 6:25 am
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.
Search for wildcards
Posted: Mon Jan 07, 2008 11:06 am
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.
Search for wildcards
Posted: Mon Jan 07, 2008 11:08 am
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.