Page 1 of 1

metamorph index using virtual field

Posted: Tue May 09, 2006 12:30 pm
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.

metamorph index using virtual field

Posted: Tue May 09, 2006 1:24 pm
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'.

metamorph index using virtual field

Posted: Tue May 09, 2006 2:23 pm
by sourceone
So I would have to create separate indexes for every possible combination of fields (title\body, title\description, ...)?

metamorph index using virtual field

Posted: Tue May 09, 2006 3:06 pm
by mark
Yes.