{"record":{"id":"183c182d9d3d200c","repo":"stanfordnlp/CoreNLP","slug":"search-must-be-one-of-iis-cg-qn-or-owlq","errorCode":null,"errorMessage":"'search' must be one of 'iis', 'cg', 'qn' or 'owlqn' or 'owlqn2': \" + srch","messagePattern":"'search' must be one of 'iis', 'cg', 'qn' or 'owlqn' or 'owlqn2': \" \\+ srch","errorType":"validation","errorClass":"RuntimeException","httpStatus":null,"severity":"error","filePath":"src/edu/stanford/nlp/tagger/maxent/TaggerConfig.java","lineNumber":207,"sourceCode":"      this.setProperty(\"mode\", Mode.DUMP.toString());\n      // this.setProperty(\"file\", props.getProperty(\"dump\").trim());\n      props.setProperty(\"model\", props.getProperty(\"dump\").trim());\n    } else {\n      this.setProperty(\"mode\", Mode.TAG.toString());\n      this.setProperty(\"file\", \"stdin\");\n    }\n    //for any mode other than train, we load a classifier, which means we load a config - model always needs to be specified\n    //on command line/in props file\n    //Get the path to the model (or the path where you'd like to save the model); this is necessary for training, testing, and tagging\n    this.setProperty(\"model\", props.getProperty(\"model\", this.getProperty(\"model\", \"\")).trim());\n    if ( ! (this.getMode() == Mode.DUMP) && this.getProperty(\"model\").isEmpty()) {\n      throw new RuntimeException(\"'model' parameter must be specified\");\n    }\n\n    this.setProperty(\"search\", props.getProperty(\"search\", this.getProperty(\"search\")).trim().toLowerCase());\n    String srch = this.getProperty(\"search\");\n    if ( ! (srch.equals(\"cg\") || srch.equals(\"iis\") || srch.equals(\"owlqn\") || srch.equals(\"qn\") || srch.equals(\"owlqn2\"))) {\n      throw new RuntimeException(\"'search' must be one of 'iis', 'cg', 'qn' or 'owlqn' or 'owlqn2': \" + srch);\n    }\n\n    this.setProperty(\"sigmaSquared\", props.getProperty(\"sigmaSquared\", this.getProperty(\"sigmaSquared\")));\n\n    this.setProperty(TAG_SEPARATOR_PROPERTY, props.getProperty(TAG_SEPARATOR_PROPERTY, this.getProperty(TAG_SEPARATOR_PROPERTY)));\n\n    this.setProperty(\"iterations\", props.getProperty(\"iterations\", this.getProperty(\"iterations\")));\n    this.setProperty(\"rareWordThresh\", props.getProperty(\"rareWordThresh\", this.getProperty(\"rareWordThresh\")));\n    this.setProperty(\"minFeatureThresh\", props.getProperty(\"minFeatureThresh\", this.getProperty(\"minFeatureThresh\")));\n    this.setProperty(\"curWordMinFeatureThresh\", props.getProperty(\"curWordMinFeatureThresh\", this.getProperty(\"curWordMinFeatureThresh\")));\n    this.setProperty(\"rareWordMinFeatureThresh\", props.getProperty(\"rareWordMinFeatureThresh\", this.getProperty(\"rareWordMinFeatureThresh\")));\n    this.setProperty(\"veryCommonWordThresh\", props.getProperty(\"veryCommonWordThresh\", this.getProperty(\"veryCommonWordThresh\")));\n    this.setProperty(\"occurringTagsOnly\", props.getProperty(\"occurringTagsOnly\", this.getProperty(\"occurringTagsOnly\", OCCURRING_TAGS_ONLY)));\n    this.setProperty(\"possibleTagsOnly\", props.getProperty(\"possibleTagsOnly\", this.getProperty(\"possibleTagsOnly\")));\n\n    this.setProperty(\"lang\", props.getProperty(\"lang\", this.getProperty(\"lang\")));\n\n    this.setProperty(\"openClassTags\", props.getProperty(\"openClassTags\", this.getProperty(\"openClassTags\")).trim());","sourceCodeStart":189,"sourceCodeEnd":225,"githubUrl":"https://github.com/stanfordnlp/CoreNLP/blob/1b7edd19c4d0d7b1f13a2591425b9b60a0b1af7a/src/edu/stanford/nlp/tagger/maxent/TaggerConfig.java#L189-L225","documentation":"A validation error in TaggerConfig.setProperties: the 'search' training option holds a value outside the supported optimizer set (iis, cg, qn, owlqn, owlqn2), so the training algorithm cannot be selected.","triggerScenarios":"Thrown at src/edu/stanford/nlp/tagger/maxent/TaggerConfig.java:207 when the library encounters an invalid state.","commonSituations":"See trigger scenarios.","solutions":["Set -search to iis, cg, qn, owlqn, or owlqn2","Use the default (qn) by omitting the flag","Check for typos or extra whitespace in the value"],"exampleFix":null,"handlingStrategy":"validation","validationCode":null,"typeGuard":null,"tryCatchPattern":null,"preventionTips":[],"tags":[],"backgroundTag":null,"analyzedSha":"1b7edd19c4d0d7b1f13a2591425b9b60a0b1af7a","analyzedAt":"2026-09-10T02:24:07.274Z","contentChangedAt":"2026-09-10T02:24:07.274Z","schemaVersion":2},"datasetVersion":"2026-09-17T15:17:12.973Z"}