List of usage examples for org.apache.solr.schema IndexSchema getDefaultLuceneMatchVersion
public Version getDefaultLuceneMatchVersion()
From source file:com.sindicetech.siren.solr.schema.ExtendedJsonField.java
License:Open Source License
@Override protected void init(final IndexSchema schema, final Map<String, String> args) { // first call TextField.init to set omitTermFreqAndPositions to false super.init(schema, args); this.checkFieldTypeProperties(); // initialise specific SIREn's properties this.datatypeAnalyzerConfigPath = args.remove(DATATYPECONFIG_KEY); if (datatypeAnalyzerConfigPath == null) { throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "ExtendedJsonField types require a '" + DATATYPECONFIG_KEY + "' parameter: " + this.typeName); }// www.j av a 2s .c o m // set the posting format args.put("postingsFormat", Siren10AForPostingsFormat.NAME); this.luceneDefaultVersion = schema.getDefaultLuceneMatchVersion(); // instantiate the index analyzer associated to the field Analyzer indexAnalyzer = new TokenizerChain(new CharFilterFactory[0], this.getTokenizerFactory(args), new TokenFilterFactory[0]); indexAnalyzer = this.appendSirenFilters(indexAnalyzer, this.getDatatypes()); this.setIndexAnalyzer(indexAnalyzer); super.init(schema, args); }