Page 2 of 2

Searching for emailds give post processing errors

Posted: Thu Jul 27, 2006 10:52 am
by mark
Should the search consider "theory" a match for "the"? It doesn't. Neither does it consider "5012" a match for "501". If you want prefix you need to use wildcard "501*".

Searching for emailds give post processing errors

Posted: Thu Jul 27, 2006 11:00 am
by Texis User
Mark,

Here I was asked to apend asterisk to all the words in the query.

http://thunderstone.master.com/texis/ma ... =39f468963

And I am doing that.
Basically what goes to the <SQL is
501* swetha*
50* swetha*

Yet I don't get the right result.
Infact the behavior is totally different

When I search for say 5012 swetha I see some reults and the person I am looking for.

When I search for 501 swetha I see result but the person I am looking for is not there.

When I search for 50 swetha I see no results.

Below is the code snippet


<$expr=">>[\space+]=">
<$replace = "\* ">
<sandr $expr $replace $txtpplsrch>

<$search_string = $ret "*"><sum "%s" $search_string><$search_string=$ret>

<apicp minwordlen 3>

<!-- $sqlquery
first_name\last_name\preferred_name\email\business_name\sub_business_name\function_name\ohr_id\supervisor_name\expert_brief_desc\dialcomm\sc_first_name\sc_last_name\other_info
likep
'$search_string' $endquery1 -->

<SQL ROW SKIP=$skip MAX=100
$sqlquery " first_name\last_name\preferred_name\email\business_name\sub_business_name\function_name\ohr_id\supervisor_name\expert_brief_desc\dialcomm\sc_first_name\sc_last_name\other_info likep $search_string " $endquery1>
<if $indexcount neq 0>
<has_records>
</if>
</SQL>

Searching for emailds give post processing errors

Posted: Thu Jul 27, 2006 12:47 pm
by mark
We'd need to see the full actual sql and parameters being passed in to comment accurately. Use
<sqlcp tracesql 2>
to see what's being executed.

Searching for emailds give post processing errors

Posted: Thu Jul 27, 2006 12:49 pm
by mark
And, where you're checking indexcount, there will always be a record, even if indexcount is 0 so you could be suppressing results in some cases.

Searching for emailds give post processing errors

Posted: Thu Jul 27, 2006 12:54 pm
by Texis User
Then how do check condition no record returned.

Searching for emailds give post processing errors

Posted: Thu Jul 27, 2006 1:57 pm
by mark
After </sql> check $loop for 0.