lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From no...@apache.org
Subject [2/2] lucene-solr:apiv2: Merge remote-tracking branch 'origin/apiv2' into apiv2
Date Sat, 03 Sep 2016 18:11:38 GMT
Merge remote-tracking branch 'origin/apiv2' into apiv2

Conflicts:
	solr/core/src/java/org/apache/solr/api/SpecProvider.java
	solr/core/src/java/org/apache/solr/security/RuleBasedAuthorizationPlugin.java
	solr/core/src/java/org/apache/solr/security/Sha256AuthenticationProvider.java
	solr/core/src/test/org/apache/solr/util/JsonValidatorTest.java
	solr/solrj/src/java/org/apache/solr/common/util/PredicateWithErrMsg.java


Project: http://git-wip-us.apache.org/repos/asf/lucene-solr/repo
Commit: http://git-wip-us.apache.org/repos/asf/lucene-solr/commit/92411981
Tree: http://git-wip-us.apache.org/repos/asf/lucene-solr/tree/92411981
Diff: http://git-wip-us.apache.org/repos/asf/lucene-solr/diff/92411981

Branch: refs/heads/apiv2
Commit: 92411981a82256d2add58e45e13f1065dad27ab4
Parents: baec970 327aaff
Author: Noble Paul <noble@apache.org>
Authored: Sat Sep 3 23:35:58 2016 +0530
Committer: Noble Paul <noble@apache.org>
Committed: Sat Sep 3 23:35:58 2016 +0530

