Skip to main content.
home | support | download

Back to List Archive

from the too lazy to do it in indexing department (remove duplicates)

From: Brad Miele <brad(at)not-real.auroraquanta.com>
Date: Tue Feb 24 2004 - 16:44:38 GMT
Hi,

I have an index that is generated via -S prog as xml, in the output for
each records, i have some attributes that are like this:

<Photographers>
	<photographer>Foo</photographer>
	<photographer>Bar</photographer>
</Photographers>

When I build my query, i join a list of photographers to search:

my @search_sites = ('Foo','Bar');
$query = qq[(($query) and sphotogs=(].join(' OR ',@search_sites).qq[))];

The problem with this is that in records that have both Foo and Bar as
entries, i get duplicate results.

I can't seem to build the right boolean to remove the doplicates. If id
try to do  "not (Foo and Bar)", i lose the record alltogether.

any thoughts on this? no need to mock my one dimensional thinking or
general laaziness.

Brad
------------------------------------------------------------
 Brad Miele
 Technology Director
 AuroraPhotos.com
 (207) 828-8787 x110
 bmiele@auroraphotos.com

 The more laws and order are made prominent, the more thieves and
robbers there will be.
		-- Lao Tsu
Received on Tue Feb 24 08:44:45 2004