Page 1 of 2
Query 'jake.jacobson' would require post-processing ...
Posted: Wed Jul 27, 2011 11:08 am
by mjacobson
I am having trouble again with getting the correct addexp syntax. I need to be able to be able to query for terms with . _ - in the query term. I have the following addexp which I was hoping would take care of the issue.
<sql "set addexp='[\alnum\/\+\-\._/]{1,70}'"></sql>
I then dropped the index and rebuilt it but I get the same errors.
Query 'jake.jacobson' would require post-processing ...
Posted: Wed Jul 27, 2011 11:45 am
by Kai
Did you drop and remake the index in the same process that you set the addexp in? `set addexp' only applies to the current process.
Also, if you wish to search for `-' (hyphen) as a literal character and not use it as a phrase conjugator, then at search time you should `set hyphenphrase=0' so that hyphen is taken literally between words and not as a phrase indicator.
Query 'jake.jacobson' would require post-processing ...
Posted: Wed Jul 27, 2011 11:48 am
by mjacobson
Yes, I did drop and rebuild the indexes. I will add the set hyphenphrase=0.
Query 'jake.jacobson' would require post-processing ...
Posted: Wed Jul 27, 2011 11:57 am
by mark
Depending on what you want you might use a slightly different expression to only get embedded punctuations and not those before or after:
\alnum{1,70}>>[+\-._/]=\alnum{1,70}
Query 'jake.jacobson' would require post-processing ...
Posted: Wed Jul 27, 2011 11:59 am
by Kai
But did you drop and remake the indexes in the *same* tsql/texis invocation as `set addexp', i.e. all in one script/command-line? The `set addexp' value is lost unless the new index is created in the same process.
Query 'jake.jacobson' would require post-processing ...
Posted: Wed Jul 27, 2011 12:06 pm
by mjacobson
I believe so, I have the following code
<ENTRYFUNC=initialize>
<a name=initialize>
<sql "set addexp='[\alnum\/\+\-\._/]{1,70}'"></sql>
</a>
<a name=rebuildIndexes PUBLIC>
<sql "drop index mmjMUserID"></sql>
<sql "create metamorph inverted index mmjMUserID on janesMasterLogs (userid)"></sql>
</a>
Since I have ENTRYFUNC set, that should execute before the rebuildIndexes is executed.
Query 'jake.jacobson' would require post-processing ...
Posted: Wed Jul 27, 2011 12:12 pm
by Kai
That looks correct. What is the full SQL you use for the search that gives the `Query 'jake.jacobson' would require post-processing' error? Also, are there any other indexes on janesMasterLogs(userid)?
Query 'jake.jacobson' would require post-processing ...
Posted: Wed Jul 27, 2011 12:24 pm
by mjacobson
How would I tell if there are any other indexes? I was thinking that might be the issue but didn't know how to test it out. Is there a query I can make to the SYSTEM tables in the database?
The query looks like:
<sql "UPDATE janesMasterLogs SET userdomain='mydomain' WHERE userid LIKE 'jake.jacobson'"></sql>
Query 'jake.jacobson' would require post-processing ...
Posted: Wed Jul 27, 2011 12:44 pm
by Kai
You can check for other indexes with:
select * from SYSINDEX where TBNAME='janesMasterLogs' and (TYPE = 'M' or TYPE = 'F');
That will list all Metamorph indexes (type F or M) on the table. Look at the FIELDS value to see the fields that the index(es) are on.
Query 'jake.jacobson' would require post-processing ...
Posted: Wed Jul 27, 2011 12:47 pm
by mark
Unrelated issue, are you sure you want "like" rather than "=" for userid lookup?