Having trouble with query: linear search required

Post Reply
User avatar
Thunderstone
Site Admin
Posts: 2504
Joined: Wed Jun 07, 2000 6:20 pm

Having trouble with query: linear search required

Post by Thunderstone »



I have written a basic Vortex script, replacing the supplied "search"
script, to spit out the Meta field for all rows matching a query $q:

<SCRIPT LANGUAGE=vortex>
<DB = /prod/searchdb/mydb>
<A NAME=main>
<SQL ROW MAX=10 "select Meta from html where Body likep $q">
$Meta
</SQL>
</A>
</SCRIPT>

When I run this, with q set to "foo" in the URL, I get the error:


I am reasonably certain the database is indexed, as searches work on the
same DB using the supplied "search" script, and the SQL statement I'm
using
in the script shown above works just fine from the gw command line using
the -s option. I have also run gw a second time with the -index option
just to be sure. Any ideas as to why my query might be failing?

Thanks so much for providing Webinator. It is a great tool, and I
appreciate the tech support on the mailing list too. We'll be upgrading
to
commercial Webinator soon, as we will soon need to index > 10K docs.

Best regards,

Rich Simoni


User avatar
Thunderstone
Site Admin
Posts: 2504
Joined: Wed Jun 07, 2000 6:20 pm

Having trouble with query: linear search required

Post by Thunderstone »



The default metamorph index on the html table is for searching
Title\Meta\Body , not just Body . So you should use
... where Title\Meta\Body likep $q

Or make the appropriate metamorph inverted index for the fields that
you wish to search with likep. See
http://www.thunderstone.com/texisman/node120.html




Post Reply