Advertisement
Guest User

Untitled

a guest
May 2nd, 2014
184
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.73 KB | None | 0 0
  1. ################################################################################
  2. # work horse: index one topic and all attachments
  3. sub indexTopic {
  4. my ($this, $web, $topic, $meta, $text) = @_;
  5.  
  6. my %outgoingLinks = ();
  7.  
  8. my $t0 = [Time::HiRes::gettimeofday] if PROFILE;
  9.  
  10. # normalize web name
  11. $web =~ s/\//\./g;
  12.  
  13. if (VERBOSE) {
  14. $this->log("Indexing topic $web.$topic");
  15. } else {
  16.  
  17. #$this->log(".", 1);
  18. }
  19.  
  20. # new solr document for the current topic
  21. my $doc = $this->newDocument();
  22.  
  23. unless (defined $meta && defined $text) {
  24. ($meta, $text) = Foswiki::Func::readTopic($web, $topic);
  25. }
  26.  
  27. # PATCH - strip out base64 encoded image data for faster indexing
  28. $text =~ s/;base64,(.*?)"/"/g;
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement