Skip to content

Commit

Permalink
Only run analysers if enabled.
Browse files Browse the repository at this point in the history
  • Loading branch information
anjackson committed Oct 19, 2018
1 parent c2dbff8 commit cb0f661
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 3 deletions.
Expand Up @@ -64,7 +64,9 @@ public void analyse( SolrRecord solr ) {
text = text.trim();
if( !"".equals( text ) ) {
for( AbstractTextAnalyser ta : analysers ) {
ta.analyse(text, solr);
if (ta.isEnabled()) {
ta.analyse(text, solr);
}
}
}
}
Expand Down
Expand Up @@ -52,8 +52,7 @@ public class PostcodeAnalyser extends AbstractTextAnalyser {
* @param conf
*/
public void configure(Config conf) {
if (!conf.hasPath("warc.index.extract.content.text_extract_postcodes")
|| conf.getBoolean(
if (conf.getBoolean(
"warc.index.extract.content.text_extract_postcodes")) {
setEnabled(true);
} else {
Expand Down

0 comments on commit cb0f661

Please sign in to comment.