/** * When index schema is informed, load the datatype config and append the * SIREn's filters to the tokenizer chain. */ @Override public void inform(final IndexSchema schema) { // load the datatypes this.loadDatatypeConfig(schema); // Append the SIREn's filters and update the index analyzer reference this.setAnalyzer(this.appendSirenFilters( this.getAnalyzer(), this.datatypeConfigRef.get().getDatatypes(), schema.getDefaultLuceneMatchVersion())); // tell the {@link IndexSchema} to refresh its analyzers schema.refreshAnalyzers(); }
public void inform(SolrCore core) { schema = core.getLatestSchema(); // XML_STORE is not listed explicitly by the indexer informField (indexConfig.getField(FieldRole.XML_STORE), core); // This must be run before informField() registers default analyzers with the Schema registerXmlTextFields(); for (FieldDefinition xmlField : indexConfig.getFields()) { informField (xmlField, core); } if (xpathFieldConfig != null) { addXPathFields(); } SchemaField uniqueKeyField = schema.getUniqueKeyField(); if (uniqueKeyField == null) { logger.error("{} schema does not define any unique field", core.getName()); } else if (! uniqueKeyField.getName().equals(indexConfig.getFieldName(FieldRole.URI))) { logger.error("{} schema defines a different unique field than the uri field declared in lux configuration", core.getName()); } // must call this after making changes to the field map: schema.refreshAnalyzers(); }