Zero Intersections

tyousef
Posts: 12
Joined: Tue Apr 06, 2004 11:53 am

Zero Intersections

Post by tyousef »

Hi Guyes..
I'm trying to compare the results of two queries:
1- A query that has about 11 keywords and at least one keyword is required, in other words, all the words should follow an "OR" logic, this query returns 3 RECORDS, here is the where clause:

where Title\Body like 'Bacardi "Bacardi Breezer" "Smirnoff Ice" "Smirnoff Black Ice" "Archers Cooler" "Vodka Mule" /\RWKD /\R"Red Square" "Baileys Glide" Hooch Reef @0'

2- But when I break up the query so that each keyword runs separate, I get 87 results total, the queries look like this:
where Title\Body like '+Bacardi @0'
where Title\Body like '+"Bacardi Breezer" @0'
where Title\Body like '+"Smirnoff Ice" @0'
where Title\Body like '+"Smirnoff Black Ice" @0'
where Title\Body like '+"Archers Cooler" @0'
where Title\Body like '+"Vodka Mule" @0'
where Title\Body like '+/\RWKD @0'
where Title\Body like '+/\R"Red Square" @0'
where Title\Body like '+"Baileys Glide" @0'
where Title\Body like '+Hooch @0'
where Title\Body like '+Reef @0'


And here are the fixed settings I have in both cases:
<apicp alpostproc 1>
<apicp alintersects 1>
<apicp allinear on>
<apicp qmaxsetwords 10000>
<apicp qminwordlen 1>
<apicp qminprelen 1>
<apicp alwithin on>
<apicp alwild on>
<$noiselist = "">
<apicp noise $noiselist>
<$querymodifier = "[\alpha\' \-\digit]">
<sql "set wordc=$querymodifier"></sql>
<sql "set langc=$querymodifier"></sql>

So, am I missing somethings that causing the first query to *miss* some hits?

thanks.
User avatar
mark
Site Admin
Posts: 5519
Joined: Tue Apr 25, 2000 6:56 pm

Zero Intersections

Post by mark »

Your queries overlap. When done together you won't get the same hit twice. Bacardi will also find the records that "Bacardi Breezer" does.
tyousef
Posts: 12
Joined: Tue Apr 06, 2004 11:53 am

Zero Intersections

Post by tyousef »

I removed the first overlapping keyword "Bacardi" from both queries and still getting different counts, 3 articles when combined, and 77 total when done individually.I'm suspesious about the query syntax.
User avatar
John
Site Admin
Posts: 2622
Joined: Mon Apr 24, 2000 3:18 pm
Location: Cleveland, OH
Contact:

Zero Intersections

Post by John »

The thing to do would be to select the primary key from the record for each of the queries, and then see if there are any records being missed, and if so which subquery is missing them.
John Turnbull
Thunderstone Software
tyousef
Posts: 12
Joined: Tue Apr 06, 2004 11:53 am

Zero Intersections

Post by tyousef »

2 more things, I removed the @0 which as I expected, didn't affect the results, and for some queries I'm getting the warning:
<!-- 105 testquery1:41: Missing blob offset in the function TXgetblob -->
tyousef
Posts: 12
Joined: Tue Apr 06, 2004 11:53 am

Zero Intersections

Post by tyousef »

The problem is in using the /\R for case sensitivity. When I remove it from front of both word "WKD" and "Red Square", it works great.

I also tried adding /\I to force ignoring the case for the other words but still returning 3 articles while it should be somthing over 70.

I did read the documentation regarding using Rex in metamorph searches but nothing seems wrong to me..

here is the last thing I tried (return 3 articles) where Title\Body like '"Bacardi Breezer" "Smirnoff Ice" "Smirnoff Black Ice" "Archers Cooler" "Vodka Mule" /\RWKD /\R"Red Square" /\I"Baileys Glide" /\IHooch /\IReef @0'
User avatar
Kai
Site Admin
Posts: 1272
Joined: Tue Apr 25, 2000 1:27 pm

Zero Intersections

Post by Kai »

It looks like in certain circumstances you'll have to force a non-index search in order to resolve queries with non-indexable pattern matchers (REX, NPM etc.) and intersects.

If the number of intersects (the number after `@') is less than the number of non-indexable pattern matcher sets (eg. `/' terms), then change the search field to one that does not have an index. Eg. in this case, change the query to:

... where Title + ' ' + Body like '...'
tyousef
Posts: 12
Joined: Tue Apr 06, 2004 11:53 am

Zero Intersections

Post by tyousef »

Ok, I tried Title + '' + Body and it didn't work.

I narrowed down the search keywords to 2 keywords, and I tried both Title\Body and Title + '' + Body, here are the 2 queries:
where Title\Body like '/\RWKD Hooch @0'
where Title\Body like 'WKD Hooch @0'

Also I narrowed down the table to only 1 record which is not returned by the first query (with /\R), the word "Hooch" does appear,here is the Body Text:
------------------------
I am the Owner of The Sacramento Comedy Spot in Sacramento, California
which will be opening Summer 2004. We will be hosting ensemble cast comedy
groups that perform sketch comedy and improvisation games and scenes. I am
looking for a band to compose a theme song for one of my comedy troupes-
The Free Hooch Comedy Troupe. Like most of you I am an artist who, at this
point, makes very little money so I can't afford to pay you a huge amount
of money to compose the theme song. I can pay a couple hundered dollars up
front and then I will pay you royalties everytime we play the song in a
show. (3-4 times a week starting this summer.) We can also sell your CD at
the club and on our website. If you are interested please call or email me.
Thanks.
------------------------

Here is the way I'm creating the index(using a script):

<sql "set addexp='[\alnum\x2d\x2e\x21\x24\x26\x27\x40]{2,99}'"></sql>
<sql "create metamorph inverted index xdailythreadsbod on
dailythreads(Title\Body,topics\categories,siteid,New,ispost)"></sql>
tyousef
Posts: 12
Joined: Tue Apr 06, 2004 11:53 am

Zero Intersections

Post by tyousef »

also tried Title+ ' ' + Body
User avatar
Kai
Site Admin
Posts: 1272
Joined: Tue Apr 25, 2000 1:27 pm

Zero Intersections

Post by Kai »

Both of those queries should find that row, with or without an index, because the indexed `Hooch' term appears and you've got allinear turned on. Are there any errors when you run those queries?
Post Reply