Changeset 2574
- Timestamp:
- 03/03/10 22:41:54 (5 months ago)
- Location:
- Search-Query-Dialect-KSx/trunk
- Files:
-
- 2 edited
-
Changes (modified) (1 diff)
-
lib/Search/Query/Dialect/KSx.pm (modified) (3 diffs)
Legend:
- Unmodified
- Added
- Removed
-
Search-Query-Dialect-KSx/trunk/Changes
r2570 r2574 11 11 * POD fix in NOTWildcardQuery that caused cpan 12 12 to not link the .pm with the .pod 13 * fix op bugs in stringify_clause() 13 14 14 0.03 xxx15 * POD fix in NOTWildcardQuery that caused cpan16 to not link the .pm with the .pod17 18 0.03 xxx19 * POD fix in NOTWildcardQuery that caused cpan20 to not link the .pm with the .pod21 22 0.03 xxx23 * POD fix in NOTWildcardQuery that caused cpan24 to not link the .pm with the .pod25 26 0.03 xxx27 * POD fix in NOTWildcardQuery that caused cpan28 to not link the .pm with the .pod29 30 0.03 xxx31 * POD fix in NOTWildcardQuery that caused cpan32 to not link the .pm with the .pod33 34 0.03 xxx35 * POD fix in NOTWildcardQuery that caused cpan36 to not link the .pm with the .pod37 38 0.03 xxx39 * POD fix in NOTWildcardQuery that caused cpan40 to not link the .pm with the .pod41 42 0.03 xxx43 * POD fix in NOTWildcardQuery that caused cpan44 to not link the .pm with the .pod45 -
Search-Query-Dialect-KSx/trunk/lib/Search/Query/Dialect/KSx.pm
r2570 r2574 174 174 # normalize operator 175 175 my $op = $clause->{op} || ":"; 176 if ( $op eq '=' ) { 177 $op = ':'; 178 } 176 $op =~ s/=/:/g; 179 177 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; 184 182 } 185 183 … … 201 199 $value .= $wildcard unless $value =~ m/\Q$wildcard/; 202 200 push( @buf, 203 join( '', 'NOT ', $name, ' =', qq/$quote$value$quote/ ) );201 join( '', 'NOT ', $name, ':', qq/$quote$value$quote/ ) ); 204 202 } 205 203 … … 207 205 elsif ( $op eq '~' ) { 208 206 $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/ ) ); 210 208 } 211 209
Note: See TracChangeset
for help on using the changeset viewer.