Skip to main content.
home | support | download

Back to List Archive

Re: really basic thing that i have somehow forgotten

From: brad miele <bmiele(at)not-real.ipnstock.com>
Date: Thu Oct 26 2006 - 14:36:51 GMT
thanks. someday i won't have to push one thing out of my brain to get a 
new one in...

Brad
---------------------
Brad Miele
VP Technology
IPNStock.com
866 476 7862 x902
bmiele@ipnstock.com

On Thu, 26 Oct 2006, Peter Karman wrote:

> try:
> subject = (not booga)
>
> include the ()
>
> brad miele scribbled on 10/25/06 7:41 PM:
>> Hi,
>> 
>> I have an index and i am trying to basically dump all of the records that 
>> don't have a value in the metname subject. This should be all of them.
>> 
>> when i run the following query to test that subject is indeed a searchable 
>> query, things seem fine:
>> 
>> su-2.05b# ./querytest.pl "waterfall"
>> QUERY: subject = waterfall
>> TOT: 691
>> 
>> however, when i try this, which i think should return virtually every 
>> record, i get nothing:
>> 
>> su-2.05b# ./querytest.pl "not booga"
>> QUERY: subject = not booga
>> TOT: 0
>> 
>> querytest just takes $ARGV[0] and passes it to the index via Swish::API, 
>> since that is what i will ultimately use.
>> 
>> what incredibly basic thing have i overlooked?
>> 
>> #!/usr/local/bin/perl
>> 
>> use strict;
>> use SWISH::API;
>> 
>> my $q = $ARGV[0];
>> my $qstringfmt = "subject = %s";
>> my $query = sprintf($qstringfmt,($q));
>> 
>> print "QUERY: $query\n";
>> 
>> my $idx = "/usr/local/apache/indexing/indexes/master_ipn.index";
>>
>>     my $swish = SWISH::API->new( $idx );
>>          if ($swish->Error){ print STDERR "ERR:".$swish->ErrorString; }
>>
>>     my $search = $swish->New_Search_Object( $query );
>>          if ($swish->Error){ print STDERR "ERR:".$swish->ErrorString; }
>>
>>     my $results = $search->Execute;
>>          if ($swish->Error){ print STDERR "ERR:".$swish->ErrorString; }
>>
>>     my $hits = $results->Hits;
>>     print "TOT: ".$hits."\n";
>> 
>> exit;
>> 
>> regards,
>> 
>> Brad
>> ---------------------
>> Brad Miele
>> VP Technology
>> IPNStock.com
>> 866 476 7862 x902
>> bmiele@ipnstock.com
>
> -- 
> Peter Karman  .  http://peknet.com/  .  peter(at)not-real.peknet.com
>
>
Received on Thu Oct 26 07:36:52 2006