I have a metamorph index on a table. It returns substrings matches, the metamorph index is Fresh and the table is not updated after creation of the index.
here is an example:
<apicp alpostproc 1>
<apicp alintersects 1>
<apicp alwithin on>
<db=dbpath is here>
<$keywords='+("t 20",ritonavir) @0 w/50'>
<sql "select count(*) as counts from dailythreads where Title\Body like $keywords and New=1">
$counts
</sql>
the $count is 1193 because there are matches like "Oct 2002" related to the keyword "t 20", but when I take the "t 20" off, the $count variable is 1 which is a good match for the keyword "ritonavir".
BTW, the quotes within a paren list are not needed and are discouraged. Phrases are automatically bound by the parens and commas with a list. <$keywords='+(t 20,ritonavir) @0 w/50'>
Should I set this before index creation?
I tried:
<sql "set addexp='[\alnum\x2d\x2e\x21\x24\x26\x27\x40]{2,99}'"></sql>
<$langcstring = "[\alpha\' \-\digit]">
<sql "set langc=$langcstring"></sql>
<sql "create metamorph inverted index xdailythreadsbod on dailythreads(Title\Body,topics\categories,siteid,New,ispost)"></sql>
but it didn't work
also I tried (from a another message board thread) and also didn't work.
It should be set before doing the query. You might also want to index single character words i.e. {1,99}, f that sort of query is common, which would allow the 't' to be indexed and use the index for it.
so is "[\alpha\' \-\digit]" the right expression to use for langc?
Should I leave "wordc" optimizer with the default, or should I change it too to be the same as langc as it says in the documentaion?