Skip to content

Commit

Permalink
Browse files Browse the repository at this point in the history
Item14486: truncate field values > 32k
... to prevent solr from crashing
  • Loading branch information
MichaelDaum committed Sep 18, 2017
1 parent bac1cc5 commit 3c36951
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
5 changes: 5 additions & 0 deletions lib/Foswiki/Plugins/SolrPlugin/Index.pm
Expand Up @@ -483,6 +483,11 @@ sub indexTopic {
# bit of cleanup
$value =~ s/<!--.*?-->//gs;

# truncate field value to 32760
$value = substr($value, 0, 32760);

#print STDERR "value length of field $name=".length($value)."\n";

# create a dynamic field indicating the field type to solr

# date
Expand Down
1 change: 1 addition & 0 deletions lib/Foswiki/Plugins/SolrPlugin/MANIFEST
@@ -1,3 +1,4 @@
!noci
data/System/NatSkinSolrSearchViewTemplate.txt 0644
data/System/NatSkinWebChangesViewTemplate.txt 0644
data/System/PatternSkinSolrSearchViewTemplate.txt 0644
Expand Down

0 comments on commit 3c36951

Please sign in to comment.