Created
July 18, 2014 15:11
-
-
Save thelabdude/fc56eafaa52e44e57ac3 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
var skipDoc = false; var pv = doc.getFirstField(\"id\"); var id = (pv != null) ? pv.value : null; logger.info(\"===> \" + id); pv = doc.getFirstField(\"robots\"); var robots = (pv != null) ? pv.value : null; if (robots != null && robots.indexOf(\"NOINDEX\") != -1) skipDoc = true;if (id == \"ERROR\") throw \"This document had an error (from script)\";doc.addField(\"testing\",\"1234\");doc.removeField(\"ignore_me\");!skipDoc; |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment