metamorph index using virtual field

Post Reply
sourceone
Posts: 47
Joined: Tue Mar 29, 2005 2:10 pm

metamorph index using virtual field

Post by sourceone »

I created a metamorph inverted index using the following statement:

create metamorph inverted index xtblbod on tbl(title\body\description)

I want to give the user the option to select which fields to search on. So if the user wants to search on the title field only, how would I construct the query? I tried using:

select * from tbl where title like 'search'

but I get the "Query 'school' would require linear search" error which I know is happening because the other parts of the virtual field are not included in the query.
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

metamorph index using virtual field

Post by mark »

You have to index the same combination of fields you want to search. So you'll also need an index on just "title'.
sourceone
Posts: 47
Joined: Tue Mar 29, 2005 2:10 pm

metamorph index using virtual field

Post by sourceone »

So I would have to create separate indexes for every possible combination of fields (title\body, title\description, ...)?
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

metamorph index using virtual field

Post by mark »

Yes.
Post Reply