----------------------------------------------------------------------
 build.xml                                       |   39 +-
 .../dot.settings/org.eclipse.jdt.core.prefs     |    3 +
 .../idea/.idea/copyright/profiles_settings.xml  |    1 -
 .../test-framework/lucene-test-framework.iml    |    1 +
 .../lucene/analysis/common/pom.xml.template     |   13 +
 dev-tools/maven/pom.xml.template                |    4 +-
 .../contrib/analysis-extras/pom.xml.template    |    7 +
 dev-tools/maven/solr/pom.xml.template           |    6 +-
 .../maven/solr/test-framework/pom.xml.template  |    5 +-
 dev-tools/scripts/addBackcompatIndexes.py       |   30 +-
 dev-tools/scripts/addVersion.py                 |   19 +-
 dev-tools/scripts/releasedJirasRegex.py         |   93 +
 dev-tools/scripts/scriptutil.py                 |    7 +-
 lucene/CHANGES.txt                              |  182 +-
 lucene/MIGRATE.txt                              |  103 +-
 lucene/analysis/common/build.xml                |   39 +-
 .../lucene/analysis/ar/ArabicAnalyzer.java      |   20 +-
 .../lucene/analysis/bg/BulgarianAnalyzer.java   |   17 +-
 .../lucene/analysis/br/BrazilianAnalyzer.java   |   17 +-
 .../lucene/analysis/ca/CatalanAnalyzer.java     |   18 +-
 .../charfilter/HTMLStripCharFilter.java         |    5 +-
 .../charfilter/HTMLStripCharFilter.jflex        |    1 +
 .../apache/lucene/analysis/cjk/CJKAnalyzer.java |   15 +-
 .../lucene/analysis/ckb/SoraniAnalyzer.java     |   23 +-
 .../analysis/commongrams/CommonGramsFilter.java |    4 +-
 .../commongrams/CommonGramsFilterFactory.java   |    3 +-
 .../compound/CompoundWordTokenFilterBase.java   |    8 +-
 .../DictionaryCompoundWordTokenFilter.java      |    2 +-
 ...ictionaryCompoundWordTokenFilterFactory.java |    8 +-
 .../HyphenationCompoundWordTokenFilter.java     |    7 +-
 ...phenationCompoundWordTokenFilterFactory.java |   11 +-
 .../lucene/analysis/core/LowerCaseFilter.java   |   50 -
 .../analysis/core/LowerCaseFilterFactory.java   |    2 +-
 .../lucene/analysis/core/SimpleAnalyzer.java    |    7 +
 .../lucene/analysis/core/StopAnalyzer.java      |   31 +-
 .../apache/lucene/analysis/core/StopFilter.java |  111 -
 .../lucene/analysis/core/StopFilterFactory.java |   11 +-
 .../lucene/analysis/core/TypeTokenFilter.java   |    2 +-
 .../lucene/analysis/core/UpperCaseFilter.java   |    3 +-
 .../lucene/analysis/custom/CustomAnalyzer.java  |   28 +-
 .../lucene/analysis/cz/CzechAnalyzer.java       |   25 +-
 .../lucene/analysis/da/DanishAnalyzer.java      |   19 +-
 .../lucene/analysis/de/GermanAnalyzer.java      |   20 +-
 .../lucene/analysis/el/GreekAnalyzer.java       |   13 +-
 .../apache/lucene/analysis/el/GreekStemmer.java |    2 +-
 .../lucene/analysis/en/EnglishAnalyzer.java     |   15 +-
 .../org/apache/lucene/analysis/en/KStemmer.java |    2 +-
 .../lucene/analysis/es/SpanishAnalyzer.java     |   19 +-
 .../lucene/analysis/eu/BasqueAnalyzer.java      |   17 +-
 .../lucene/analysis/fa/PersianAnalyzer.java     |   22 +-
 .../lucene/analysis/fi/FinnishAnalyzer.java     |   19 +-
 .../lucene/analysis/fr/FrenchAnalyzer.java      |   32 +-
 .../lucene/analysis/ga/IrishAnalyzer.java       |   16 +-
 .../lucene/analysis/gl/GalicianAnalyzer.java    |   19 +-
 .../lucene/analysis/hi/HindiAnalyzer.java       |   23 +-
 .../lucene/analysis/hu/HungarianAnalyzer.java   |   19 +-
 .../lucene/analysis/hunspell/Stemmer.java       |    2 +-
 .../lucene/analysis/hy/ArmenianAnalyzer.java    |   17 +-
 .../lucene/analysis/id/IndonesianAnalyzer.java  |   17 +-
 .../lucene/analysis/it/ItalianAnalyzer.java     |   20 +-
 .../lucene/analysis/lt/LithuanianAnalyzer.java  |   17 +-
 .../lucene/analysis/lv/LatvianAnalyzer.java     |   19 +-
 .../lucene/analysis/minhash/MinHashFilter.java  |    6 +-
 .../analysis/minhash/MinHashFilterFactory.java  |    5 +-
 .../miscellaneous/CapitalizationFilter.java     |    2 +-
 .../CapitalizationFilterFactory.java            |    8 +-
 .../miscellaneous/CodepointCountFilter.java     |    2 +-
 .../miscellaneous/DateRecognizerFilter.java     |    2 +-
 .../miscellaneous/FingerprintFilter.java        |    2 +-
 .../analysis/miscellaneous/KeepWordFilter.java  |    4 +-
 .../miscellaneous/KeepWordFilterFactory.java    |    8 +-
 .../KeywordMarkerFilterFactory.java             |    2 +-
 .../analysis/miscellaneous/LengthFilter.java    |    2 +-
 .../RemoveDuplicatesTokenFilter.java            |    2 +-
 .../ScandinavianFoldingFilterFactory.java       |   10 +-
 .../ScandinavianNormalizationFilterFactory.java |   10 +-
 .../miscellaneous/SetKeywordMarkerFilter.java   |    2 +-
 .../miscellaneous/WordDelimiterFilter.java      |   10 +-
 .../WordDelimiterFilterFactory.java             |   16 +-
 .../lucene/analysis/ngram/NGramTokenizer.java   |    2 +-
 .../lucene/analysis/nl/DutchAnalyzer.java       |   29 +-
 .../lucene/analysis/no/NorwegianAnalyzer.java   |   19 +-
 .../lucene/analysis/pt/PortugueseAnalyzer.java  |   19 +-
 .../lucene/analysis/pt/RSLPStemmerBase.java     |    2 +-
 .../query/QueryAutoStopWordAnalyzer.java        |    4 +-
 .../lucene/analysis/ro/RomanianAnalyzer.java    |   17 +-
 .../lucene/analysis/ru/RussianAnalyzer.java     |   23 +-
 .../analysis/snowball/SnowballFilter.java       |    4 +-
 .../snowball/SnowballPorterFilterFactory.java   |    6 +-
 .../analysis/standard/ASCIITLD.jflex-macro      |    2 +-
 .../analysis/standard/ClassicAnalyzer.java      |   15 +-
 .../analysis/standard/ClassicTokenizer.java     |    1 +
 .../standard/ClassicTokenizerImpl.jflex         |    1 +
 .../analysis/standard/StandardAnalyzer.java     |   98 -
 .../analysis/standard/StandardFilter.java       |   38 -
 .../analysis/standard/StandardTokenizer.java    |  201 -
 .../standard/StandardTokenizerImpl.java         |  818 ---
 .../standard/StandardTokenizerImpl.jflex        |  201 -
 .../standard/UAX29URLEmailAnalyzer.java         |   19 +-
 .../standard/UAX29URLEmailTokenizer.java        |    1 +
 .../standard/UAX29URLEmailTokenizerImpl.jflex   |    1 +
 .../lucene/analysis/standard/package-info.java  |   63 -
 .../lucene/analysis/standard/package.html       |   50 +
 .../lucene/analysis/sv/SwedishAnalyzer.java     |   19 +-
 .../analysis/synonym/SynonymFilterFactory.java  |    2 +-
 .../apache/lucene/analysis/th/ThaiAnalyzer.java |   15 +-
 .../lucene/analysis/tr/TurkishAnalyzer.java     |   15 +-
 .../analysis/util/AbstractAnalysisFactory.java  |    4 +-
 .../lucene/analysis/util/CharArrayMap.java      |  669 ---
 .../lucene/analysis/util/CharArraySet.java      |  193 -
 .../lucene/analysis/util/CharTokenizer.java     |   10 +-
 .../lucene/analysis/util/CharacterUtils.java    |  251 -
 .../lucene/analysis/util/ElisionFilter.java     |    2 +-
 .../analysis/util/ElisionFilterFactory.java     |    1 +
 .../analysis/util/FilteringTokenFilter.java     |   76 -
 .../analysis/util/StopwordAnalyzerBase.java     |  138 -
 .../lucene/analysis/util/UnicodeProps.java      |    4 +-
 .../lucene/analysis/util/WordlistLoader.java    |  244 -
 .../wikipedia/WikipediaTokenizerImpl.java       |    1 +
 .../wikipedia/WikipediaTokenizerImpl.jflex      |    1 +
 .../lucene/collation/CollationKeyAnalyzer.java  |    7 +
 .../apache/lucene/collation/package-info.java   |    2 +-
 .../lucene/analysis/ar/TestArabicAnalyzer.java  |    2 +-
 .../analysis/ar/TestArabicStemFilter.java       |    2 +-
 .../analysis/bg/TestBulgarianAnalyzer.java      |    2 +-
 .../analysis/bg/TestBulgarianStemmer.java       |    2 +-
 .../analysis/br/TestBrazilianAnalyzer.java      |    2 +-
 .../lucene/analysis/ca/TestCatalanAnalyzer.java |    2 +-
 .../lucene/analysis/cjk/TestCJKAnalyzer.java    |    4 +-
 .../lucene/analysis/ckb/TestSoraniAnalyzer.java |    2 +-
 .../commongrams/CommonGramsFilterTest.java      |    2 +-
 .../TestCommonGramsFilterFactory.java           |   10 +-
 .../TestCommonGramsQueryFilterFactory.java      |    7 +-
 .../compound/TestCompoundWordTokenFilter.java   |    2 +-
 .../core/TestAllAnalyzersHaveFactories.java     |    4 +
 .../lucene/analysis/core/TestAnalyzers.java     |    5 +
 .../analysis/core/TestBugInSomething.java       |    2 +-
 .../lucene/analysis/core/TestRandomChains.java  |   16 +-
 .../lucene/analysis/core/TestStopAnalyzer.java  |   14 +-
 .../lucene/analysis/core/TestStopFilter.java    |  176 -
 .../analysis/core/TestStopFilterFactory.java    |    2 +-
 .../analysis/custom/TestCustomAnalyzer.java     |  143 +
 .../lucene/analysis/cz/TestCzechAnalyzer.java   |    4 +-
 .../lucene/analysis/cz/TestCzechStemmer.java    |    2 +-
 .../lucene/analysis/da/TestDanishAnalyzer.java  |    2 +-
 .../lucene/analysis/de/TestGermanAnalyzer.java  |    2 +-
 .../analysis/de/TestGermanLightStemFilter.java  |    2 +-
 .../de/TestGermanMinimalStemFilter.java         |    2 +-
 .../analysis/de/TestGermanStemFilter.java       |    4 +-
 .../lucene/analysis/en/TestEnglishAnalyzer.java |    2 +-
 .../analysis/en/TestPorterStemFilter.java       |    8 +-
 .../lucene/analysis/es/TestSpanishAnalyzer.java |    2 +-
 .../lucene/analysis/eu/TestBasqueAnalyzer.java  |    2 +-
 .../lucene/analysis/fa/TestPersianAnalyzer.java |    2 +-
 .../lucene/analysis/fi/TestFinnishAnalyzer.java |    2 +-
 .../analysis/fi/TestFinnishLightStemFilter.java |    2 +-
 .../lucene/analysis/fr/TestFrenchAnalyzer.java  |    2 +-
 .../analysis/fr/TestFrenchLightStemFilter.java  |    2 +-
 .../fr/TestFrenchMinimalStemFilter.java         |    2 +-
 .../lucene/analysis/ga/TestIrishAnalyzer.java   |    2 +-
 .../analysis/gl/TestGalicianAnalyzer.java       |    2 +-
 .../gl/TestGalicianMinimalStemFilter.java       |    2 +-
 .../lucene/analysis/hi/TestHindiAnalyzer.java   |    2 +-
 .../analysis/hu/TestHungarianAnalyzer.java      |    2 +-
 .../hu/TestHungarianLightStemFilter.java        |    2 +-
 .../hunspell/TestHunspellStemFilter.java        |    2 +-
 .../analysis/hy/TestArmenianAnalyzer.java       |    2 +-
 .../analysis/id/TestIndonesianAnalyzer.java     |    2 +-
 .../lucene/analysis/it/TestItalianAnalyzer.java |    2 +-
 .../analysis/lt/TestLithuanianAnalyzer.java     |    2 +-
 .../lucene/analysis/lv/TestLatvianAnalyzer.java |    2 +-
 .../analysis/minhash/MinHashFilterTest.java     |    4 +-
 .../miscellaneous/TestCapitalizationFilter.java |    2 +-
 .../miscellaneous/TestKeepFilterFactory.java    |    4 +-
 .../miscellaneous/TestKeepWordFilter.java       |    2 +-
 .../miscellaneous/TestKeywordMarkerFilter.java  |    4 +-
 .../TestStemmerOverrideFilter.java              |    2 +-
 .../miscellaneous/TestWordDelimiterFilter.java  |   12 +-
 .../lucene/analysis/nl/TestDutchAnalyzer.java   |    6 +-
 .../analysis/no/TestNorwegianAnalyzer.java      |    2 +-
 .../no/TestNorwegianLightStemFilter.java        |    2 +-
 .../no/TestNorwegianMinimalStemFilter.java      |    2 +-
 .../analysis/pt/TestPortugueseAnalyzer.java     |    2 +-
 .../pt/TestPortugueseLightStemFilter.java       |    2 +-
 .../pt/TestPortugueseMinimalStemFilter.java     |    2 +-
 .../analysis/pt/TestPortugueseStemFilter.java   |    6 +-
 .../analysis/ro/TestRomanianAnalyzer.java       |    2 +-
 .../lucene/analysis/ru/TestRussianAnalyzer.java |    4 +-
 .../analysis/ru/TestRussianLightStemFilter.java |    2 +-
 .../shingle/ShingleAnalyzerWrapperTest.java     |    4 +-
 .../analysis/sinks/TestTeeSinkTokenFilter.java  |    4 +-
 .../analysis/standard/TestStandardAnalyzer.java |  390 --
 .../standard/WordBreakTestUnicode_6_3_0.java    | 5537 ------------------
 .../generateJavaUnicodeWordBreakTest.pl         |  232 -
 .../lucene/analysis/sv/TestSwedishAnalyzer.java |    2 +-
 .../analysis/sv/TestSwedishLightStemFilter.java |    2 +-
 .../lucene/analysis/th/TestThaiAnalyzer.java    |    2 +-
 .../lucene/analysis/tr/TestTurkishAnalyzer.java |    2 +-
 .../lucene/analysis/util/TestCharArrayMap.java  |  244 -
 .../lucene/analysis/util/TestCharArraySet.java  |  429 --
 .../analysis/util/TestCharacterUtils.java       |  107 -
 .../lucene/analysis/util/TestElision.java       |    2 +-
 .../util/TestFilesystemResourceLoader.java      |    2 +
 .../analysis/util/TestWordlistLoader.java       |   79 -
 .../tools/groovy/generate-unicode-data.groovy   |    4 +-
 .../icu/src/data/uax29/MyanmarSyllable.rbbi     |   50 +
 .../segmentation/DefaultICUTokenizerConfig.java |   14 +-
 .../analysis/icu/segmentation/ICUTokenizer.java |    2 +-
 .../icu/segmentation/ICUTokenizerFactory.java   |    6 +-
 lucene/analysis/icu/src/java/overview.html      |    2 +-
 .../icu/segmentation/MyanmarSyllable.brk        |  Bin 0 -> 19776 bytes
 .../icu/segmentation/TestICUTokenizer.java      |    6 +-
 .../icu/segmentation/TestICUTokenizerCJK.java   |    2 +-
 .../icu/segmentation/TestMyanmarSyllable.java   |  156 +
 .../segmentation/TestWithCJKBigramFilter.java   |    8 +-
 .../lucene/analysis/ja/JapaneseAnalyzer.java    |   15 +-
 .../analysis/ja/JapaneseNumberFilter.java       |    4 +-
 .../ja/JapanesePartOfSpeechStopFilter.java      |    4 +-
 .../JapanesePartOfSpeechStopFilterFactory.java  |    2 +-
 .../analysis/ja/TestJapaneseBaseFormFilter.java |    2 +-
 .../ja/TestJapaneseKatakanaStemFilter.java      |    6 +-
 .../analysis/ja/TestJapaneseNumberFilter.java   |    2 +-
 .../analysis/morfologik/MorfologikAnalyzer.java |    6 +
 .../analysis/morfologik/MorfologikFilter.java   |   12 +-
 .../uk/UkrainianMorfologikAnalyzer.java         |  153 +
 .../apache/lucene/analysis/uk/package-info.java |   21 +
 .../apache/lucene/analysis/uk/mapping_uk.txt    |   19 +
 .../org/apache/lucene/analysis/uk/stopwords.txt | 1269 ++++
 .../apache/lucene/analysis/uk/ukrainian.dict    |  Bin 0 -> 1989243 bytes
 .../apache/lucene/analysis/uk/ukrainian.info    |   10 +
 .../morfologik/TestMorfologikAnalyzer.java      |    2 +-
 .../analysis/uk/TestUkrainianAnalyzer.java      |   72 +
 .../analysis/cn/smart/SmartChineseAnalyzer.java |   12 +-
 .../lucene/analysis/pl/PolishAnalyzer.java      |   21 +-
 .../lucene/analysis/pl/TestPolishAnalyzer.java  |    2 +-
 .../index/TestBackwardsCompatibility.java       |   42 +-
 .../org/apache/lucene/index/index.6.0.0-cfs.zip |  Bin 13744 -> 15807 bytes
 .../apache/lucene/index/index.6.0.0-nocfs.zip   |  Bin 13749 -> 15806 bytes
 .../org/apache/lucene/index/index.6.0.1-cfs.zip |  Bin 13734 -> 15820 bytes
 .../apache/lucene/index/index.6.0.1-nocfs.zip   |  Bin 13735 -> 15823 bytes
 .../org/apache/lucene/index/index.6.1.0-cfs.zip |  Bin 0 -> 15803 bytes
 .../apache/lucene/index/index.6.1.0-nocfs.zip   |  Bin 0 -> 15829 bytes
 .../lucene/index/unsupported.5.5.2-cfs.zip      |  Bin 0 -> 13712 bytes
 .../lucene/index/unsupported.5.5.2-nocfs.zip    |  Bin 0 -> 13720 bytes
 .../benchmark/byTask/tasks/CommitIndexTask.java |    2 +-
 .../benchmark/quality/TestQualityRun.java       |    3 -
 .../lucene/benchmark/quality/trecQRels.txt      |  428 +-
 lucene/build.xml                                |   15 +-
 .../BooleanPerceptronClassifier.java            |   20 +-
 .../CachingNaiveBayesClassifier.java            |   18 +-
 .../KNearestNeighborClassifier.java             |    9 +-
 .../SimpleNaiveBayesClassifier.java             |   24 +-
 .../KNearestNeighborDocumentClassifier.java     |   10 +-
 .../SimpleNaiveBayesDocumentClassifier.java     |   16 +-
 .../utils/ConfusionMatrixGenerator.java         |    8 +-
 .../classification/utils/DatasetSplitter.java   |   30 +-
 .../DocumentClassificationTestBase.java         |   11 +-
 .../KNearestNeighborDocumentClassifierTest.java |   40 +-
 .../SimpleNaiveBayesDocumentClassifierTest.java |   32 +-
 .../autoprefix/AutoPrefixPostingsFormat.java    |  125 -
 .../lucene/codecs/autoprefix/package-info.java  |   22 -
 .../simpletext/SimpleTextCompoundFormat.java    |    5 +-
 .../simpletext/SimpleTextPointsWriter.java      |   16 +-
 .../org.apache.lucene.codecs.PostingsFormat     |    1 -
 .../TestAutoPrefixPostingsFormat.java           |   38 -
 .../codecs/autoprefix/TestAutoPrefixTerms.java  |  941 ---
 lucene/common-build.xml                         |   48 +-
 lucene/core/build.xml                           |   18 +-
 .../org/apache/lucene/analysis/Analyzer.java    |  135 +-
 .../apache/lucene/analysis/CharArrayMap.java    |  669 +++
 .../apache/lucene/analysis/CharArraySet.java    |  196 +
 .../apache/lucene/analysis/CharacterUtils.java  |  251 +
 .../lucene/analysis/FilteringTokenFilter.java   |   76 +
 .../apache/lucene/analysis/LowerCaseFilter.java |   50 +
 .../org/apache/lucene/analysis/StopFilter.java  |  111 +
 .../lucene/analysis/StopwordAnalyzerBase.java   |  138 +
 .../apache/lucene/analysis/WordlistLoader.java  |  244 +
 .../apache/lucene/analysis/package-info.java    |    2 +-
 .../analysis/standard/StandardAnalyzer.java     |  122 +
 .../analysis/standard/StandardFilter.java       |   39 +
 .../analysis/standard/StandardTokenizer.java    |  214 +
 .../standard/StandardTokenizerImpl.java         |  823 +++
 .../standard/StandardTokenizerImpl.jflex        |  207 +
 .../lucene/analysis/standard/package-info.java  |   33 +
 .../apache/lucene/codecs/BlockTermState.java    |   14 +-
 .../lucene/codecs/MutablePointsReader.java      |   39 +
 .../codecs/blocktree/AutoPrefixTermsWriter.java |  438 --
 .../codecs/blocktree/BlockTreeTermsReader.java  |   11 +-
 .../codecs/blocktree/BlockTreeTermsWriter.java  |  222 +-
 .../codecs/blocktree/IntersectTermsEnum.java    |    2 -
 .../codecs/lucene50/Lucene50CompoundReader.java |    7 +-
 .../codecs/lucene60/Lucene60PointsWriter.java   |    9 +
 .../org/apache/lucene/document/BinaryPoint.java |    2 +-
 .../lucene/document/CompressionTools.java       |  150 -
 .../org/apache/lucene/document/FieldType.java   |    2 +-
 .../lucene/document/SortedDocValuesField.java   |    4 +-
 .../document/SortedSetDocValuesField.java       |    2 +
 .../java/org/apache/lucene/geo/GeoUtils.java    |   43 +-
 .../src/java/org/apache/lucene/geo/Polygon.java |   13 +-
 .../java/org/apache/lucene/geo/Rectangle.java   |    4 +-
 .../lucene/geo/SimpleGeoJSONPolygonParser.java  |  440 ++
 .../apache/lucene/index/DocumentsWriter.java    |   15 +-
 .../index/DocumentsWriterFlushControl.java      |   27 +-
 .../index/DocumentsWriterStallControl.java      |   26 +-
 .../org/apache/lucene/index/IndexCommit.java    |    2 +-
 .../org/apache/lucene/index/IndexUpgrader.java  |    2 +-
 .../org/apache/lucene/index/IndexWriter.java    |   74 +-
 .../apache/lucene/index/IndexWriterConfig.java  |   17 +-
 .../apache/lucene/index/MergeReaderWrapper.java |    4 +-
 .../apache/lucene/index/PointValuesWriter.java  |  160 +-
 .../org/apache/lucene/index/SegmentInfos.java   |   35 +-
 .../apache/lucene/index/SortingLeafReader.java  |    4 +-
 .../org/apache/lucene/index/TermContext.java    |   12 -
 .../java/org/apache/lucene/index/TermState.java |    6 -
 .../apache/lucene/search/BlendedTermQuery.java  |    6 +-
 .../org/apache/lucene/search/BooleanQuery.java  |   44 +-
 .../org/apache/lucene/search/BooleanScorer.java |   36 +-
 .../lucene/search/BooleanTopLevelScorers.java   |  182 -
 .../org/apache/lucene/search/BooleanWeight.java |  180 +-
 .../org/apache/lucene/search/BoostQuery.java    |   44 +-
 .../apache/lucene/search/ConjunctionDISI.java   |  124 +-
 .../apache/lucene/search/ConjunctionScorer.java |   10 +-
 .../lucene/search/ConstantScoreQuery.java       |    6 +-
 .../lucene/search/ConstantScoreWeight.java      |   35 +-
 .../lucene/search/DisjunctionMaxQuery.java      |   29 +-
 .../lucene/search/DisjunctionSumScorer.java     |   11 +-
 .../lucene/search/DocValuesRewriteMethod.java   |    4 +-
 .../org/apache/lucene/search/Explanation.java   |   33 +-
 .../apache/lucene/search/FieldValueQuery.java   |    4 +-
 .../org/apache/lucene/search/FilterWeight.java  |   73 +
 .../org/apache/lucene/search/IndexSearcher.java |   27 +-
 .../org/apache/lucene/search/LRUQueryCache.java |   36 +-
 .../lucene/search/LeafFieldComparator.java      |    7 +-
 .../apache/lucene/search/MatchAllDocsQuery.java |    4 +-
 .../apache/lucene/search/MatchNoDocsQuery.java  |   42 +-
 .../lucene/search/MinShouldMatchSumScorer.java  |    6 +-
 .../apache/lucene/search/MultiPhraseQuery.java  |   20 +-
 .../apache/lucene/search/MultiTermQuery.java    |    8 +-
 .../MultiTermQueryConstantScoreWrapper.java     |   11 +-
 .../org/apache/lucene/search/PhraseQuery.java   |   20 +-
 .../apache/lucene/search/PointInSetQuery.java   |    4 +-
 .../apache/lucene/search/PointRangeQuery.java   |    4 +-
 .../java/org/apache/lucene/search/Query.java    |    3 +-
 .../lucene/search/RandomAccessWeight.java       |    4 +-
 .../apache/lucene/search/ScoringRewrite.java    |    6 +-
 .../org/apache/lucene/search/SynonymQuery.java  |   20 +-
 .../org/apache/lucene/search/TermQuery.java     |   86 +-
 .../java/org/apache/lucene/search/Weight.java   |   15 +-
 .../org/apache/lucene/search/package-info.java  |   29 +-
 .../search/similarities/BM25Similarity.java     |   25 +-
 .../lucene/search/similarities/BasicStats.java  |   35 +-
 .../search/similarities/ClassicSimilarity.java  |   12 -
 .../search/similarities/LMSimilarity.java       |    8 +-
 .../search/similarities/MultiSimilarity.java    |   20 +-
 .../similarities/PerFieldSimilarityWrapper.java |   14 +-
 .../lucene/search/similarities/Similarity.java  |   64 +-
 .../search/similarities/SimilarityBase.java     |    8 +-
 .../search/similarities/TFIDFSimilarity.java    |  168 +-
 .../search/spans/FieldMaskingSpanQuery.java     |    4 +-
 .../search/spans/ScoringWrapperSpans.java       |   95 -
 .../lucene/search/spans/SpanBoostQuery.java     |   54 +-
 .../lucene/search/spans/SpanContainQuery.java   |    4 +-
 .../search/spans/SpanContainingQuery.java       |   12 +-
 .../search/spans/SpanMultiTermQueryWrapper.java |    2 +-
 .../lucene/search/spans/SpanNearQuery.java      |   18 +-
 .../lucene/search/spans/SpanNotQuery.java       |   14 +-
 .../apache/lucene/search/spans/SpanOrQuery.java |   12 +-
 .../search/spans/SpanPositionCheckQuery.java    |   10 +-
 .../apache/lucene/search/spans/SpanQuery.java   |    2 +-
 .../apache/lucene/search/spans/SpanScorer.java  |   10 +-
 .../lucene/search/spans/SpanTermQuery.java      |    8 +-
 .../apache/lucene/search/spans/SpanWeight.java  |   20 +-
 .../lucene/search/spans/SpanWithinQuery.java    |   12 +-
 .../lucene/store/ByteArrayIndexInput.java       |    4 +-
 .../java/org/apache/lucene/store/Directory.java |    8 +-
 .../org/apache/lucene/store/FSDirectory.java    |   15 +-
 .../lucene/store/FileSwitchDirectory.java       |   10 +-
 .../apache/lucene/store/FilterDirectory.java    |    9 +-
 .../store/LockValidatingDirectoryWrapper.java   |   10 +-
 .../lucene/store/NRTCachingDirectory.java       |    4 +-
 .../org/apache/lucene/store/RAMDirectory.java   |   22 +-
 .../lucene/store/TrackingDirectoryWrapper.java  |    4 +-
 .../java/org/apache/lucene/util/ArrayUtil.java  |   71 +-
 .../org/apache/lucene/util/BitSetIterator.java  |   10 +
 .../org/apache/lucene/util/ByteBlockPool.java   |    8 +
 .../org/apache/lucene/util/IntroSelector.java   |  126 +
 .../org/apache/lucene/util/IntroSorter.java     |    7 +-
 .../org/apache/lucene/util/QueryBuilder.java    |    1 -
 .../org/apache/lucene/util/RadixSelector.java   |  202 +
 .../java/org/apache/lucene/util/Selector.java   |   41 +
 .../java/org/apache/lucene/util/SloppyMath.java |   20 +-
 .../org/apache/lucene/util/bkd/BKDReader.java   |   83 +-
 .../org/apache/lucene/util/bkd/BKDWriter.java   |  638 +-
 .../apache/lucene/util/bkd/DocIdsWriter.java    |  170 +
 .../util/bkd/MutablePointsReaderUtils.java      |  185 +
 .../org/apache/lucene/util/packed/Direct16.java |    2 +-
 .../org/apache/lucene/util/packed/Direct32.java |    2 +-
 .../org/apache/lucene/util/packed/Direct64.java |    2 +-
 .../org/apache/lucene/util/packed/Direct8.java  |    2 +-
 .../lucene/util/packed/Packed16ThreeBlocks.java |    2 +-
 .../lucene/util/packed/Packed64SingleBlock.java |    2 +-
 .../lucene/util/packed/Packed8ThreeBlocks.java  |    2 +-
 lucene/core/src/java/overview.html              |    2 +-
 .../lucene/analysis/TestCharArrayMap.java       |  244 +
 .../lucene/analysis/TestCharArraySet.java       |  430 ++
 .../lucene/analysis/TestCharacterUtils.java     |  107 +
 .../apache/lucene/analysis/TestStopFilter.java  |  139 +
 .../lucene/analysis/TestWordlistLoader.java     |   79 +
 .../analysis/standard/TestStandardAnalyzer.java |  396 ++
 .../lucene62/TestLucene62SegmentInfoFormat.java |    4 +-
 .../lucene/document/TestBinaryDocument.java     |   29 -
 .../test/org/apache/lucene/geo/TestPolygon.java |  241 +
 .../index/TestAllFilesCheckIndexHeader.java     |    6 -
 .../index/TestConcurrentMergeScheduler.java     |    3 -
 .../test/org/apache/lucene/index/TestCrash.java |    1 -
 .../apache/lucene/index/TestCustomNorms.java    |   12 +-
 .../apache/lucene/index/TestDeletionPolicy.java |    4 +-
 .../lucene/index/TestDirectoryReaderReopen.java |    4 +-
 .../index/TestDocumentsWriterStallControl.java  |    6 +-
 .../lucene/index/TestIndexFileDeleter.java      |    3 -
 .../apache/lucene/index/TestIndexSorting.java   |    8 +-
 .../apache/lucene/index/TestIndexWriter.java    |   43 +-
 .../lucene/index/TestIndexWriterCommit.java     |   57 +-
 .../lucene/index/TestIndexWriterDelete.java     |    1 -
 .../index/TestIndexWriterExceptions2.java       |    1 -
 .../lucene/index/TestIndexWriterFromReader.java |    9 -
 .../lucene/index/TestIndexWriterMerging.java    |    5 -
 .../lucene/index/TestIndexWriterOnDiskFull.java |    1 -
 .../TestIndexWriterOutOfFileDescriptors.java    |    1 -
 .../index/TestIndexWriterWithThreads.java       |    3 -
 .../lucene/index/TestMaxTermFrequency.java      |    2 -
 .../lucene/index/TestNRTReaderCleanup.java      |    3 -
 .../test/org/apache/lucene/index/TestNorms.java |   15 +-
 .../org/apache/lucene/index/TestOmitTf.java     |    4 -
 .../apache/lucene/index/TestPointValues.java    |    3 +-
 .../lucene/index/TestTransactionRollback.java   |    4 +-
 .../apache/lucene/index/TestTransactions.java   |    2 -
 .../lucene/index/TestUniqueTermCount.java       |    2 +-
 .../apache/lucene/search/JustCompileSearch.java |   12 +-
 .../org/apache/lucene/search/TestBoolean2.java  |   65 +-
 .../apache/lucene/search/TestBooleanCoord.java  |  860 ---
 .../search/TestBooleanMinShouldMatch.java       |   58 +-
 .../org/apache/lucene/search/TestBooleanOr.java |    2 +-
 .../apache/lucene/search/TestBooleanQuery.java  |   37 +-
 .../search/TestBooleanQueryVisitSubscorers.java |    5 +-
 .../lucene/search/TestBooleanRewrites.java      |   14 -
 .../apache/lucene/search/TestBooleanScorer.java |   26 +-
 .../apache/lucene/search/TestBoostQuery.java    |    4 +-
 .../lucene/search/TestComplexExplanations.java  |   17 +-
 .../lucene/search/TestConjunctionDISI.java      |   98 +-
 .../apache/lucene/search/TestConjunctions.java  |   13 +-
 .../lucene/search/TestConstantScoreQuery.java   |   13 +-
 .../TestControlledRealTimeReopenThread.java     |   15 +
 .../lucene/search/TestDocValuesScoring.java     |   14 +-
 .../apache/lucene/search/TestFilterWeight.java  |   67 +
 .../apache/lucene/search/TestLRUQueryCache.java |   35 +-
 .../lucene/search/TestMatchNoDocsQuery.java     |   50 +-
 .../lucene/search/TestMinShouldMatch2.java      |   13 +-
 .../lucene/search/TestMultiPhraseQuery.java     |   27 -
 .../search/TestMultiTermConstantScore.java      |   74 -
 .../search/TestMultiTermQueryRewrites.java      |   12 +-
 .../apache/lucene/search/TestNeedsScores.java   |   14 +-
 .../lucene/search/TestPositionIncrement.java    |    4 +-
 .../search/TestPositiveScoresOnlyCollector.java |    2 +-
 .../apache/lucene/search/TestQueryRescorer.java |   11 +-
 .../search/TestScoreCachingWrappingScorer.java  |    2 +-
 .../apache/lucene/search/TestScorerPerf.java    |    5 +-
 .../apache/lucene/search/TestSimilarity.java    |    4 -
 .../lucene/search/TestSimilarityProvider.java   |   20 -
 .../lucene/search/TestSimpleExplanations.java   |   43 +-
 .../apache/lucene/search/TestSortRandom.java    |    4 +-
 .../org/apache/lucene/search/TestTermQuery.java |  154 +
 .../org/apache/lucene/search/TestWildcard.java  |    3 +-
 .../search/similarities/TestSimilarity2.java    |    5 -
 .../search/similarities/TestSimilarityBase.java |    8 +-
 .../search/spans/JustCompileSearchSpans.java    |    2 +-
 .../search/spans/TestFieldMaskingSpanQuery.java |   14 +-
 .../search/spans/TestNearSpansOrdered.java      |   26 +-
 .../lucene/search/spans/TestSpanCollection.java |    6 +-
 .../search/spans/TestSpanContainQuery.java      |    2 +-
 .../apache/lucene/search/spans/TestSpans.java   |   10 +-
 .../store/TestTrackingDirectoryWrapper.java     |    2 +-
 .../apache/lucene/util/TestByteBlockPool.java   |    8 +-
 .../apache/lucene/util/TestIntroSelector.java   |   86 +
 .../apache/lucene/util/TestOfflineSorter.java   |   13 -
 .../apache/lucene/util/TestQueryBuilder.java    |   43 +-
 .../apache/lucene/util/TestRadixSelector.java   |   77 +
 .../org/apache/lucene/util/bkd/TestBKD.java     |   35 +-
 .../lucene/util/bkd/TestDocIdsWriter.java       |  101 +
 .../util/bkd/TestMutablePointsReaderUtils.java  |  251 +
 .../org/apache/lucene/util/fst/TestFSTs.java    |    1 -
 .../demo/facet/DistanceFacetsExample.java       |   27 +-
 .../org/apache/lucene/facet/DrillDownQuery.java |    1 -
 .../apache/lucene/facet/DrillSidewaysQuery.java |   14 +-
 .../apache/lucene/facet/range/DoubleRange.java  |    6 +-
 .../apache/lucene/facet/range/LongRange.java    |    6 +-
 .../lucene/facet/taxonomy/TaxonomyReader.java   |    2 +-
 .../lucene/facet/taxonomy/TaxonomyWriter.java   |   16 +-
 .../directory/DirectoryTaxonomyWriter.java      |   40 +-
 .../apache/lucene/facet/TestDrillSideways.java  |    5 +-
 .../facet/range/TestRangeFacetCounts.java       |   14 +-
 .../taxonomy/directory/TestAddTaxonomy.java     |    4 +-
 .../directory/TestDirectoryTaxonomyWriter.java  |   20 +-
 .../lucene/search/grouping/SearchGroup.java     |    8 +-
 .../highlight/WeightedSpanTermExtractor.java    |    4 +-
 .../search/vectorhighlight/FieldQuery.java      |    6 +
 .../search/vectorhighlight/FieldQueryTest.java  |   14 +
 lucene/ivy-versions.properties                  |   38 +-
 .../lucene/search/join/GlobalOrdinalsQuery.java |    8 +-
 .../join/GlobalOrdinalsWithScoreQuery.java      |   25 +-
 .../org/apache/lucene/search/join/JoinUtil.java |    4 +-
 .../join/PointInSetIncludingScoreQuery.java     |   47 +-
 .../search/join/TermsIncludingScoreQuery.java   |   13 +-
 .../search/join/ToChildBlockJoinQuery.java      |   33 +-
 .../search/join/ToParentBlockJoinQuery.java     |   33 +-
 .../lucene/search/join/TestBlockJoin.java       |    4 +-
 .../apache/lucene/search/join/TestJoinUtil.java |   13 +-
 lucene/licenses/commons-compress-1.11.jar.sha1  |    1 +
 lucene/licenses/commons-compress-1.8.1.jar.sha1 |    1 -
 .../apache/lucene/index/memory/MemoryIndex.java |   51 +-
 .../lucene/index/memory/TestMemoryIndex.java    |   36 +
 .../store/HardlinkCopyDirectoryWrapper.java     |    4 +-
 .../search/TestDiversifiedTopDocsCollector.java |    4 +-
 .../store/TestHardLinkCopyDirectoryWrapper.java |    4 +-
 .../apache/lucene/util/fst/TestFSTsMisc.java    |    1 -
 .../apache/lucene/queries/BoostingQuery.java    |   18 +-
 .../apache/lucene/queries/CommonTermsQuery.java |   49 +-
 .../apache/lucene/queries/CustomScoreQuery.java |   82 +-
 .../org/apache/lucene/queries/TermsQuery.java   |    7 +-
 .../lucene/queries/function/BoostedQuery.java   |   18 +-
 .../lucene/queries/function/FunctionQuery.java  |   37 +-
 .../queries/function/FunctionRangeQuery.java    |   13 +-
 .../valuesource/ComparisonBoolFunction.java     |  105 +
 .../lucene/queries/mlt/MoreLikeThisQuery.java   |    1 -
 .../queries/payloads/PayloadScoreQuery.java     |   20 +-
 .../queries/payloads/SpanPayloadCheckQuery.java |   10 +-
 .../lucene/queries/BoostingQueryTest.java       |    4 +-
 .../lucene/queries/CommonTermsQueryTest.java    |   10 +-
 .../queries/TestCustomScoreExplanations.java    |   12 +-
 .../lucene/queries/TestCustomScoreQuery.java    |    4 -
 .../function/TestLongNormValueSource.java       |   12 -
 .../queries/payloads/TestPayloadScoreQuery.java |   10 -
 .../queries/payloads/TestPayloadSpans.java      |   30 +-
 .../queries/payloads/TestPayloadTermQuery.java  |   14 +-
 .../analyzing/AnalyzingQueryParser.java         |  202 -
 .../queryparser/analyzing/package-info.java     |   22 -
 .../lucene/queryparser/classic/CharStream.java  |    2 +-
 .../classic/MultiFieldQueryParser.java          |   52 +-
 .../queryparser/classic/ParseException.java     |    2 +-
 .../lucene/queryparser/classic/QueryParser.java |  399 +-
 .../lucene/queryparser/classic/QueryParser.jj   |  265 +-
 .../queryparser/classic/QueryParserBase.java    |  179 +-
 .../classic/QueryParserTokenManager.java        |   27 +-
 .../lucene/queryparser/classic/Token.java       |    2 +-
 .../queryparser/classic/TokenMgrError.java      |    2 +-
 .../complexPhrase/ComplexPhraseQueryParser.java |   24 +-
 .../CommonQueryParserConfiguration.java         |   12 -
 .../flexible/standard/StandardQueryParser.java  |   30 -
 .../StandardBooleanQueryNodeBuilder.java        |  109 -
 .../builders/StandardQueryTreeBuilder.java      |    6 +-
 .../builders/SynonymQueryNodeBuilder.java       |   48 +
 .../config/StandardQueryConfigHandler.java      |    9 -
 .../nodes/StandardBooleanQueryNode.java         |   49 -
 .../standard/nodes/SynonymQueryNode.java        |   30 +
 .../processors/AnalyzerQueryNodeProcessor.java  |    8 +-
 .../processors/FuzzyQueryNodeProcessor.java     |   11 +-
 ...owercaseExpandedTermsQueryNodeProcessor.java |  100 -
 .../processors/RegexpQueryNodeProcessor.java    |   56 +
 .../StandardQueryNodeProcessorPipeline.java     |    4 +-
 .../processors/TermRangeQueryNodeProcessor.java |   11 +-
 .../processors/WildcardQueryNodeProcessor.java  |   58 +-
 .../queryparser/simple/SimpleQueryParser.java   |   16 +-
 .../lucene/queryparser/xml/CoreParser.java      |    2 +
 .../xml/builders/BooleanQueryBuilder.java       |    1 -
 .../xml/builders/TermsQueryBuilder.java         |    1 -
 .../analyzing/TestAnalyzingQueryParser.java     |  268 -
 .../classic/TestMultiFieldQueryParser.java      |    1 -
 .../queryparser/classic/TestQueryParser.java    |  485 +-
 .../ext/TestExtendableQueryParser.java          |    1 +
 .../precedence/TestPrecedenceQueryParser.java   |   61 +-
 .../standard/TestMultiFieldQPHelper.java        |   24 +-
 .../flexible/standard/TestQPHelper.java         |   93 +-
 .../flexible/standard/TestStandardQP.java       |   27 +-
 .../simple/TestSimpleQueryParser.java           |    3 -
 .../queryparser/util/QueryParserTestBase.java   |  149 +-
 .../IndexAndTaxonomyReplicationHandler.java     |    6 +-
 .../replicator/IndexReplicationHandler.java     |    3 +-
 .../apache/lucene/replicator/nrt/CopyJob.java   |    4 +-
 .../lucene/replicator/nrt/CopyOneFile.java      |    4 +-
 .../apache/lucene/replicator/nrt/CopyState.java |    4 +-
 .../lucene/replicator/nrt/FileMetaData.java     |    4 +-
 .../org/apache/lucene/replicator/nrt/Node.java  |   23 +-
 .../nrt/NodeCommunicationException.java         |    4 +-
 .../nrt/PreCopyMergedSegmentWarmer.java         |    4 +-
 .../lucene/replicator/nrt/PrimaryNode.java      |   35 +-
 .../replicator/nrt/ReplicaFileDeleter.java      |    4 +-
 .../lucene/replicator/nrt/ReplicaNode.java      |    8 +-
 .../nrt/SegmentInfosSearcherManager.java        |    4 +-
 .../IndexAndTaxonomyReplicationClientTest.java  |   16 +-
 .../replicator/IndexReplicationClientTest.java  |   15 +-
 .../lucene/replicator/LocalReplicatorTest.java  |    4 +-
 .../replicator/http/HttpReplicatorTest.java     |    2 +-
 .../lucene/replicator/nrt/Connection.java       |    4 +-
 .../org/apache/lucene/replicator/nrt/Jobs.java  |    4 +-
 .../lucene/replicator/nrt/NodeProcess.java      |    4 +-
 .../lucene/replicator/nrt/SimpleCopyJob.java    |    6 +-
 .../replicator/nrt/SimplePrimaryNode.java       |    4 +-
 .../replicator/nrt/SimpleReplicaNode.java       |    4 +-
 .../lucene/replicator/nrt/SimpleServer.java     |    4 +-
 .../lucene/replicator/nrt/SimpleTransLog.java   |    4 +-
 .../replicator/nrt/TestNRTReplication.java      |   15 +-
 .../nrt/TestStressNRTReplication.java           |    4 +-
 .../lucene/replicator/nrt/ThreadPumper.java     |    4 +-
 .../lucene/document/DoubleRangeField.java       |  262 +
 .../org/apache/lucene/document/LatLonPoint.java |    5 +-
 .../document/LatLonPointDistanceQuery.java      |   39 +-
 .../document/LatLonPointInPolygonQuery.java     |    4 +-
 .../apache/lucene/document/RangeFieldQuery.java |  315 +
 .../sandbox/queries/FuzzyLikeThisQuery.java     |    1 -
 .../lucene/search/DocValuesNumbersQuery.java    |    4 +-
 .../lucene/search/DocValuesRangeQuery.java      |    4 +-
 .../lucene/search/DocValuesTermsQuery.java      |    4 +-
 .../lucene/search/TermAutomatonQuery.java       |   18 +-
 .../lucene/document/TestDoubleRangeField.java   |   67 +
 .../sandbox/queries/FuzzyLikeThisQueryTest.java |    8 +-
 .../sandbox/queries/TestSlowFuzzyQuery2.java    |  184 -
 .../lucene/sandbox/queries/fuzzyTestData.txt    | 3721 ------------
 .../search/BaseRangeFieldQueryTestCase.java     |  427 ++
 .../search/TestDoubleRangeFieldQueries.java     |  106 +
 .../lucene/search/TestTermAutomatonQuery.java   |    4 +-
 .../spatial/composite/CompositeVerifyQuery.java |    6 +-
 .../composite/IntersectsRPTVerifyQuery.java     |    4 +-
 .../spatial/prefix/AbstractPrefixTreeQuery.java |    4 +-
 .../serialized/SerializedDVStrategy.java        |    4 +-
 .../geopoint/document/GeoPointTokenStream.java  |   14 +-
 .../geopoint/search/GeoPointDistanceQuery.java  |   15 +-
 .../search/GeoPointDistanceQueryImpl.java       |   63 +-
 .../search/GeoPointInBBoxQueryImpl.java         |   32 +-
 .../search/GeoPointInPolygonQueryImpl.java      |   14 +-
 .../geopoint/search/GeoPointMultiTermQuery.java |   49 +-
 .../GeoPointTermQueryConstantScoreWrapper.java  |    4 +-
 .../geopoint/search/GeoPointTermsEnum.java      |  212 +-
 .../lucene/spatial/util/TestGeoPointField.java  |    4 +-
 .../spatial3d/PointInGeo3DShapeQuery.java       |    4 +-
 .../lucene/spatial3d/geom/GeoStandardPath.java  |   35 +-
 .../apache/lucene/spatial3d/geom/XYZBounds.java |    2 +-
 .../lucene/spatial3d/geom/GeoPathTest.java      |   37 +-
 .../suggest/analyzing/SuggestStopFilter.java    |    4 +-
 .../analyzing/SuggestStopFilterFactory.java     |   10 +-
 .../suggest/document/CompletionWeight.java      |    8 -
 .../search/suggest/document/ContextQuery.java   |    4 +-
 .../suggest/document/FuzzyCompletionQuery.java  |    2 +-
 .../suggest/document/PrefixCompletionQuery.java |    2 +-
 .../suggest/document/RegexCompletionQuery.java  |    2 +-
 .../suggest/document/SuggestIndexSearcher.java  |    2 +-
 .../analyzing/AnalyzingInfixSuggesterTest.java  |    4 +-
 .../analyzing/BlendedInfixSuggesterTest.java    |    2 +-
 .../analyzing/TestFreeTextSuggester.java        |    6 +-
 .../analyzing/TestSuggestStopFilter.java        |    4 +-
 .../analyzing/TestSuggestStopFilterFactory.java |    2 +-
 .../analysis/BaseTokenStreamTestCase.java       |    5 +-
 .../apache/lucene/analysis/MockAnalyzer.java    |   11 +-
 .../lucene/analysis/MockBytesAnalyzer.java      |    7 +
 .../lucene/analysis/MockLowerCaseFilter.java    |   40 +
 .../lucene/analysis/MockSynonymAnalyzer.java    |   28 +
 .../lucene/analysis/MockSynonymFilter.java      |   97 +
 .../standard/WordBreakTestUnicode_6_3_0.java    | 5537 ++++++++++++++++++
 .../generateJavaUnicodeWordBreakTest.pl         |  232 +
 .../lucene/analysis/standard/package.html       |   26 +
 .../codecs/asserting/AssertingPointsFormat.java |    1 +
 .../org/apache/lucene/geo/EarthDebugger.java    |    8 +-
 .../java/org/apache/lucene/geo/GeoTestUtil.java |    8 +-
 .../index/BaseCompoundFormatTestCase.java       |    2 +-
 .../index/BaseIndexFileFormatTestCase.java      |    1 -
 .../lucene/index/BaseNormsFormatTestCase.java   |    2 +-
 .../lucene/index/BasePointsFormatTestCase.java  |   29 +
 .../apache/lucene/mockfile/VirusCheckingFS.java |    4 +-
 .../lucene/search/AssertingIndexSearcher.java   |   23 +-
 .../apache/lucene/search/AssertingQuery.java    |    4 +-
 .../apache/lucene/search/AssertingWeight.java   |   29 +-
 .../lucene/search/BaseExplanationTestCase.java  |    6 +-
 .../org/apache/lucene/search/CheckHits.java     |    6 +-
 .../lucene/search/RandomApproximationQuery.java |   35 +-
 .../search/similarities/RandomSimilarity.java   |   32 +-
 .../lucene/search/spans/AssertingSpanQuery.java |    4 +-
 .../search/spans/AssertingSpanWeight.java       |   12 +-
 .../lucene/store/BaseDirectoryTestCase.java     |   56 +-
 .../lucene/store/MockDirectoryWrapper.java      |  136 +-
 .../lucene/analysis/TestMockSynonymFilter.java  |  151 +
 .../lucene/mockfile/TestVirusCheckingFS.java    |    4 +-
 .../search/TestBaseExplanationTestCase.java     |   24 +-
 .../lucene/store/TestMockDirectoryWrapper.java  |   82 +-
 lucene/tools/forbiddenApis/lucene.txt           |    3 +
 .../dependencies/GetMavenDependenciesTask.java  |    2 +-
 solr/CHANGES.txt                                |  376 +-
 solr/NOTICE.txt                                 |    3 +
 solr/bin/solr                                   |  254 +-
 solr/bin/solr.cmd                               |  280 +-
 solr/build.xml                                  |    8 +-
 solr/common-build.xml                           |    9 +-
 solr/contrib/analysis-extras/build.xml          |   10 +
 .../apache/solr/schema/ICUCollationField.java   |    2 +-
 .../solr/schema/TestICUCollationField.java      |   15 +-
 .../SolrStopwordsCarrot2LexicalDataFactory.java |    4 +-
 .../dataimport/TestTikaEntityProcessor.java     |    2 -
 .../solr/handler/dataimport/DataImporter.java   |    7 +-
 solr/contrib/extraction/ivy.xml                 |    3 +
 .../extraction/ExtractingDocumentLoader.java    |    4 +-
 .../ExtractingRequestHandlerTest.java           |    2 -
 solr/contrib/map-reduce/ivy.xml                 |    4 +-
 .../apache/solr/hadoop/SolrRecordWriter.java    |    7 +-
 .../solr/hadoop/TreeMergeOutputFormat.java      |    5 +-
 .../apache/solr/hadoop/ZooKeeperInspector.java  |   21 +-
 .../solr/hadoop/MorphlineBasicMiniMRTest.java   |    2 +
 .../solr/hadoop/MorphlineGoLiveMiniMRTest.java  |    2 +
 .../apache/solr/hadoop/MorphlineMapperTest.java |    1 +
 .../morphlines/cell/SolrCellMorphlineTest.java  |    3 +-
 solr/contrib/morphlines-core/ivy.xml            |    5 +-
 .../solr/collection1/conf/elevate.xml           |   24 +-
 .../src/test-files/solr/minimr/conf/elevate.xml |   24 +-
 .../src/test-files/solr/mrunit/conf/elevate.xml |   24 +-
 .../solrcelltest/collection1/conf/elevate.xml   |   24 +-
 solr/core/ivy.xml                               |   12 +-
 .../apache/solr/analysis/TokenizerChain.java    |   28 +-
 solr/core/src/java/org/apache/solr/api/Api.java |    3 +-
 .../src/java/org/apache/solr/api/ApiBag.java    |    4 +-
 .../java/org/apache/solr/api/ApiSupport.java    |    4 +-
 .../java/org/apache/solr/api/V2HttpCall.java    |    4 +-
 .../org/apache/solr/cloud/ElectionContext.java  |   51 +-
 .../java/org/apache/solr/cloud/LockTree.java    |   30 +-
 .../java/org/apache/solr/cloud/Overseer.java    |    9 +-
 .../OverseerAutoReplicaFailoverThread.java      |    2 +-
 .../cloud/OverseerCollectionMessageHandler.java |  168 +-
 .../org/apache/solr/cloud/ZkController.java     |  170 +-
 .../apache/solr/cloud/ZkSolrResourceLoader.java |   16 +-
 .../solr/cloud/overseer/CollectionMutator.java  |   11 +-
 .../apache/solr/cloud/rule/ImplicitSnitch.java  |   25 +-
 .../apache/solr/cloud/rule/ReplicaAssigner.java |   10 +-
 .../java/org/apache/solr/cloud/rule/Rule.java   |   10 +-
 .../apache/solr/cloud/rule/SnitchContext.java   |   33 +-
 .../org/apache/solr/core/CoreContainer.java     |  100 +-
 .../java/org/apache/solr/core/CoreSorter.java   |  185 +
 .../apache/solr/core/HdfsDirectoryFactory.java  |   13 +-
 .../solr/core/IndexDeletionPolicyWrapper.java   |   27 +-
 .../java/org/apache/solr/core/NodeConfig.java   |   38 +-
 .../apache/solr/core/QuerySenderListener.java   |   10 +-
 .../java/org/apache/solr/core/SolrConfig.java   |   10 +-
 .../src/java/org/apache/solr/core/SolrCore.java |  111 +-
 .../apache/solr/core/SolrResourceLoader.java    |   10 +-
 .../org/apache/solr/core/SolrXmlConfig.java     |   12 +
 .../java/org/apache/solr/core/ZkContainer.java  |   44 +-
 .../apache/solr/core/backup/BackupManager.java  |  249 +
 .../apache/solr/core/backup/package-info.java   |   22 +
 .../backup/repository/BackupRepository.java     |  174 +
 .../repository/BackupRepositoryFactory.java     |   89 +
 .../backup/repository/HdfsBackupRepository.java |  159 +
 .../repository/LocalFileSystemRepository.java   |  136 +
 .../core/backup/repository/package-info.java    |   23 +
 .../core/snapshots/SolrSnapshotManager.java     |  134 +
 .../snapshots/SolrSnapshotMetaDataManager.java  |  416 ++
 .../solr/core/snapshots/package-info.java       |   22 +
 .../org/apache/solr/handler/GraphHandler.java   |    8 +-
 .../org/apache/solr/handler/IndexFetcher.java   |   35 +-
 .../solr/handler/MoreLikeThisHandler.java       |    1 -
 .../apache/solr/handler/OldBackupDirectory.java |   55 +-
 .../apache/solr/handler/PingRequestHandler.java |    1 -
 .../apache/solr/handler/ReplicationHandler.java |   88 +-
 .../apache/solr/handler/RequestHandlerBase.java |   24 +-
 .../org/apache/solr/handler/RestoreCore.java    |   40 +-
 .../org/apache/solr/handler/SQLHandler.java     |    5 +-
 .../org/apache/solr/handler/SnapShooter.java    |  215 +-
 .../apache/solr/handler/SolrConfigHandler.java  |   29 +-
 .../org/apache/solr/handler/StreamHandler.java  |    1 +
 .../solr/handler/UpdateRequestHandlerApi.java   |    3 +-
 .../apache/solr/handler/admin/ApiCommand.java   |    5 +-
 .../handler/admin/BaseHandlerApiSupport.java    |    3 +-
 .../handler/admin/CollectionHandlerApi.java     |    4 +-
 .../solr/handler/admin/CollectionsHandler.java  |  849 ++-
 .../handler/admin/ConfigSetsHandlerApi.java     |    5 +-
 .../solr/handler/admin/CoreAdminHandler.java    |   10 +-
 .../solr/handler/admin/CoreAdminHandlerApi.java |    7 +-
 .../solr/handler/admin/CoreAdminOperation.java  | 1463 ++---
 .../apache/solr/handler/admin/InfoHandler.java  |    3 -
 .../apache/solr/handler/admin/V2EndPoint.java   |    3 +-
 .../component/QueryElevationComponent.java      |    1 -
 .../handler/component/RealTimeGetComponent.java |  286 +-
 .../solr/handler/component/SearchComponent.java |    2 +
 .../solr/handler/component/SearchHandler.java   |    2 +
 .../solr/handler/component/TermsComponent.java  |  122 +-
 .../solr/highlight/DefaultSolrHighlighter.java  |   17 +-
 .../java/org/apache/solr/query/FilterQuery.java |    6 +-
 .../org/apache/solr/query/SolrRangeQuery.java   |   20 +-
 .../apache/solr/request/SolrRequestInfo.java    |    6 +-
 .../solr/response/GraphMLResponseWriter.java    |    6 +-
 .../org/apache/solr/response/ResultContext.java |    2 +-
 .../transform/DocIdAugmenterFactory.java        |   10 +-
 .../solr/response/transform/DocTransformer.java |   26 +-
 .../response/transform/DocTransformers.java     |   12 +
 .../transform/ExplainAugmenterFactory.java      |   22 +-
 .../transform/ValueSourceAugmenter.java         |   13 +-
 .../analysis/ManagedStopFilterFactory.java      |    4 +-
 .../solr/schema/AbstractSpatialFieldType.java   |   18 +-
 .../java/org/apache/solr/schema/LatLonType.java |   12 +-
 .../java/org/apache/solr/schema/PointType.java  |    2 -
 .../org/apache/solr/schema/SchemaManager.java   |   56 +-
 .../org/apache/solr/search/DisMaxQParser.java   |    1 -
 .../apache/solr/search/ExportQParserPlugin.java |    4 +-
 .../solr/search/ExtendedDismaxQParser.java      |   16 +-
 .../src/java/org/apache/solr/search/Filter.java |   10 +-
 .../solr/search/GraphTermsQParserPlugin.java    |    9 +-
 .../apache/solr/search/HashQParserPlugin.java   |    4 +-
 .../apache/solr/search/JoinQParserPlugin.java   |    8 +-
 .../java/org/apache/solr/search/LRUCache.java   |   34 +-
 .../org/apache/solr/search/QueryParsing.java    |    5 +-
 .../java/org/apache/solr/search/QueryUtils.java |    2 -
 .../apache/solr/search/ReRankQParserPlugin.java |   37 +-
 .../apache/solr/search/SimpleQParserPlugin.java |    2 -
 .../solr/search/SolrConstantScoreQuery.java     |    8 +-
 .../org/apache/solr/search/SolrCoreParser.java  |   40 +-
 .../apache/solr/search/SolrIndexSearcher.java   |   20 +-
 .../apache/solr/search/SolrQueryBuilder.java    |   34 +
 .../apache/solr/search/TermsQParserPlugin.java  |    1 -
 .../apache/solr/search/ValueSourceParser.java   |   52 +
 .../org/apache/solr/search/WrappedQuery.java    |    4 +-
 .../apache/solr/search/XmlQParserPlugin.java    |   11 +
 .../function/SolrComparisonBoolFunction.java    |   58 +
 .../org/apache/solr/search/join/GraphQuery.java |   22 +-
 .../apache/solr/search/mlt/CloudMLTQParser.java |    2 -
 .../solr/search/mlt/SimpleMLTQParser.java       |    2 -
 .../similarities/SchemaSimilarityFactory.java   |    4 +-
 .../solr/security/AuthenticationPlugin.java     |   29 +-
 .../security/AutorizationEditOperation.java     |   29 +-
 .../apache/solr/security/BasicAuthPlugin.java   |    5 +-
 .../security/DelegationTokenKerberosFilter.java |  171 +
 .../apache/solr/security/KerberosFilter.java    |   14 +
 .../apache/solr/security/KerberosPlugin.java    |  195 +-
 .../solr/security/PKIAuthenticationPlugin.java  |   13 +-
 .../org/apache/solr/security/Permission.java    |   35 +-
 .../solr/security/PermissionNameProvider.java   |    4 +-
 .../solr/security/PrintWriterWrapper.java       |  215 +
 .../security/RuleBasedAuthorizationPlugin.java  |    5 +
 .../security/Sha256AuthenticationProvider.java  |    2 +
 .../apache/solr/servlet/SolrDispatchFilter.java |   12 +-
 .../apache/solr/servlet/SolrRequestParsers.java |    2 -
 .../solr/store/blockcache/BlockDirectory.java   |    5 +-
 .../store/blockcache/BlockDirectoryCache.java   |    5 +-
 .../solr/store/blockcache/BufferStore.java      |    2 +-
 .../blockcache/CustomBufferedIndexInput.java    |    2 +-
 .../apache/solr/store/hdfs/HdfsDirectory.java   |   33 +-
 .../apache/solr/store/hdfs/HdfsFileReader.java  |  105 -
 .../solr/update/DeleteByQueryWrapper.java       |   10 +-
 .../solr/update/DirectUpdateHandler2.java       |  117 +-
 .../org/apache/solr/update/HdfsUpdateLog.java   |    6 -
 .../apache/solr/update/IndexFingerprint.java    |    6 +-
 .../java/org/apache/solr/update/PeerSync.java   |  124 +-
 .../apache/solr/update/UpdateShardHandler.java  |   13 +-
 .../ClassificationUpdateProcessor.java          |   38 +-
 .../ClassificationUpdateProcessorFactory.java   |   24 +-
 .../processor/UpdateRequestProcessorChain.java  |   19 +-
 .../apache/solr/util/ConcurrentLFUCache.java    |   15 +-
 .../apache/solr/util/ConcurrentLRUCache.java    |   40 +-
 .../apache/solr/util/JsonSchemaValidator.java   |  129 +-
 .../src/java/org/apache/solr/util/PathTrie.java |    3 +-
 .../apache/solr/util/RecordingJSONParser.java   |   80 +-
 .../src/java/org/apache/solr/util/SolrCLI.java  |  414 +-
 .../org/apache/solr/util/SolrPluginUtils.java   |    1 -
 .../resources/EditableSolrConfigAttributes.json |    5 +-
 solr/core/src/resources/ImplicitPlugins.json    |    6 +
 .../apispec/cluster.config.Commands.json        |   30 +
 .../apispec/cluster.config.commands.json        |   33 -
 .../cluster.security.BasicAuth.Commands.json    |    1 -
 ...cluster.security.RuleBasedAuthorization.json |   12 +-
 .../resources/apispec/collections.Commands.json |    4 +-
 .../apispec/core.SchemaEdit.addCopyField.json   |    2 +-
 .../core/src/resources/apispec/core.Update.json |    1 -
 .../core.config.Commands.addRuntimeLib.json     |    2 +-
 .../core.config.Commands.updateRuntimeLib.json  |    2 +-
 .../src/resources/apispec/cores.Commands.json   |    1 -
 .../src/resources/apispec/cores.Status.json     |    1 -
 .../resources/apispec/cores.core.Commands.json  |    1 -
 .../cores.core.Commands.requestRecovery.json    |    4 -
 solr/core/src/resources/apispec/cores.json      |   19 -
 .../collection1/conf/schema-psuedo-fields.xml   |   71 +
 .../conf/solrconfig-testxmlparser.xml           |   33 +
 .../solr/collection1/conf/solrconfig-tlog.xml   |    8 +-
 .../solr/collection1/conf/solrconfig.xml        |    5 +-
 .../configsets/cloud-subdirs/conf/schema.xml    |   28 +
 .../cloud-subdirs/conf/solrconfig.xml           |   48 +
 .../conf/stopwords/stopwords-en.txt             |   62 +
 solr/core/src/test-files/solr/solr-50-all.xml   |    4 +
 solr/core/src/test-files/solr/solr-no-core.xml  |   45 -
 solr/core/src/test-files/solr/solr.xml          |    3 +
 .../apache/solr/DisMaxRequestHandlerTest.java   |    4 +-
 .../test/org/apache/solr/MinimalSchemaTest.java |    4 +-
 .../test/org/apache/solr/api/TestPathTrie.java  |    3 +-
 .../AbstractCloudBackupRestoreTestCase.java     |  272 +
 .../solr/cloud/BasicDistributedZk2Test.java     |   27 +-
 .../solr/cloud/ChaosMonkeyShardSplitTest.java   |   13 +-
 .../solr/cloud/CollectionStateFormat2Test.java  |    2 +-
 .../cloud/CollectionsAPIDistributedZkTest.java  |    2 +-
 .../solr/cloud/CreateCollectionCleanupTest.java |    4 +-
 .../apache/solr/cloud/CustomCollectionTest.java |    2 +-
 .../DeleteLastCustomShardedReplicaTest.java     |    2 +-
 .../apache/solr/cloud/DeleteReplicaTest.java    |    2 +-
 .../cloud/DistribJoinFromCollectionTest.java    |    2 +-
 .../apache/solr/cloud/KerberosTestServices.java |  228 +
 .../org/apache/solr/cloud/KerberosTestUtil.java |  147 -
 .../apache/solr/cloud/LeaderElectionTest.java   |    1 +
 ...utOfBoxZkACLAndCredentialsProvidersTest.java |    7 +-
 ...rriddenZkACLAndCredentialsProvidersTest.java |   71 +-
 .../cloud/OverseerModifyCollectionTest.java     |   96 +
 .../apache/solr/cloud/OverseerRolesTest.java    |    2 +-
 .../org/apache/solr/cloud/OverseerTest.java     |    1 +
 .../solr/cloud/SaslZkACLProviderTest.java       |   39 +-
 .../cloud/SharedFSAutoReplicaFailoverTest.java  |  150 +-
 .../apache/solr/cloud/SolrCLIZkUtilsTest.java   |  632 ++
 .../solr/cloud/TestAuthenticationFramework.java |  169 +-
 .../solr/cloud/TestCloudBackupRestore.java      |  219 -
 .../solr/cloud/TestCloudPseudoReturnFields.java |  839 +++
 .../apache/solr/cloud/TestConfigSetsAPI.java    |    4 +-
 .../solr/cloud/TestConfigSetsAPIZkFailure.java  |    2 +-
 .../solr/cloud/TestHdfsCloudBackupRestore.java  |  147 +
 .../cloud/TestLocalFSCloudBackupRestore.java    |   51 +
 .../org/apache/solr/cloud/TestLockTree.java     |   34 +-
 .../solr/cloud/TestMiniSolrCloudCluster.java    |    2 +-
 .../cloud/TestMiniSolrCloudClusterKerberos.java |   32 +-
 .../cloud/TestOnReconnectListenerSupport.java   |    4 +-
 .../apache/solr/cloud/TestRandomFlRTGCloud.java |  675 +++
 .../cloud/TestSizeLimitedDistributedMap.java    |    4 +-
 .../TestSolrCloudWithDelegationTokens.java      |  405 ++
 .../cloud/TestSolrCloudWithKerberosAlt.java     |   40 +-
 .../solr/cloud/UnloadDistributedZkTest.java     |    2 +-
 ...MParamsZkACLAndCredentialsProvidersTest.java |   25 +-
 .../org/apache/solr/cloud/ZkControllerTest.java |    1 +
 .../solr/cloud/hdfs/HdfsNNFailoverTest.java     |    2 +-
 .../HdfsWriteToMultipleCollectionsTest.java     |    2 +-
 .../apache/solr/cloud/hdfs/StressHdfsTest.java  |    2 +-
 .../solr/cloud/overseer/ZkStateReaderTest.java  |   36 +-
 .../solr/cloud/overseer/ZkStateWriterTest.java  |  403 +-
 .../solr/cloud/rule/ImplicitSnitchTest.java     |   49 +-
 .../apache/solr/cloud/rule/RuleEngineTest.java  |   51 +-
 .../org/apache/solr/cloud/rule/RulesTest.java   |    2 -
 .../solr/core/BlobRepositoryCloudTest.java      |   35 +-
 .../solr/core/BlobRepositoryMockingTest.java    |   35 +-
 .../org/apache/solr/core/CoreSorterTest.java    |  240 +
 .../solr/core/OpenCloseCoreStressTest.java      |   16 +-
 .../test/org/apache/solr/core/SolrCoreTest.java |    1 +
 .../solr/core/TestBackupRepositoryFactory.java  |  149 +
 .../solr/core/TestConfigSetImmutable.java       |    3 +-
 .../org/apache/solr/core/TestLazyCores.java     |    4 +-
 .../solr/core/TestQuerySenderListener.java      |   18 +-
 .../apache/solr/core/TestSolrConfigHandler.java |    2 +-
 .../test/org/apache/solr/core/TestSolrXml.java  |   15 +-
 .../core/snapshots/TestSolrCoreSnapshots.java   |  419 ++
 .../apache/solr/handler/BackupRestoreUtils.java |  104 +
 .../apache/solr/handler/CheckBackupStatus.java  |   10 +-
 .../DocumentAnalysisRequestHandlerTest.java     |    8 +-
 .../FieldAnalysisRequestHandlerTest.java        |   10 +-
 .../solr/handler/TestHdfsBackupRestoreCore.java |  239 +
 .../solr/handler/TestReplicationHandler.java    |   20 +-
 .../handler/TestReplicationHandlerBackup.java   |   39 +-
 .../apache/solr/handler/TestRestoreCore.java    |   52 +-
 .../handler/TestSolrConfigHandlerCloud.java     |    2 +-
 .../handler/admin/CoreAdminHandlerTest.java     |    2 +-
 .../solr/handler/admin/TestApiFramework.java    |    4 +-
 .../solr/handler/admin/TestCollectionAPIs.java  |    6 +-
 .../solr/handler/admin/TestCoreAdminApis.java   |    7 +-
 .../DistributedTermsComponentTest.java          |   13 +-
 .../component/ResourceSharingTestComponent.java |   34 +-
 .../handler/component/TermsComponentTest.java   |   58 +-
 .../solr/index/hdfs/CheckHdfsIndexTest.java     |    3 +-
 .../apache/solr/request/TestFacetMethods.java   |    4 +-
 .../response/TestGraphMLResponseWriter.java     |    4 +-
 .../transform/TestSubQueryTransformer.java      |   17 +-
 .../apache/solr/schema/BooleanFieldTest.java    |    4 +-
 .../solr/schema/TestManagedSchemaAPI.java       |   34 +-
 .../apache/solr/search/GoodbyeQueryBuilder.java |   39 +
 .../apache/solr/search/HandyQueryBuilder.java   |   53 +
 .../apache/solr/search/HelloQueryBuilder.java   |   39 +
 .../apache/solr/search/QueryEqualityTest.java   |   27 +-
 .../search/TestGraphTermsQParserPlugin.java     |    4 +-
 .../solr/search/TestPseudoReturnFields.java     |  615 +-
 .../org/apache/solr/search/TestRangeQuery.java  |  146 +-
 .../apache/solr/search/TestRankQueryPlugin.java |    4 +-
 .../solr/search/TestXmlQParserPlugin.java       |   78 +
 .../solr/search/function/TestFunctionQuery.java |   69 +-
 .../solr/search/mlt/CloudMLTQParserTest.java    |   10 +-
 .../solr/security/BasicAuthIntegrationTest.java |  227 +-
 ...ramDelegationTokenAuthenticationHandler.java |  109 +
 .../solr/security/MockAuthenticationPlugin.java |   32 +-
 .../spelling/TestSuggestSpellingConverter.java  |    2 +-
 .../solr/store/hdfs/HdfsDirectoryTest.java      |    5 +-
 .../uninverting/TestFieldCacheSortRandom.java   |    4 +-
 .../solr/update/DirectUpdateHandlerTest.java    |   48 +-
 ...lassificationUpdateProcessorFactoryTest.java |    4 +-
 .../org/apache/solr/util/JsonValidatorTest.java |   45 +-
 .../example-DIH/solr/db/conf/elevate.xml        |   24 +-
 .../example-DIH/solr/mail/conf/elevate.xml      |   24 +-
 .../example-DIH/solr/rss/conf/elevate.xml       |   24 +-
 .../example-DIH/solr/solr/conf/elevate.xml      |   24 +-
 solr/example/files/conf/elevate.xml             |   24 +-
 solr/licenses/bcpkix-jdk15on-1.47.jar.sha1      |    1 +
 .../bcpkix-jdk15on-LICENSE-BSD_LIKE.txt         |   15 +
 solr/licenses/bcpkix-jdk15on-NOTICE.txt         |    2 +
 solr/licenses/commons-compress-1.11.jar.sha1    |    1 +
 solr/licenses/commons-compress-1.8.1.jar.sha1   |    1 -
 solr/licenses/curator-recipes-2.8.0.jar.sha1    |    1 +
 solr/licenses/curator-recipes-LICENSE-ASL.txt   |  202 +
 solr/licenses/curator-recipes-NOTICE.txt        |    5 +
 solr/licenses/fontbox-1.8.8.jar.sha1            |    1 -
 solr/licenses/fontbox-2.0.1.jar.sha1            |    1 +
 solr/licenses/hadoop-annotations-2.6.0.jar.sha1 |    1 -
 solr/licenses/hadoop-annotations-2.7.2.jar.sha1 |    1 +
 solr/licenses/hadoop-auth-2.6.0.jar.sha1        |    1 -
 solr/licenses/hadoop-auth-2.7.2.jar.sha1        |    1 +
 .../licenses/hadoop-common-2.6.0-tests.jar.sha1 |    1 -
 solr/licenses/hadoop-common-2.6.0.jar.sha1      |    1 -
 .../licenses/hadoop-common-2.7.2-tests.jar.sha1 |    1 +
 solr/licenses/hadoop-common-2.7.2.jar.sha1      |    1 +
 solr/licenses/hadoop-hdfs-2.6.0-tests.jar.sha1  |    1 -
 solr/licenses/hadoop-hdfs-2.6.0.jar.sha1        |    1 -
 solr/licenses/hadoop-hdfs-2.7.2-tests.jar.sha1  |    1 +
 solr/licenses/hadoop-hdfs-2.7.2.jar.sha1        |    1 +
 .../hadoop-mapreduce-client-app-2.6.0.jar.sha1  |    1 -
 .../hadoop-mapreduce-client-app-2.7.2.jar.sha1  |    1 +
 ...adoop-mapreduce-client-common-2.6.0.jar.sha1 |    1 -
 ...adoop-mapreduce-client-common-2.7.2.jar.sha1 |    1 +
 .../hadoop-mapreduce-client-core-2.6.0.jar.sha1 |    1 -
 .../hadoop-mapreduce-client-core-2.7.2.jar.sha1 |    1 +
 .../hadoop-mapreduce-client-hs-2.6.0.jar.sha1   |    1 -
 .../hadoop-mapreduce-client-hs-2.7.2.jar.sha1   |    1 +
 ...reduce-client-jobclient-2.6.0-tests.jar.sha1 |    1 -
 ...op-mapreduce-client-jobclient-2.6.0.jar.sha1 |    1 -
 ...reduce-client-jobclient-2.7.2-tests.jar.sha1 |    1 +
 ...op-mapreduce-client-jobclient-2.7.2.jar.sha1 |    1 +
 ...doop-mapreduce-client-shuffle-2.6.0.jar.sha1 |    1 -
 ...doop-mapreduce-client-shuffle-2.7.2.jar.sha1 |    1 +
 solr/licenses/hadoop-minikdc-2.6.0.jar.sha1     |    1 -
 solr/licenses/hadoop-minikdc-2.7.2.jar.sha1     |    1 +
 solr/licenses/hadoop-yarn-api-2.6.0.jar.sha1    |    1 -
 solr/licenses/hadoop-yarn-api-2.7.2.jar.sha1    |    1 +
 solr/licenses/hadoop-yarn-client-2.6.0.jar.sha1 |    1 -
 solr/licenses/hadoop-yarn-client-2.7.2.jar.sha1 |    1 +
 solr/licenses/hadoop-yarn-common-2.6.0.jar.sha1 |    1 -
 solr/licenses/hadoop-yarn-common-2.7.2.jar.sha1 |    1 +
 ...ver-applicationhistoryservice-2.6.0.jar.sha1 |    1 -
 ...ver-applicationhistoryservice-2.7.2.jar.sha1 |    1 +
 .../hadoop-yarn-server-common-2.6.0.jar.sha1    |    1 -
 .../hadoop-yarn-server-common-2.7.2.jar.sha1    |    1 +
 ...adoop-yarn-server-nodemanager-2.6.0.jar.sha1 |    1 -
 ...adoop-yarn-server-nodemanager-2.7.2.jar.sha1 |    1 +
 ...p-yarn-server-resourcemanager-2.6.0.jar.sha1 |    1 -
 ...p-yarn-server-resourcemanager-2.7.2.jar.sha1 |    1 +
 ...adoop-yarn-server-tests-2.6.0-tests.jar.sha1 |    1 -
 ...adoop-yarn-server-tests-2.7.2-tests.jar.sha1 |    1 +
 .../hadoop-yarn-server-web-proxy-2.6.0.jar.sha1 |    1 -
 .../hadoop-yarn-server-web-proxy-2.7.2.jar.sha1 |    1 +
 solr/licenses/htrace-core-3.0.4.jar.sha1        |    1 -
 .../htrace-core-3.2.0-incubating.jar.sha1       |    1 +
 solr/licenses/isoparser-1.0.2.jar.sha1          |    1 -
 solr/licenses/isoparser-1.1.18.jar.sha1         |    1 +
 solr/licenses/jackcess-2.1.3.jar.sha1           |    1 +
 solr/licenses/jackcess-LICENSE-ASL.txt          |  507 ++
 solr/licenses/jackcess-NOTICE.txt               |    2 +
 solr/licenses/jempbox-1.8.12.jar.sha1           |    1 +
 solr/licenses/jempbox-1.8.8.jar.sha1            |    1 -
 solr/licenses/metadata-extractor-2.6.2.jar.sha1 |    1 -
 solr/licenses/metadata-extractor-2.8.1.jar.sha1 |    1 +
 solr/licenses/netty-3.2.4.Final.jar.sha1        |    1 +
 solr/licenses/netty-3.7.0.Final.jar.sha1        |    1 -
 solr/licenses/netty-NOTICE.txt                  |   85 +-
 solr/licenses/netty-all-4.0.36.Final.jar.sha1   |    1 +
 solr/licenses/netty-all-LICENSE-ASL.txt         |  202 +
 solr/licenses/netty-all-NOTICE.txt              |  121 +
 solr/licenses/pdfbox-1.8.8.jar.sha1             |    1 -
 solr/licenses/pdfbox-2.0.1.jar.sha1             |    1 +
 solr/licenses/pdfbox-tools-2.0.1.jar.sha1       |    1 +
 solr/licenses/pdfbox-tools-LICENSE-ASL.txt      |  314 +
 solr/licenses/pdfbox-tools-NOTICE.txt           |   14 +
 solr/licenses/poi-3.11.jar.sha1                 |    1 -
 solr/licenses/poi-3.15-beta1.jar.sha1           |    1 +
 solr/licenses/poi-ooxml-3.11.jar.sha1           |    1 -
 solr/licenses/poi-ooxml-3.15-beta1.jar.sha1     |    1 +
 solr/licenses/poi-ooxml-schemas-3.11.jar.sha1   |    1 -
 .../poi-ooxml-schemas-3.15-beta1.jar.sha1       |    1 +
 solr/licenses/poi-scratchpad-3.11.jar.sha1      |    1 -
 .../licenses/poi-scratchpad-3.15-beta1.jar.sha1 |    1 +
 solr/licenses/rome-1.6.1.jar.sha1               |    1 +
 solr/licenses/tika-core-1.13.jar.sha1           |    1 +
 solr/licenses/tika-core-1.7.jar.sha1            |    1 -
 solr/licenses/tika-java7-1.13.jar.sha1          |    1 +
 solr/licenses/tika-java7-1.7.jar.sha1           |    1 -
 solr/licenses/tika-parsers-1.13.jar.sha1        |    1 +
 solr/licenses/tika-parsers-1.7.jar.sha1         |    1 -
 solr/licenses/tika-xmp-1.13.jar.sha1            |    1 +
 solr/licenses/tika-xmp-1.7.jar.sha1             |    1 -
 solr/licenses/vorbis-java-core-0.6.jar.sha1     |    1 -
 solr/licenses/vorbis-java-core-0.8.jar.sha1     |    1 +
 solr/licenses/vorbis-java-tika-0.6.jar.sha1     |    1 -
 solr/licenses/vorbis-java-tika-0.8.jar.sha1     |    1 +
 .../basic_configs/conf/_rest_managed.json       |    1 -
 .../configsets/basic_configs/conf/elevate.xml   |   42 +
 .../basic_configs/conf/lang/contractions_ca.txt |    8 +
 .../basic_configs/conf/lang/contractions_fr.txt |   15 +
 .../basic_configs/conf/lang/contractions_ga.txt |    5 +
 .../basic_configs/conf/lang/contractions_it.txt |   23 +
 .../basic_configs/conf/lang/hyphenations_ga.txt |    5 +
 .../basic_configs/conf/lang/stemdict_nl.txt     |    6 +
 .../basic_configs/conf/lang/stoptags_ja.txt     |  420 ++
 .../basic_configs/conf/lang/stopwords_ar.txt    |  125 +
 .../basic_configs/conf/lang/stopwords_bg.txt    |  193 +
 .../basic_configs/conf/lang/stopwords_ca.txt    |  220 +
 .../basic_configs/conf/lang/stopwords_cz.txt    |  172 +
 .../basic_configs/conf/lang/stopwords_da.txt    |  110 +
 .../basic_configs/conf/lang/stopwords_de.txt    |  294 +
 .../basic_configs/conf/lang/stopwords_el.txt    |   78 +
 .../basic_configs/conf/lang/stopwords_es.txt    |  356 ++
 .../basic_configs/conf/lang/stopwords_eu.txt    |   99 +
 .../basic_configs/conf/lang/stopwords_fa.txt    |  313 +
 .../basic_configs/conf/lang/stopwords_fi.txt    |   97 +
 .../basic_configs/conf/lang/stopwords_fr.txt    |  186 +
 .../basic_configs/conf/lang/stopwords_ga.txt    |  110 +
 .../basic_configs/conf/lang/stopwords_gl.txt    |  161 +
 .../basic_configs/conf/lang/stopwords_hi.txt    |  235 +
 .../basic_configs/conf/lang/stopwords_hu.txt    |  211 +
 .../basic_configs/conf/lang/stopwords_hy.txt    |   46 +
 .../basic_configs/conf/lang/stopwords_id.txt    |  359 ++
 .../basic_configs/conf/lang/stopwords_it.txt    |  303 +
 .../basic_configs/conf/lang/stopwords_ja.txt    |  127 +
 .../basic_configs/conf/lang/stopwords_lv.txt    |  172 +
 .../basic_configs/conf/lang/stopwords_nl.txt    |  119 +
 .../basic_configs/conf/lang/stopwords_no.txt    |  194 +
 .../basic_configs/conf/lang/stopwords_pt.txt    |  253 +
 .../basic_configs/conf/lang/stopwords_ro.txt    |  233 +
 .../basic_configs/conf/lang/stopwords_ru.txt    |  243 +
 .../basic_configs/conf/lang/stopwords_sv.txt    |  133 +
 .../basic_configs/conf/lang/stopwords_th.txt    |  119 +
 .../basic_configs/conf/lang/stopwords_tr.txt    |  212 +
 .../basic_configs/conf/lang/userdict_ja.txt     |   29 +
 .../basic_configs/conf/managed-schema           |  764 ++-
 .../configsets/basic_configs/conf/params.json   |   20 +
 .../basic_configs/conf/solrconfig.xml           | 1072 +++-
 .../data_driven_schema_configs/conf/elevate.xml |   24 +-
 .../conf/managed-schema                         |    4 +-
 .../conf/elevate.xml                            |   24 +-
 solr/solrj/ivy.xml                              |    5 +
 .../apache/solr/client/solrj/SolrRequest.java   |    1 -
 .../solr/client/solrj/impl/CloudSolrClient.java |  158 +-
 .../solr/client/solrj/impl/HttpClientUtil.java  |    8 +-
 .../solr/client/solrj/impl/HttpSolrClient.java  |   57 +-
 .../solrj/impl/Krb5HttpClientBuilder.java       |   18 +-
 .../solrj/io/graph/ShortestPathStream.java      |    6 +-
 .../client/solrj/io/stream/CloudSolrStream.java |   25 +-
 .../solr/client/solrj/io/stream/JDBCStream.java |    4 +
 .../client/solrj/io/stream/ParallelStream.java  |    2 +-
 .../solrj/io/stream/ScoreNodesStream.java       |  256 +
 .../client/solrj/io/stream/TopicStream.java     |   61 +-
 .../solrj/request/CollectionAdminRequest.java   |   32 +-
 .../client/solrj/request/CoreAdminRequest.java  |   57 +
 .../solrj/request/DelegationTokenRequest.java   |  152 +
 .../client/solrj/request/UpdateRequest.java     |    6 +
 .../solrj/response/DelegationTokenResponse.java |  108 +
 .../solr/common/ToleratedUpdateError.java       |    2 +-
 .../solr/common/cloud/ClusterProperties.java    |    4 +-
 .../apache/solr/common/cloud/ClusterState.java  |   13 +-
 .../common/cloud/CollectionStatePredicate.java  |    4 +-
 .../common/cloud/CollectionStateWatcher.java    |    6 +-
 .../solr/common/cloud/ConnectionManager.java    |   15 +-
 .../common/cloud/DefaultConnectionStrategy.java |    4 +-
 .../apache/solr/common/cloud/DocCollection.java |   26 +-
 .../solr/common/cloud/SaslZkACLProvider.java    |   21 +-
 .../cloud/SecurityAwareZkACLProvider.java       |   79 +
 .../apache/solr/common/cloud/SolrZkClient.java  |  121 +-
 ...ParamsAllAndReadonlyDigestZkACLProvider.java |   52 +-
 .../cloud/ZkClientConnectionStrategy.java       |    4 +-
 .../solr/common/cloud/ZkConfigManager.java      |  117 +-
 .../solr/common/cloud/ZkMaintenanceUtils.java   |  368 ++
 .../apache/solr/common/cloud/ZkStateReader.java |  167 +-
 .../solr/common/params/CollectionParams.java    |   29 +-
 .../solr/common/params/CoreAdminParams.java     |   20 +-
 .../apache/solr/common/params/SolrParams.java   |   24 +-
 .../apache/solr/common/params/TermsParams.java  |   12 +
 .../org/apache/solr/common/util/Lookup.java     |   22 -
 .../org/apache/solr/common/util/RetryUtil.java  |    8 +-
 .../solr/common/util/ValidatingJsonMap.java     |    4 +-
 .../solr/configsets/streaming/conf/schema.xml   |    2 +-
 .../solrj/impl/CloudSolrClientBuilderTest.java  |   28 +-
 .../client/solrj/impl/CloudSolrClientTest.java  |   24 +-
 .../ConcurrentUpdateSolrClientBuilderTest.java  |   12 +-
 .../solrj/impl/HttpSolrClientBuilderTest.java   |   22 +-
 .../solrj/impl/LBHttpSolrClientBuilderTest.java |   18 +-
 .../solrj/io/graph/GraphExpressionTest.java     |  137 +-
 .../solr/client/solrj/io/graph/GraphTest.java   |    4 +-
 .../solr/client/solrj/io/sql/JdbcTest.java      |    4 +-
 .../client/solrj/io/stream/JDBCStreamTest.java  |   16 +
 .../solrj/io/stream/StreamExpressionTest.java   |  244 +-
 .../client/solrj/io/stream/StreamingTest.java   |   19 +-
 .../request/TestDelegationTokenRequest.java     |   70 +
 .../response/TestDelegationTokenResponse.java   |  138 +
 .../cloud/TestCollectionStateWatchers.java      |    4 +-
 .../solr/common/util/TestJsonRecordReader.java  |   52 +
 .../apache/solr/common/util/TestRetryUtil.java  |   37 +-
 .../java/org/apache/solr/SolrTestCaseJ4.java    |   71 +-
 .../apache/solr/core/MockDirectoryFactory.java  |    5 -
 .../solr/core/MockFSDirectoryFactory.java       |    1 -
 solr/webapp/web/css/angular/cloud.css           |   14 +
 solr/webapp/web/js/angular/app.js               |    2 +-
 solr/webapp/web/js/angular/controllers/cloud.js |   53 +-
 solr/webapp/web/js/angular/controllers/query.js |   10 +-
 solr/webapp/web/js/lib/jquery.blockUI.js        |    2 +-
 solr/webapp/web/partials/cloud.html             |    3 +-
 1211 files changed, 47788 insertions(+), 28323 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/92411981/solr/core/src/java/org/apache/solr/api/Api.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/92411981/solr/core/src/java/org/apache/solr/api/ApiBag.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/92411981/solr/core/src/java/org/apache/solr/api/V2HttpCall.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/92411981/solr/core/src/java/org/apache/solr/handler/admin/ApiCommand.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/92411981/solr/core/src/java/org/apache/solr/handler/admin/BaseHandlerApiSupport.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/92411981/solr/core/src/java/org/apache/solr/handler/admin/CollectionHandlerApi.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/92411981/solr/core/src/java/org/apache/solr/security/BasicAuthPlugin.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/92411981/solr/core/src/java/org/apache/solr/security/RuleBasedAuthorizationPlugin.java
