Page 1 of 1

No results?

Posted: Thu Jan 16, 2003 4:16 pm
by zoeoberon
Hello,

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';

The settings at the top of the script are:

<apicp keepeqvs no>
<apicp alpostproc yes>
<apicp alwithin yes>
<apicp qminwordlen 1>
<SQL NOVARS "set hyphenphrase=0"></SQL>
<rex \x22 $terms>
<if $ret eq ''>
<apicp minwordlen 6>
<SQL NOVARS "set likepallmatch=1"></SQL>
<else>
<apicp exactphrase on>
</if>
<SQL NOVARS "set likeporder=1000"></SQL>
<SQL NOVARS "set likepproximity=1000"></SQL>
<SQL NOVARS "set likepdocfreq=200"></SQL>
<SQL NOVARS "set likeptblfreq=200"></SQL>

The index is created using:

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.

Thanks,
Z.

No results?

Posted: Thu Jan 16, 2003 4:51 pm
by mark
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.

No results?

Posted: Thu Jan 16, 2003 4:54 pm
by zoeoberon
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.

No results?

Posted: Thu Jan 16, 2003 6:10 pm
by mark
"middle age" is a phrase that is known by the equiv. Turn off the equiv with <apicp eqprefix ""> .

No results?

Posted: Fri Jan 17, 2003 10:39 am
by zoeoberon
Why would "middle age" in the equiv mean that no results were found? I would think that having it known in the equiv would results in more matches.

No results?

Posted: Fri Jan 17, 2003 11:17 am
by zoeoberon
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.

Thanks for your help, btw.

No results?

Posted: Fri Jan 17, 2003 11:40 am
by mark
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....

No results?

Posted: Tue Jan 21, 2003 10:09 am
by zoeoberon
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?

Thanks.

No results?

Posted: Tue Jan 21, 2003 10:46 am
by Kai
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).

No results?

Posted: Tue Jan 21, 2003 10:49 am
by zoeoberon
a. ok, thanks

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...