- Timestamp:
- 07/09/19 16:28:38 (5 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/cgi-bin/search-rpc.cgi
r911 r925 224 224 } # args{cidr} 225 225 226 foreach (qw(custid description notes city) ) {227 if ($args{$ _}) {228 push @fields, "s.$ _";229 if ($args{$ _} =~ /^(EXACT|NOT):/) {226 foreach my $sfield (qw(custid description notes city) ) { 227 if ($args{$sfield}) { 228 push @fields, "s.$sfield"; 229 if ($args{$sfield} =~ /^(EXACT|NOT):/) { 230 230 push @matchtypes, $mt{$1}; 231 $args{$ _} =~ s/^$1://;231 $args{$sfield} =~ s/^$1://; 232 232 } else { 233 233 push @matchtypes, '~*'; 234 234 } 235 push @vals, $args{$_}; 236 } 235 push @vals, $args{$sfield}; 236 } 237 } 238 239 if ($args{parent_id}) { 240 # parent_id is always exact. default to positive match 241 if ($args{parent_id} =~ /^NOT:/) { 242 $args{parent_id} =~ s/^NOT://; 243 push @matchtypes, '<>'; 244 } else { 245 push @matchtypes, '='; 246 } 247 push @fields, 's.parent_id'; 248 push @vals, $args{parent_id}; 237 249 } 238 250 … … 349 361 Not all fields are exposed for search. For most purposes these should be sufficient. 350 362 363 Most fields support EXACT: or NOT: prefixes on the search term to restrict the matches. 364 351 365 =over 4 352 366 … … 413 427 To search for a free block, use the main RPC API's listFree or findAllocateFrom subs. 414 428 429 =item parent_id 430 431 Restrict to allocations in the given parent. 432 415 433 =item order 416 434
Note:
See TracChangeset
for help on using the changeset viewer.