Returning search results based on Host:

Post Reply
mjacobson
Posts: 204
Joined: Fri Feb 08, 2002 3:35 pm

Returning search results based on Host:

Post by mjacobson »

We are using Webinator 2.5 commercial version to index a Intranet. If someone searches for host:www.somesite.com cargo +tank -plane they would like to get only the search results back that are located on the www.somesite.com server.

I am just a beginner at Vortex so I am at a complete loss on how to make the needed changes to the SQL to make this happen. Any pointers would be helpful
User avatar
mark
Site Admin
Posts: 5513
Joined: Tue Apr 25, 2000 6:56 pm

Returning search results based on Host:

Post by mark »

In the beginning of the fpar function you could do something like this:
<rex ">>host:\P=[^ ]+" $query>
<if $ret ne "">
<strfmt "%s%%" $ret>
<$uq=$ret>
<sandr ">>host:=[^ ]+" "" $query>
<$q=$ret>
<else>
<$q=$query>
</if>
Then remove the
<$q=$query>
from the qpar function.

(disclaimer: I haven't tested the above code, but I expect that it should work.)
mjacobson
Posts: 204
Joined: Fri Feb 08, 2002 3:35 pm

Returning search results based on Host:

Post by mjacobson »

Thanks The code seems to work fine.
Post Reply