Changeset 12770 for trunk/gsdl/bin/script/lucene_query.pl
- Timestamp:
- 2006-09-18T14:32:31+12:00 (18 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/gsdl/bin/script/lucene_query.pl
r12656 r12770 44 44 { 45 45 my $full_indexdir = shift(@_); 46 my $fuzz y= shift(@_);46 my $fuzziness = shift(@_); 47 47 my $filter_string = shift(@_); 48 48 my $sort_field = shift(@_); … … 56 56 57 57 my $cmd = "| " . $java_lucene . " \"" . $full_indexdir . "\""; 58 if (defined($fuzz y)) {59 $cmd .= " -fuzz y";58 if (defined($fuzziness)) { 59 $cmd .= " -fuzziness " . $fuzziness; 60 60 } 61 61 if (defined($filter_string)) { … … 94 94 my $argc = scalar(@argv); 95 95 if ($argc == 0) { 96 print STDERR "Usage: $PROGNAME full-index-dir [query] [-fuzz y] [-filter filter_string] [-sort sort_field] [-dco AND|OR] [-startresults number -endresults number] [-out out_file]\n";96 print STDERR "Usage: $PROGNAME full-index-dir [query] [-fuzziness value] [-filter filter_string] [-sort sort_field] [-dco AND|OR] [-startresults number -endresults number] [-out out_file]\n"; 97 97 exit 1; 98 98 } … … 100 100 my $full_indexdir = shift(@argv); 101 101 my $query = undef; 102 my $fuzz y= undef;102 my $fuzziness = undef; 103 103 my $filter_string = undef; 104 104 my $sort_field = undef; … … 109 109 for (my $i = 0; $i < scalar(@argv); $i++) 110 110 { 111 if ($argv[$i] eq "-fuzzy") { 112 $fuzzy = 1; 111 if ($argv[$i] eq "-fuzziness") { 112 $i++; 113 $fuzziness = $argv[$i]; 113 114 } 114 115 elsif ($argv[$i] eq "-filter") { … … 141 142 } 142 143 143 open_java_lucene($full_indexdir, $fuzz y, $filter_string, $sort_field, $dco, $start_results, $end_results, $out_file);144 open_java_lucene($full_indexdir, $fuzziness, $filter_string, $sort_field, $dco, $start_results, $end_results, $out_file); 144 145 145 146 if (defined $query) {
Note:
See TracChangeset
for help on using the changeset viewer.