Changeset 2574


Ignore:
Timestamp:
03/03/10 22:41:54 (5 months ago)
Author:
karpet
Message:

fix op bugs

Location:
Search-Query-Dialect-KSx/trunk
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • Search-Query-Dialect-KSx/trunk/Changes

    r2570 r2574  
    1111        * POD fix in NOTWildcardQuery that caused cpan 
    1212          to not link the .pm with the .pod 
     13        * fix op bugs in stringify_clause() 
    1314 
    14 0.03    xxx 
    15         * POD fix in NOTWildcardQuery that caused cpan 
    16           to not link the .pm with the .pod 
    17  
    18 0.03    xxx 
    19         * POD fix in NOTWildcardQuery that caused cpan 
    20           to not link the .pm with the .pod 
    21  
    22 0.03    xxx 
    23         * POD fix in NOTWildcardQuery that caused cpan 
    24           to not link the .pm with the .pod 
    25  
    26 0.03    xxx 
    27         * POD fix in NOTWildcardQuery that caused cpan 
    28           to not link the .pm with the .pod 
    29  
    30 0.03    xxx 
    31         * POD fix in NOTWildcardQuery that caused cpan 
    32           to not link the .pm with the .pod 
    33  
    34 0.03    xxx 
    35         * POD fix in NOTWildcardQuery that caused cpan 
    36           to not link the .pm with the .pod 
    37  
    38 0.03    xxx 
    39         * POD fix in NOTWildcardQuery that caused cpan 
    40           to not link the .pm with the .pod 
    41  
    42 0.03    xxx 
    43         * POD fix in NOTWildcardQuery that caused cpan 
    44           to not link the .pm with the .pod 
    45  
  • Search-Query-Dialect-KSx/trunk/lib/Search/Query/Dialect/KSx.pm

    r2570 r2574  
    174174    # normalize operator 
    175175    my $op = $clause->{op} || ":"; 
    176     if ( $op eq '=' ) { 
    177         $op = ':'; 
    178     } 
     176    $op =~ s/=/:/g; 
    179177    if ( $prefix eq '-' ) { 
    180         $op = '!' . $op; 
    181     } 
    182     if ( $value =~ m/\%/ ) { 
    183         $op = $prefix eq '-' ? '!~' : '~'; 
     178        $op = '!' . $op unless $op =~ m/^!/; 
     179    } 
     180    if ( $value =~ m/\*/ ) { 
     181        $op =~ s/:/~/g; 
    184182    } 
    185183 
     
    201199            $value .= $wildcard unless $value =~ m/\Q$wildcard/; 
    202200            push( @buf, 
    203                 join( '', 'NOT ', $name, '=', qq/$quote$value$quote/ ) ); 
     201                join( '', 'NOT ', $name, ':', qq/$quote$value$quote/ ) ); 
    204202        } 
    205203 
     
    207205        elsif ( $op eq '~' ) { 
    208206            $value .= $wildcard unless $value =~ m/\Q$wildcard/; 
    209             push( @buf, join( '', $name, '=', qq/$quote$value$quote/ ) ); 
     207            push( @buf, join( '', $name, ':', qq/$quote$value$quote/ ) ); 
    210208        } 
    211209 
Note: See TracChangeset for help on using the changeset viewer.