----------------------------------------------------------------------
diff --cc solr/core/src/java/org/apache/solr/security/RuleBasedAuthorizationPlugin.java
index 3388147,c674ff3..e798670
--- a/solr/core/src/java/org/apache/solr/security/RuleBasedAuthorizationPlugin.java
+++ b/solr/core/src/java/org/apache/solr/security/RuleBasedAuthorizationPlugin.java
@@@ -27,7 -27,7 +27,12 @@@ import java.util.Map
  import java.util.Set;
  import java.util.function.Function;
  
 -import org.apache.solr.common.util.Map2;
++import com.google.common.collect.ImmutableSet;
++import org.apache.solr.common.SolrException;
++import org.apache.solr.common.params.CollectionParams;
++import org.apache.solr.common.util.Utils;
 +import org.apache.solr.common.util.ValidatingJsonMap;
++
  import org.apache.solr.util.CommandOperation;
  import org.apache.solr.api.ApiBag;
  import org.apache.solr.api.SpecProvider;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/92411981/solr/core/src/java/org/apache/solr/security/Sha256AuthenticationProvider.java
----------------------------------------------------------------------
diff --cc solr/core/src/java/org/apache/solr/security/Sha256AuthenticationProvider.java
index f270524,7410335..f18838d
--- a/solr/core/src/java/org/apache/solr/security/Sha256AuthenticationProvider.java
+++ b/solr/core/src/java/org/apache/solr/security/Sha256AuthenticationProvider.java
@@@ -30,7 -30,7 +30,9 @@@ import java.util.Set
  
  import com.google.common.collect.ImmutableSet;
  import org.apache.commons.codec.binary.Base64;
 -import org.apache.solr.common.util.Map2;
