Re: really basic thing that i have somehow forgotten

brad miele <[email protected]> Thu, 26 Oct 2006 07:36:39 -0700 (PDT)
Newsgroups gmane.comp.web.swish-e
Message-ID <[email protected]>
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
[email protected]

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
>> [email protected]
>
> -- 
> Peter Karman  .  http://peknet.com/  .  [email protected]
>
>