Blame view

tools/scripts/GenerateSOLRQueries.pl 296 Bytes
e6be5137b   Jean-François Rey   reinitialized pro...
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
  #!/usr/bin/perl
  
  my $filtRes="";
  my %keywords;
  
  while(<STDIN>){
  	chomp($_);
  	my $word = $_;
  		
      if(! exists $keywords{$word}){
  	    $filtRes .= "$word+";
  		$keywords{$word}++;
      }
  }
  # test si la query est non vide
  if($filtRes !~ /^\s*$/){
      $filtRes =~ s/\+$//g;
      print "$filtRes
  ";
  }