++import org.apache.solr.api.SpecProvider;
 +import org.apache.solr.common.util.ValidatingJsonMap;
++
  import org.apache.solr.util.CommandOperation;
  import org.apache.solr.api.ApiBag;
  import org.slf4j.Logger;

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/92411981/solr/core/src/java/org/apache/solr/servlet/SolrRequestParsers.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/92411981/solr/core/src/java/org/apache/solr/util/PathTrie.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/92411981/solr/core/src/test/org/apache/solr/api/TestPathTrie.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/92411981/solr/core/src/test/org/apache/solr/core/TestSolrConfigHandler.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/92411981/solr/core/src/test/org/apache/solr/handler/admin/TestApiFramework.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/92411981/solr/core/src/test/org/apache/solr/handler/admin/TestCollectionAPIs.java
----------------------------------------------------------------------

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/92411981/solr/core/src/test/org/apache/solr/util/JsonValidatorTest.java
----------------------------------------------------------------------
diff --cc solr/core/src/test/org/apache/solr/util/JsonValidatorTest.java
index 0bfdc12,3bae53f..1730353
--- a/solr/core/src/test/org/apache/solr/util/JsonValidatorTest.java
+++ b/solr/core/src/test/org/apache/solr/util/JsonValidatorTest.java
@@@ -31,9 -31,10 +31,9 @@@ import static org.apache.solr.common.ut
  
  public class JsonValidatorTest extends SolrTestCaseJ4 {
  
 -
    public void testSchema() {
      checkSchema("collections.Commands");
-     checkSchema("collections.collection.commands");
+     checkSchema("collections.collection.Commands");
      checkSchema("collections.collection.shards.Commands");
      checkSchema("collections.collection.shards.shard.Commands");
      checkSchema("collections.collection.shards.shard.replica.Commands");

http://git-wip-us.apache.org/repos/asf/lucene-solr/blob/92411981/solr/solrj/src/java/org/apache/solr/common/util/ValidatingJsonMap.java
----------------------------------------------------------------------
diff --cc solr/solrj/src/java/org/apache/solr/common/util/ValidatingJsonMap.java
index 553d134,0000000..d19d56a
mode 100644,000000..100644
--- a/solr/solrj/src/java/org/apache/solr/common/util/ValidatingJsonMap.java
+++ b/solr/solrj/src/java/org/apache/solr/common/util/ValidatingJsonMap.java
@@@ -1,291 -1,0 +1,291 @@@
- package org.apache.solr.common.util;
- 
 +/*
 + * Licensed to the Apache Software Foundation (ASF) under one or more
 + * contributor license agreements.  See the NOTICE file distributed with
 + * this work for additional information regarding copyright ownership.
 + * The ASF licenses this file to You under the Apache License, Version 2.0
 + * (the "License"); you may not use this file except in compliance with
 + * the License.  You may obtain a copy of the License at
 + *
 + *     http://www.apache.org/licenses/LICENSE-2.0
 + *
 + * Unless required by applicable law or agreed to in writing, software
 + * distributed under the License is distributed on an "AS IS" BASIS,
 + * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
 + * See the License for the specific language governing permissions and
 + * limitations under the License.
 + */
 +
++package org.apache.solr.common.util;
++
 +import java.io.IOException;
 +import java.io.InputStream;
 +import java.io.InputStreamReader;
 +import java.io.Reader;
 +import java.util.ArrayList;
 +import java.util.Collection;
 +import java.util.Collections;
 +import java.util.HashSet;
 +import java.util.LinkedHashMap;
 +import java.util.List;
 +import java.util.Map;
 +import java.util.Set;
 +
 +import org.noggit.JSONParser;
 +import org.noggit.ObjectBuilder;
 +
 +import static java.nio.charset.StandardCharsets.UTF_8;
 +import static java.util.Collections.unmodifiableList;
 +import static java.util.Collections.unmodifiableSet;
 +
 +public class ValidatingJsonMap implements Map<String, Object> {
 +
 +  public static final PredicateWithErrMsg<Object> NOT_NULL = o -> {
 +    if (o == null) return " Must not be NULL";
 +    return null;
 +  };
 +  public static final PredicateWithErrMsg<Pair> ENUM_OF = pair -> {
 +    if (pair.second() instanceof Set) {
 +      Set set = (Set) pair.second();
 +      if (pair.first() instanceof Collection) {
 +        for (Object o : (Collection) pair.first()) {
 +          if (!set.contains(o)) {
 +            return " Must be one of " + pair.second();
 +          }
 +        }
 +      } else {
 +        if (!set.contains(pair.first())) return " Must be one of " + pair.second() + ", got " + pair.first();
 +      }
 +      return null;
 +    } else {
 +      return " Unknown type";
 +    }
 +
 +  };
 +  private final Map<String, Object> delegate;
 +
 +  public ValidatingJsonMap(Map<String, Object> delegate) {
 +    this.delegate = delegate;
 +  }
 +
 +  public ValidatingJsonMap(int i) {
 +    delegate = new LinkedHashMap<>(i);
 +  }
 +
 +  public ValidatingJsonMap() {
 +    delegate = new LinkedHashMap<>();
 +  }
 +
 +  @Override
 +  public int size() {
 +    return delegate.size();
 +  }
 +
 +  @Override
 +  public boolean isEmpty() {
 +    return delegate.isEmpty();
 +  }
 +
 +  @Override
 +  public boolean containsKey(Object key) {
 +    return delegate.containsKey(key);
 +  }
 +
 +  @Override
 +  public boolean containsValue(Object value) {
 +    return delegate.containsValue(value);
 +  }
 +
 +  @Override
 +  public Object get(Object key) {
 +    return delegate.get(key);
 +  }
 +
 +  @Override
 +  public Object put(String key, Object value) {
 +    return delegate.put(key, value);
 +  }
 +
 +  @Override
 +  public Object remove(Object key) {
 +    return null;
 +  }
 +
 +  @Override
 +  public void putAll(Map<? extends String, ?> m) {
 +    delegate.putAll(m);
 +  }
 +
 +  @Override
 +  public void clear() {
 +    delegate.clear();
 +
 +  }
 +
 +  @Override
 +  public Set<String> keySet() {
 +    return delegate.keySet();
 +  }
 +
 +  @Override
 +  public Collection<Object> values() {
 +    return delegate.values();
 +  }
 +
 +  @Override
 +  public Set<Entry<String, Object>> entrySet() {
 +    return delegate.entrySet();
 +  }
 +
 +  public Object get(String key, PredicateWithErrMsg predicate) {
 +    Object v = get(key);
 +    if (predicate != null) {
 +      String msg = predicate.test(v);
 +      if (msg != null) {
 +        throw new RuntimeException("" + key + msg);
 +      }
 +    }
 +    return v;
 +  }
 +
 +  public Boolean getBool(String key, Boolean def) {
 +    Object v = get(key);
 +    if (v == null) return def;
 +    if (v instanceof Boolean) return (Boolean) v;
 +    try {
 +      return Boolean.parseBoolean(v.toString());
 +    } catch (NumberFormatException e) {
 +      throw new RuntimeException("value of " + key + "must be an boolean");
 +    }
 +  }
 +
 +  public Integer getInt(String key, Integer def) {
 +    Object v = get(key);
 +    if (v == null) return def;
 +    if (v instanceof Integer) return (Integer) v;
 +    try {
 +      return Integer.parseInt(v.toString());
 +    } catch (NumberFormatException e) {
 +      throw new RuntimeException("value of " + key + "must be an integer");
 +    }
 +  }
 +  public ValidatingJsonMap getMap(String key, PredicateWithErrMsg predicate) {
 +    return getMap(key, predicate, null);
 +
 +  }
 +
 +  public ValidatingJsonMap getMap(String key, PredicateWithErrMsg predicate, String message) {
 +    Object v = get(key);
 +    if (v != null && !(v instanceof Map)) {
 +      throw new RuntimeException("" + key + " should be of type map");
 +    }
 +
 +    if (predicate != null) {
 +      String msg = predicate.test(v);
 +      if (msg != null) {
 +        msg = message != null ? message : key + msg;
 +        throw new RuntimeException(msg);
 +      }
 +    }
 +    return wrap((Map) v);
 +  }
 +
 +  public List getList(String key, PredicateWithErrMsg predicate) {
 +    return getList(key, predicate, null);
 +  }
 +
 +  public List getList(String key, PredicateWithErrMsg predicate, Object test) {
 +    Object v = get(key);
 +    if (v != null && !(v instanceof List)) {
 +      throw new RuntimeException("" + key + " should be of type List");
 +    }
 +
 +    if (predicate != null) {
 +      String msg = predicate.test(test == null ? v : new Pair(v, test));
 +      if (msg != null) {
 +        throw new RuntimeException("" + key + msg);
 +      }
 +    }
 +
 +    return (List) v;
 +  }
 +
 +  public Object get(String key, PredicateWithErrMsg<Pair> predicate, Object arg) {
 +    Object v = get(key);
 +    String test = predicate.test(new Pair(v, arg));
 +    if (test != null) {
 +      throw new RuntimeException("" + key + test);
 +    }
 +    return v;
 +  }
 +
 +  public Object get(String k, Object def) {
 +    Object v = get(k);
 +    if (v == null) return def;
 +    return v;
 +  }
 +
 +  static ValidatingJsonMap wrap(Map<String, Object> map) {
 +    if (map == null) return null;
 +    if (map instanceof ValidatingJsonMap) {
 +      return (ValidatingJsonMap) map;
 +    } else {
 +      return new ValidatingJsonMap(map);
 +    }
 +
 +  }
 +
 +  public static ValidatingJsonMap fromJSON(InputStream is) {
 +    return fromJSON(new InputStreamReader(is, UTF_8));
 +  }
 +
 +  public static ValidatingJsonMap fromJSON(Reader s) {
 +    try {
 +      return (ValidatingJsonMap) (getObjectBuilder(new JSONParser(s)).getObject());
 +    } catch (IOException e) {
 +      throw new RuntimeException();
 +    }
 +  }
 +
 +  public static ValidatingJsonMap getDeepCopy(Map map, int maxDepth, boolean mutable) {
 +    if (map == null) return null;
 +    if (maxDepth < 1) return ValidatingJsonMap.wrap(map);
 +    ValidatingJsonMap copy = mutable ? new ValidatingJsonMap(map.size()) : new ValidatingJsonMap();
 +    for (Object o : map.entrySet()) {
 +      Map.Entry<String,Object> e = (Entry<String, Object>) o;
 +      Object v = e.getValue();
 +      if (v instanceof Map) v = getDeepCopy((Map) v, maxDepth - 1, mutable);
 +      else if (v instanceof Collection) v = getDeepCopy((Collection) v, maxDepth - 1, mutable);
 +      copy.put(e.getKey(), v);
 +    }
 +    return mutable ? copy : new ValidatingJsonMap(Collections.unmodifiableMap(copy));
 +  }
 +
 +  public static Collection getDeepCopy(Collection c, int maxDepth, boolean mutable) {
 +    if (c == null || maxDepth < 1) return c;
 +    Collection result = c instanceof Set ? new HashSet() : new ArrayList();
 +    for (Object o : c) {
 +      if (o instanceof Map) {
 +        o = getDeepCopy((Map) o, maxDepth - 1, mutable);
 +      }
 +      result.add(o);
 +    }
 +    return mutable ? result : result instanceof Set ? unmodifiableSet((Set) result) : unmodifiableList((List) result);
 +  }
 +
 +  private static ObjectBuilder getObjectBuilder(final JSONParser jp) throws IOException {
 +    return new ObjectBuilder(jp) {
 +      @Override
 +      public Object newObject() throws IOException {
 +        return new ValidatingJsonMap();
 +      }
 +    };
 +  }
 +
 +
 +  @Override
 +  public boolean equals(Object that) {
 +    return that instanceof Map && this.delegate.equals(that);
 +  }
 +
 +  public static final ValidatingJsonMap EMPTY = new ValidatingJsonMap(Collections.EMPTY_MAP);
 +}


Mime
View raw message