From 09993c6cf0aea840a3f8d73b7596e94aa5569a54 Mon Sep 17 00:00:00 2001 From: Tomoko Uchida Date: Sun, 4 Aug 2019 23:52:45 +0900 Subject: [PATCH] LUCENE-8778: Add a migration note to MIGRATE.txt --- lucene/MIGRATE.txt | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/lucene/MIGRATE.txt b/lucene/MIGRATE.txt index 7cb7dd97355..a063249f569 100644 --- a/lucene/MIGRATE.txt +++ b/lucene/MIGRATE.txt @@ -1,5 +1,20 @@ # Apache Lucene Migration Guide +## Analysis factories now have customizable symbolic names (LUCENE-8778) ## + +The SPI names for concrete subclasses of TokenizerFactory, TokenFilterFactory, and CharfilterFactory are no longer +derived from their class name. Instead, each factory must have a static "NAME" field like this: + + /** o.a.l.a.standard.StandardTokenizerFactory's SPI name */ + public static final String NAME = "standard"; + +A factory can be resolved/instantiated with its NAME by using methods such as TokenizerFactory#lookupClass(String) +or TokenizerFactory#forName(String, Map). + +If there are any user-defined factory classes that don't have proper NAME field, an exception will be thrown +when (re)loading factories. e.g., when calling TokenizerFactory#reloadTokenizers(ClassLoader). + + ## TermsEnum is now fully abstract (LUCENE-8292) ## TermsEnum has been changed to be fully abstract, so non-abstract subclass must implement all it's methods.