I think this is a continuation of my previous issue, but since I'm not sure, I'm starting this as a new thread. In any case, this is still a very high priority issue for us, as we are in the middle of a project, and its progress is hampered until we can find a work-around or resolution.
We have a number of equivalences we use in our queries. In some of those queries we combine suffix processing suppression (by using @suffixproc=0 inline in the query) in conjunction with requiring at least one of the equivalent terms (by prepending + to the root term). This combination seems to be causing an issue.
Below is a script that shows, in a nutshell, what we are seeing. It indexes exactly as we index our production data and it sets all of the query parameters that we use in our code. In it are a number of queries. However, it is only the LAST query that is representative of the kind of construct we'd like to use in this case, and it is the one that is not returning a hit. We don't know why that is. Perhaps we are missing something, or are misunderstanding how Texis handles this construct. In any case, we are expecting a hit for the last query, but are not getting one.
For this to work, you will need to build an equivalence file (called TestEquivs.lst in the script) from the following:
phatype;n,poly-hydroxy-alkanoate
xpolymertype;n,copolymer
xpolymertype;n,copolymers
xpolymertype;n,plastic
xpolymertype;n,plastics
xpolymertype;n,polymer
xpolymertype;n,polymers
xpolymertype;n,thermoplastic
xpolymertype;n,thermoplastics
Here is the script:
<script language=vortex>
<a name=main>
<db=<your db path here>>
<!-- Create table -->
<sql novars "drop table test"></sql>
<sql novars "create table test(Text varchar(20))"></sql>
<$text="polymer is selected from the group consisting of poly(hydroxy alkanoates)">
<loop $text>
<sql novars "insert into test (Text) values ($text)"></sql>
</loop>
<!-- Index table -->
<sql "set delexp=0"></sql>
<sql "set addexp='\alnum{1,99}'"></sql>
<sql "set keepnoise=1"></sql>
<sql "create metamorph inverted index xtext on test(Text)"></sql>
<!-- Query parameters -->
<apicp eqprefix d:\Crosshairs\appData1\equivfiles\TestEquivs>
<apicp keepeqvs 1>
<apicp alequivs 1>
<apicp alpostproc 1>
<apicp allinear 1>
<apicp alintersects 1>
<apicp intersects -1>
<apicp alwithin 1>
<apicp minwordlen 5>
<apicp qmaxsetwords 10000>
<apicp qmaxwords 10000>
<sql "set indexwithin=7"></sql>
<sql "set hyphenphrase=1"></sql>
<apicp keepnoise 1>
<apicp withinmode "word span">
<!-- Queries -->
xPOLYMERTYPE only, suffix processing suppressed:
<sql "select Text from test where Text like '@suffixproc=0 xPOLYMERTYPE @suffixproc=1 @0'">
$Text
</sql>
hits: $loop
xPOLYMERTYPE (required) only, suffix processing suppressed:
<sql "select Text from test where Text like '@suffixproc=0 +xPOLYMERTYPE @suffixproc=1 @0'">
$Text
</sql>
hits: $loop
PHATYPE only:
<sql "select Text from test where Text like 'PHATYPE @0'">
$Text
</sql>
hits: $loop
Both, suffix processing suppressed, but xPOLYMERTYPE not required:
<sql "select Text from test where Text like '@suffixproc=0 xPOLYMERTYPE @suffixproc=1 @0 PHATYPE w/20'">
$Text
</sql>
hits: $loop
xPOLYMERTYPE (required) only, suffix processing not suppressed:
<sql "select Text from test where Text like '+xPOLYMERTYPE @0 PHATYPE w/20'">
$Text
</sql>
hits: $loop
xPOLYMERTYPE only, suffix processing not suppressed:
<sql "select Text from test where Text like 'xPOLYMERTYPE @0 PHATYPE w/20'">
$Text
</sql>
hits: $loop
Both (xPOLYMERTYPE required):
<sql "select Text from test where Text like '@suffixproc=0 +xPOLYMERTYPE @suffixproc=1 @0 PHATYPE w/20'">
$Text
</sql>
hits: $loop <-- Why is this zero when "xPOLYMERTYPE (required) only" returns a hit?
</a>
</script>
Thanks so much for your continued help.
We have a number of equivalences we use in our queries. In some of those queries we combine suffix processing suppression (by using @suffixproc=0 inline in the query) in conjunction with requiring at least one of the equivalent terms (by prepending + to the root term). This combination seems to be causing an issue.
Below is a script that shows, in a nutshell, what we are seeing. It indexes exactly as we index our production data and it sets all of the query parameters that we use in our code. In it are a number of queries. However, it is only the LAST query that is representative of the kind of construct we'd like to use in this case, and it is the one that is not returning a hit. We don't know why that is. Perhaps we are missing something, or are misunderstanding how Texis handles this construct. In any case, we are expecting a hit for the last query, but are not getting one.
For this to work, you will need to build an equivalence file (called TestEquivs.lst in the script) from the following:
phatype;n,poly-hydroxy-alkanoate
xpolymertype;n,copolymer
xpolymertype;n,copolymers
xpolymertype;n,plastic
xpolymertype;n,plastics
xpolymertype;n,polymer
xpolymertype;n,polymers
xpolymertype;n,thermoplastic
xpolymertype;n,thermoplastics
Here is the script:
<script language=vortex>
<a name=main>
<db=<your db path here>>
<!-- Create table -->
<sql novars "drop table test"></sql>
<sql novars "create table test(Text varchar(20))"></sql>
<$text="polymer is selected from the group consisting of poly(hydroxy alkanoates)">
<loop $text>
<sql novars "insert into test (Text) values ($text)"></sql>
</loop>
<!-- Index table -->
<sql "set delexp=0"></sql>
<sql "set addexp='\alnum{1,99}'"></sql>
<sql "set keepnoise=1"></sql>
<sql "create metamorph inverted index xtext on test(Text)"></sql>
<!-- Query parameters -->
<apicp eqprefix d:\Crosshairs\appData1\equivfiles\TestEquivs>
<apicp keepeqvs 1>
<apicp alequivs 1>
<apicp alpostproc 1>
<apicp allinear 1>
<apicp alintersects 1>
<apicp intersects -1>
<apicp alwithin 1>
<apicp minwordlen 5>
<apicp qmaxsetwords 10000>
<apicp qmaxwords 10000>
<sql "set indexwithin=7"></sql>
<sql "set hyphenphrase=1"></sql>
<apicp keepnoise 1>
<apicp withinmode "word span">
<!-- Queries -->
xPOLYMERTYPE only, suffix processing suppressed:
<sql "select Text from test where Text like '@suffixproc=0 xPOLYMERTYPE @suffixproc=1 @0'">
$Text
</sql>
hits: $loop
xPOLYMERTYPE (required) only, suffix processing suppressed:
<sql "select Text from test where Text like '@suffixproc=0 +xPOLYMERTYPE @suffixproc=1 @0'">
$Text
</sql>
hits: $loop
PHATYPE only:
<sql "select Text from test where Text like 'PHATYPE @0'">
$Text
</sql>
hits: $loop
Both, suffix processing suppressed, but xPOLYMERTYPE not required:
<sql "select Text from test where Text like '@suffixproc=0 xPOLYMERTYPE @suffixproc=1 @0 PHATYPE w/20'">
$Text
</sql>
hits: $loop
xPOLYMERTYPE (required) only, suffix processing not suppressed:
<sql "select Text from test where Text like '+xPOLYMERTYPE @0 PHATYPE w/20'">
$Text
</sql>
hits: $loop
xPOLYMERTYPE only, suffix processing not suppressed:
<sql "select Text from test where Text like 'xPOLYMERTYPE @0 PHATYPE w/20'">
$Text
</sql>
hits: $loop
Both (xPOLYMERTYPE required):
<sql "select Text from test where Text like '@suffixproc=0 +xPOLYMERTYPE @suffixproc=1 @0 PHATYPE w/20'">
$Text
</sql>
hits: $loop <-- Why is this zero when "xPOLYMERTYPE (required) only" returns a hit?
</a>
</script>
Thanks so much for your continued help.