I have a query that returns results using TSQL directly against the database but doesn't in the query script. Odd. I'm hoping you can point out why this is happening.
The query is:
select Title,Sitedirname,Description,Link,Display_Type from corpus where Title\Keywords\Description\Content\Sitedirname likep 'middle age';
set indexmem=40;
set delexp=0;
set addexp='[\alnum&\-\x80-\xff]{1,99}';
set addexp='[\alnum&\-\x80-\xff\x27]{1,99}';
create metamorph inverted index xcorpus2 on corpus(Title\Keywords\Description\Content\Sitedirname,Adult);
But if it was the index, the query against the database wouldn't work either, right?
I know there's matching content since if you search for "middle age" in quotes you get quite a few results.
Vortex has somewhat more strict defaults than tsql to prevent bad queries on your public server. View the source of the results page and look for error messages within html comments. They will probably indicate what the problem is.
Rule of thumb: Whenever a vortex script does not work as expected view the source for the results and look for error/warning messages within html comments. You can also find the same errors in your INSTALLDIR/texis/vortex.log file.
That was the first thing I did. No error messages in the vortex.log or the HTML returned. I also checked the noise words list and thought through what could possibly getting caught with the lexical processing but can't think of anything. I also tried commenting out some of the setting which had no affect either.
Also reading in the manual, with <apicp keepeqvs no> set explicitly and the default of the alequivs setting being off, why is the thesaurus file being accessed at all? I don't understand the steps the metamorph query is taking in this case.
My concern with nulling out the equivs file is that I can't lose the prefix/suffix processing and it's not clear to me that is separate? Basically, don't want to null this out for this one query without understanding how it affect all queries.
As long as an equiv file (whether builtin or external) is set it will be consulted for phrases. Keepeqvs controls whether synonyms of found words/phrases will be kept and searched for. The equiv plays no role in suffix processing.
"middle age" with the default suffix settings is somewhat idiosyncratic. The suffix "age" gets removed and leaves "middle ". The trailing space prevents the "word" from matching. Better suffix handling for phrases is in the works....
Two follow up question:
a. when you say "in the works", is there a time frame?
b. i'm pretty sure I know the answer to this but i'm going to ask anyway ... is there something that can be checked after a <SQL> call that will tell you something like no results were found?
a. No definite time frame as yet.
b. Yes: check $loop, which is the number of rows returned by the <SQL> statement. It is set inside the loop as well as after it ends, even if no rows are returned (eg. $loop = 0).
b. yes, but there's nothing that would tell me why there were no rows found? i'm trying to see if there's a way to pick up the idiosyncratic phrase problem and handle it without possibly degrading the search relevancy for everything else by removing all phrase handling. i pretty sure the answer is no but i'm asking just in case...