Page 1 of 1

Create Metamorph Query Commas

Posted: Thu Mar 13, 2003 5:36 pm
by foosh101
I am doing the following from a .cmd file to created an inverted metamorph query.

d:\morph3\tsql -d d:\morph3\texis\mktDB "DROP INDEX mkt1000000Inverted;SET ignorecase=1;set addexp='\alnum+[\/\.]{1}\alnum+';CREATE METAMORPH INVERTED INDEX mkt1000000Inverted ON mkt1000000 (Headline\ListingDescription)"

I understand using the slash to create an index on a virtual field, but what happens when I put a comma and another field?

ie
CREATE METAMORPH INVERTED INDEX mkt1000000Inverted ON mkt1000000 (Headline\ListingDescription,CategoryDescription)

Create Metamorph Query Commas

Posted: Thu Mar 13, 2003 5:47 pm
by mark
From http://www.thunderstone.com/site/texisman/node121.html

Additional columns can be specified in addition to the text field to be indexed. These should be fixed length fields, such as dates, counters or numbers. The extra data in the index can be used to improve searches which combine a LIKE statement with restrictions on the other fields, or which ORDER BY some or all of the other fields.

Create Metamorph Query Commas

Posted: Fri Mar 14, 2003 10:02 am
by foosh101
Interesting... I have about 12-15 different fields that I index on one of my tables, because those are all the fields that the user can search by. I currently do not do any combination of fields as described above. I index each of the fields that they can search by themselves. However, they can search by any combination of these fields. Should I also create indexes with combinations of fields, in addition to each field indexed by themselves. IE

Index ListingDescription
Index DateStart
Index ListingDescription, DateStart

I currently have chkind turned off so that the metamorph queries are only updated when I tell them to be. Is there any downside to having many, many indexes other than the time it takes to create them then.

Create Metamorph Query Commas

Posted: Fri Mar 14, 2003 11:34 am
by foosh101
So you can only create a compound index for metamorph query then?

Would the idea be then to make each metamorph query a compound one, including all of the date, integer, and double fields that can be possible searched or sorted by? And then create normal indexes on those date, integer and double fields individually? There is no down side to not having specific indexes for the metamorph fields. For example, if I have a compound index on (Headline\ListingDescription, ListingID, DateStart, DateEnd, Price), and someone does a search "where Headline\ListingDescription like 'gold'"), is it still more efficient to have the compound index, or would it be more efficient to be able to go against an index that solely worries about Headline\ListingDescription?