Having problems with search over "publications"

Post Reply
henryj0
Posts: 4
Joined: Thu Apr 17, 2003 3:55 pm

Having problems with search over "publications"

Post by henryj0 »

I have a query over an employee database that is searching where Title\Meta\Body over HTML table. The query works for fine in all cases except where $query is set to "publications" or "publ*". The query in question is "SELECT count(*) FROM html where Title\Meta\Body LIKE $query and Meta LIKE $query". If I remove the 'and' clause I receive the entire database count with 'and' clause I receive count of 0 (I am expecting 32). If I run this query from a unix command line I receive the expected 32. I also have similar results while experimenting with the where clause: Title\Meta, etc. Within the script I receive 0 count, but from the command line I receive values. The 'and' clause is used to remove references to employee supervisors with the search name. Why am I receiving a 0 count when I use the and clause? Hank.
henryj0
Posts: 4
Joined: Thu Apr 17, 2003 3:55 pm

Having problems with search over "publications"

Post by henryj0 »

John-
I sent your response to our network group who maintain the scripts which create the search table (html) and create indexes over the table. This was their response: "I am not performing any 'special' indexes, I am simply performing a complete index of the entire DB, so I'n not sure what they are referring to by 'indexing both'". Would a complete index resolve your suggestion of indexing for Table\Meta\Body and Meta?

Regarding your comment on validity of Meta and Title\Meta\Body query being the same: the purpose of the meta clause is to exclude elements that exist in the body. If I exclude the Body from Table\Meta\Body where clause I get 0 results. Hank.
henryj0
Posts: 4
Joined: Thu Apr 17, 2003 3:55 pm

Having problems with search over "publications"

Post by henryj0 »

Is there a way to create and inverted index through the gw utility? Hank.
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

Having problems with search over "publications"

Post by mark »

gw only creates the default Webinator indices. To create anything custom you need to give a SQL statement to "texis" or write a small vortex small vortex script to execute the desired SQL.

See the manual for complete syntax to "create metamorph inverted index". There are also various examples throughout these message boards.
henryj0
Posts: 4
Joined: Thu Apr 17, 2003 3:55 pm

Having problems with search over "publications"

Post by henryj0 »

From a Unix command line I can run variations of a query and receive valid data. When using a script over Webinator my query only works if I have combine columns in my "where clause".

This works in Webinator and command line...
SELECT * FROM html WHERE Title\Meta\Body like 'dennis'

This will not work through Webinator, but does from the command line...
SELECT * FROM html WHERE Title\Meta LIKE 'dennis'

How can I get, or why can I not get, the second option to work in Webinator. Thanks, Hank.
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

Having problems with search over "publications"

Post by mark »

The search script has query protection in place by default to prevent users from slamming your server by doing unindexed searches. Create the appropriate indices for the searches you want to do.
Post Reply