likep

Post Reply
sourceuno
Posts: 225
Joined: Mon Apr 09, 2001 3:58 pm

likep

Post by sourceuno »

I have a table similar to the html table from the dowalk_beta script. Here's the definition of the metamorph index:
create metamorph inverted index xhtmlbod on html(Title\Description\Keywords\Body)

I want to perform a keyword search that only search the keyword field of a record along with a full text search that searches only the Title and Body fields. When I try the following query,

<sql "select 'http://'+Url Url, Title, $$rank Rank from html where Title\Body\Metadata likep $defaultquery and Keywords like $keywordquery"></sql>

I get the following error:
<!-- 115 /vortex/search:725: Query would require linear search -->

How would I propery construct the query to do what I need?
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

likep

Post by mark »

You need to create separate indices on the fields the way you want to search them. One on Title\Body\Metadata and one on Keywords.
sourceuno
Posts: 225
Joined: Mon Apr 09, 2001 3:58 pm

likep

Post by sourceuno »

Would I keep the index on Title\Body\Metadata as a metamorph index? What type of index would I use on the field Keywords?
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

likep

Post by mark »

like and likep both use metamorph [inverted] indices.
sourceuno
Posts: 225
Joined: Mon Apr 09, 2001 3:58 pm

likep

Post by sourceuno »

I thought that I read somewhere that you should only have 1 metamorph index on a table. Are you saying that I need to create a metamorph index for Title\Body\Metadata and a separate one for Keywords?
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

likep

Post by mark »

I'm not sure where you got that. If you find it again let me know where.
You may have as many indices of any type as are needed.
Post Reply