lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r1633538 [1/5] - in /lucene/dev/branches/lucene5969: ./ lucene/ lucene/analysis/ lucene/analysis/common/ lucene/analysis/icu/ lucene/analysis/kuromoji/ lucene/analysis/morfologik/ lucene/analysis/phonetic/ lucene/analysis/smartcn/ lucene/an...
Date Wed, 22 Oct 2014 05:44:21 GMT
Author: rmuir
Date: Wed Oct 22 05:44:17 2014
New Revision: 1633538

URL: http://svn.apache.org/r1633538
Log:
merge trunk

Added:
    lucene/dev/branches/lucene5969/solr/core/src/java/org/apache/solr/util/RecordingJSONParser.java
      - copied unchanged from r1633528, lucene/dev/trunk/solr/core/src/java/org/apache/solr/util/RecordingJSONParser.java
Removed:
    lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/util/DoubleBarrelLRUCache.java
    lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/util/OpenBitSet.java
    lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/util/OpenBitSetDISI.java
    lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/util/OpenBitSetIterator.java
    lucene/dev/branches/lucene5969/lucene/core/src/test/org/apache/lucene/util/TestDoubleBarrelLRUCache.java
    lucene/dev/branches/lucene5969/lucene/core/src/test/org/apache/lucene/util/TestOpenBitSet.java
Modified:
    lucene/dev/branches/lucene5969/   (props changed)
    lucene/dev/branches/lucene5969/lucene/   (props changed)
    lucene/dev/branches/lucene5969/lucene/CHANGES.txt   (contents, props changed)
    lucene/dev/branches/lucene5969/lucene/MIGRATE.txt   (contents, props changed)
    lucene/dev/branches/lucene5969/lucene/analysis/   (props changed)
    lucene/dev/branches/lucene5969/lucene/analysis/common/   (props changed)
    lucene/dev/branches/lucene5969/lucene/analysis/common/ivy.xml
    lucene/dev/branches/lucene5969/lucene/analysis/icu/ivy.xml
    lucene/dev/branches/lucene5969/lucene/analysis/kuromoji/ivy.xml
    lucene/dev/branches/lucene5969/lucene/analysis/morfologik/ivy.xml
    lucene/dev/branches/lucene5969/lucene/analysis/phonetic/ivy.xml
    lucene/dev/branches/lucene5969/lucene/analysis/smartcn/ivy.xml
    lucene/dev/branches/lucene5969/lucene/analysis/stempel/ivy.xml
    lucene/dev/branches/lucene5969/lucene/analysis/uima/ivy.xml
    lucene/dev/branches/lucene5969/lucene/backward-codecs/   (props changed)
    lucene/dev/branches/lucene5969/lucene/backward-codecs/ivy.xml
    lucene/dev/branches/lucene5969/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40FieldInfosFormat.java
    lucene/dev/branches/lucene5969/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene42/Lucene42FieldInfosFormat.java
    lucene/dev/branches/lucene5969/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene46/Lucene46FieldInfosFormat.java
    lucene/dev/branches/lucene5969/lucene/benchmark/   (props changed)
    lucene/dev/branches/lucene5969/lucene/benchmark/ivy.xml
    lucene/dev/branches/lucene5969/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DocMaker.java
    lucene/dev/branches/lucene5969/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReadTokensTask.java
    lucene/dev/branches/lucene5969/lucene/classification/   (props changed)
    lucene/dev/branches/lucene5969/lucene/classification/ivy.xml
    lucene/dev/branches/lucene5969/lucene/codecs/   (props changed)
    lucene/dev/branches/lucene5969/lucene/codecs/ivy.xml
    lucene/dev/branches/lucene5969/lucene/codecs/src/java/org/apache/lucene/codecs/blockterms/BlockTermsReader.java
    lucene/dev/branches/lucene5969/lucene/codecs/src/java/org/apache/lucene/codecs/simpletext/SimpleTextFieldInfosFormat.java
    lucene/dev/branches/lucene5969/lucene/core/   (props changed)
    lucene/dev/branches/lucene5969/lucene/core/ivy.xml
    lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/analysis/NumericTokenStream.java
    lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/codecs/lucene50/Lucene50FieldInfosFormat.java
    lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/Document.java
    lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/DocumentStoredFieldVisitor.java
    lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/DoubleField.java
    lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/Field.java
    lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/FieldType.java
    lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/FloatField.java
    lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/IntField.java
    lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/LongField.java
    lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/StringField.java
    lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/TextField.java
    lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/index/DefaultIndexingChain.java
    lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/index/FieldInfo.java
    lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/index/FieldInfos.java
    lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/index/FilterDirectoryReader.java
    lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/index/IndexableField.java
    lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/index/IndexableFieldType.java
    lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/index/TermVectorsConsumerPerField.java
    lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/search/DocValuesDocIdSet.java
    lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/util/DocIdSetBuilder.java
    lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/util/FixedBitSet.java
    lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/util/NotDocIdSet.java
    lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/util/NumericUtils.java
    lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/util/RoaringDocIdSet.java
    lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/util/SparseFixedBitSet.java
    lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/util/fst/FST.java
    lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/util/packed/PackedInts.java
    lucene/dev/branches/lucene5969/lucene/core/src/java/overview.html
    lucene/dev/branches/lucene5969/lucene/core/src/test/org/apache/lucene/analysis/TestMockAnalyzer.java
    lucene/dev/branches/lucene5969/lucene/core/src/test/org/apache/lucene/document/TestDocument.java
    lucene/dev/branches/lucene5969/lucene/core/src/test/org/apache/lucene/document/TestFieldType.java
    lucene/dev/branches/lucene5969/lucene/core/src/test/org/apache/lucene/index/Test4GBStoredFields.java
    lucene/dev/branches/lucene5969/lucene/core/src/test/org/apache/lucene/index/TestAddIndexes.java
    lucene/dev/branches/lucene5969/lucene/core/src/test/org/apache/lucene/index/TestCodecs.java
    lucene/dev/branches/lucene5969/lucene/core/src/test/org/apache/lucene/index/TestConsistentFieldNumbers.java
    lucene/dev/branches/lucene5969/lucene/core/src/test/org/apache/lucene/index/TestExceedMaxTermLength.java
    lucene/dev/branches/lucene5969/lucene/core/src/test/org/apache/lucene/index/TestIndexWriter.java
    lucene/dev/branches/lucene5969/lucene/core/src/test/org/apache/lucene/index/TestIndexWriterExceptions.java
    lucene/dev/branches/lucene5969/lucene/core/src/test/org/apache/lucene/index/TestIndexableField.java
    lucene/dev/branches/lucene5969/lucene/core/src/test/org/apache/lucene/index/TestPostingsOffsets.java
    lucene/dev/branches/lucene5969/lucene/core/src/test/org/apache/lucene/index/TestSegmentReader.java
    lucene/dev/branches/lucene5969/lucene/core/src/test/org/apache/lucene/index/TestStressIndexing2.java
    lucene/dev/branches/lucene5969/lucene/core/src/test/org/apache/lucene/search/similarities/TestSimilarityBase.java
    lucene/dev/branches/lucene5969/lucene/core/src/test/org/apache/lucene/util/TestDocIdSetBuilder.java
    lucene/dev/branches/lucene5969/lucene/demo/   (props changed)
    lucene/dev/branches/lucene5969/lucene/demo/ivy.xml
    lucene/dev/branches/lucene5969/lucene/expressions/   (props changed)
    lucene/dev/branches/lucene5969/lucene/expressions/ivy.xml
    lucene/dev/branches/lucene5969/lucene/facet/   (props changed)
    lucene/dev/branches/lucene5969/lucene/facet/ivy.xml
    lucene/dev/branches/lucene5969/lucene/facet/src/java/org/apache/lucene/facet/FacetField.java
    lucene/dev/branches/lucene5969/lucene/facet/src/java/org/apache/lucene/facet/sortedset/SortedSetDocValuesFacetField.java
    lucene/dev/branches/lucene5969/lucene/facet/src/java/org/apache/lucene/facet/taxonomy/AssociationFacetField.java
    lucene/dev/branches/lucene5969/lucene/grouping/   (props changed)
    lucene/dev/branches/lucene5969/lucene/grouping/ivy.xml
    lucene/dev/branches/lucene5969/lucene/highlighter/   (props changed)
    lucene/dev/branches/lucene5969/lucene/highlighter/ivy.xml
    lucene/dev/branches/lucene5969/lucene/join/   (props changed)
    lucene/dev/branches/lucene5969/lucene/join/ivy.xml
    lucene/dev/branches/lucene5969/lucene/memory/   (props changed)
    lucene/dev/branches/lucene5969/lucene/memory/ivy.xml
    lucene/dev/branches/lucene5969/lucene/memory/src/java/org/apache/lucene/index/memory/MemoryIndex.java
    lucene/dev/branches/lucene5969/lucene/memory/src/test/org/apache/lucene/index/memory/TestMemoryIndex.java
    lucene/dev/branches/lucene5969/lucene/memory/src/test/org/apache/lucene/index/memory/TestMemoryIndexAgainstRAMDir.java
    lucene/dev/branches/lucene5969/lucene/misc/   (props changed)
    lucene/dev/branches/lucene5969/lucene/misc/ivy.xml
    lucene/dev/branches/lucene5969/lucene/misc/src/java/org/apache/lucene/uninverting/UninvertingReader.java
    lucene/dev/branches/lucene5969/lucene/misc/src/test/org/apache/lucene/document/TestLazyDocument.java
    lucene/dev/branches/lucene5969/lucene/queries/   (props changed)
    lucene/dev/branches/lucene5969/lucene/queries/ivy.xml
    lucene/dev/branches/lucene5969/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/DualFloatFunction.java
    lucene/dev/branches/lucene5969/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/IfFunction.java
    lucene/dev/branches/lucene5969/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/LinearFloatFunction.java
    lucene/dev/branches/lucene5969/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/MaxFloatFunction.java
    lucene/dev/branches/lucene5969/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/MinFloatFunction.java
    lucene/dev/branches/lucene5969/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/MultiFloatFunction.java
    lucene/dev/branches/lucene5969/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/MultiFunction.java
    lucene/dev/branches/lucene5969/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/ReciprocalFloatFunction.java
    lucene/dev/branches/lucene5969/lucene/queries/src/java/org/apache/lucene/queries/function/valuesource/ScaleFloatFunction.java
    lucene/dev/branches/lucene5969/lucene/queries/src/test/org/apache/lucene/queries/function/TestValueSources.java
    lucene/dev/branches/lucene5969/lucene/queryparser/   (props changed)
    lucene/dev/branches/lucene5969/lucene/queryparser/ivy.xml
    lucene/dev/branches/lucene5969/lucene/queryparser/src/test/org/apache/lucene/queryparser/analyzing/TestAnalyzingQueryParser.java
    lucene/dev/branches/lucene5969/lucene/replicator/   (props changed)
    lucene/dev/branches/lucene5969/lucene/replicator/ivy.xml
    lucene/dev/branches/lucene5969/lucene/sandbox/   (props changed)
    lucene/dev/branches/lucene5969/lucene/sandbox/ivy.xml
    lucene/dev/branches/lucene5969/lucene/sandbox/src/test/org/apache/lucene/codecs/idversion/StringAndPayloadField.java
    lucene/dev/branches/lucene5969/lucene/spatial/   (props changed)
    lucene/dev/branches/lucene5969/lucene/spatial/ivy.xml
    lucene/dev/branches/lucene5969/lucene/spatial/src/java/org/apache/lucene/spatial/bbox/BBoxStrategy.java
    lucene/dev/branches/lucene5969/lucene/spatial/src/java/org/apache/lucene/spatial/prefix/PrefixTreeStrategy.java
    lucene/dev/branches/lucene5969/lucene/spatial/src/test/org/apache/lucene/spatial/DistanceStrategyTest.java
    lucene/dev/branches/lucene5969/lucene/spatial/src/test/org/apache/lucene/spatial/bbox/TestBBoxStrategy.java
    lucene/dev/branches/lucene5969/lucene/suggest/   (props changed)
    lucene/dev/branches/lucene5969/lucene/suggest/ivy.xml
    lucene/dev/branches/lucene5969/lucene/test-framework/   (props changed)
    lucene/dev/branches/lucene5969/lucene/test-framework/ivy.xml
    lucene/dev/branches/lucene5969/lucene/test-framework/src/java/org/apache/lucene/index/BaseFieldInfoFormatTestCase.java
    lucene/dev/branches/lucene5969/lucene/test-framework/src/java/org/apache/lucene/index/BasePostingsFormatTestCase.java
    lucene/dev/branches/lucene5969/lucene/test-framework/src/java/org/apache/lucene/index/BaseStoredFieldsFormatTestCase.java
    lucene/dev/branches/lucene5969/lucene/test-framework/src/java/org/apache/lucene/index/DocHelper.java
    lucene/dev/branches/lucene5969/lucene/test-framework/src/java/org/apache/lucene/util/LineFileDocs.java
    lucene/dev/branches/lucene5969/lucene/test-framework/src/java/org/apache/lucene/util/LuceneTestCase.java
    lucene/dev/branches/lucene5969/lucene/tools/   (props changed)
    lucene/dev/branches/lucene5969/lucene/tools/ivy.xml
    lucene/dev/branches/lucene5969/lucene/tools/src/java/org/apache/lucene/dependencies/GetMavenDependenciesTask.java
    lucene/dev/branches/lucene5969/solr/   (props changed)
    lucene/dev/branches/lucene5969/solr/CHANGES.txt   (contents, props changed)
    lucene/dev/branches/lucene5969/solr/contrib/   (props changed)
    lucene/dev/branches/lucene5969/solr/contrib/analysis-extras/ivy.xml
    lucene/dev/branches/lucene5969/solr/contrib/analytics/ivy.xml
    lucene/dev/branches/lucene5969/solr/contrib/clustering/ivy.xml
    lucene/dev/branches/lucene5969/solr/contrib/dataimporthandler-extras/ivy.xml
    lucene/dev/branches/lucene5969/solr/contrib/dataimporthandler/ivy.xml
    lucene/dev/branches/lucene5969/solr/contrib/extraction/ivy.xml
    lucene/dev/branches/lucene5969/solr/contrib/langid/ivy.xml
    lucene/dev/branches/lucene5969/solr/contrib/map-reduce/ivy.xml
    lucene/dev/branches/lucene5969/solr/contrib/morphlines-cell/ivy.xml
    lucene/dev/branches/lucene5969/solr/contrib/morphlines-core/build.xml
    lucene/dev/branches/lucene5969/solr/contrib/morphlines-core/ivy.xml
    lucene/dev/branches/lucene5969/solr/contrib/uima/ivy.xml
    lucene/dev/branches/lucene5969/solr/contrib/velocity/ivy.xml
    lucene/dev/branches/lucene5969/solr/core/   (props changed)
    lucene/dev/branches/lucene5969/solr/core/ivy.xml
    lucene/dev/branches/lucene5969/solr/core/src/java/org/apache/solr/cloud/ElectionContext.java
    lucene/dev/branches/lucene5969/solr/core/src/java/org/apache/solr/cloud/LeaderElector.java
    lucene/dev/branches/lucene5969/solr/core/src/java/org/apache/solr/cloud/Overseer.java
    lucene/dev/branches/lucene5969/solr/core/src/java/org/apache/solr/cloud/OverseerCollectionProcessor.java
    lucene/dev/branches/lucene5969/solr/core/src/java/org/apache/solr/cloud/ZkController.java
    lucene/dev/branches/lucene5969/solr/core/src/java/org/apache/solr/handler/admin/CollectionsHandler.java
    lucene/dev/branches/lucene5969/solr/core/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java
    lucene/dev/branches/lucene5969/solr/core/src/java/org/apache/solr/handler/component/QueryElevationComponent.java
    lucene/dev/branches/lucene5969/solr/core/src/java/org/apache/solr/handler/component/SearchHandler.java
    lucene/dev/branches/lucene5969/solr/core/src/java/org/apache/solr/handler/loader/JsonLoader.java
    lucene/dev/branches/lucene5969/solr/core/src/java/org/apache/solr/schema/BoolField.java
    lucene/dev/branches/lucene5969/solr/core/src/java/org/apache/solr/schema/EnumField.java
    lucene/dev/branches/lucene5969/solr/core/src/java/org/apache/solr/schema/FieldType.java
    lucene/dev/branches/lucene5969/solr/core/src/java/org/apache/solr/schema/PreAnalyzedField.java
    lucene/dev/branches/lucene5969/solr/core/src/java/org/apache/solr/schema/TrieField.java
    lucene/dev/branches/lucene5969/solr/core/src/java/org/apache/solr/search/Insanity.java
    lucene/dev/branches/lucene5969/solr/core/src/java/org/apache/solr/search/SolrIndexSearcher.java
    lucene/dev/branches/lucene5969/solr/core/src/java/org/apache/solr/search/grouping/distributed/responseprocessor/TopGroupsShardResponseProcessor.java
    lucene/dev/branches/lucene5969/solr/core/src/java/org/apache/solr/update/UpdateLog.java
    lucene/dev/branches/lucene5969/solr/core/src/java/org/apache/solr/update/processor/DistributedUpdateProcessor.java
    lucene/dev/branches/lucene5969/solr/core/src/java/org/apache/solr/util/CommandOperation.java
    lucene/dev/branches/lucene5969/solr/core/src/test/org/apache/solr/cloud/OverseerRolesTest.java
    lucene/dev/branches/lucene5969/solr/core/src/test/org/apache/solr/cloud/RollingRestartTest.java
    lucene/dev/branches/lucene5969/solr/core/src/test/org/apache/solr/cloud/TestReplicaProperties.java
    lucene/dev/branches/lucene5969/solr/core/src/test/org/apache/solr/handler/JsonLoaderTest.java
    lucene/dev/branches/lucene5969/solr/core/src/test/org/apache/solr/handler/TestReplicationHandlerBackup.java
    lucene/dev/branches/lucene5969/solr/core/src/test/org/apache/solr/handler/component/QueryElevationComponentTest.java
    lucene/dev/branches/lucene5969/solr/core/src/test/org/apache/solr/handler/component/StatsComponentTest.java
    lucene/dev/branches/lucene5969/solr/core/src/test/org/apache/solr/search/TestStressLucene.java
    lucene/dev/branches/lucene5969/solr/core/src/test/org/apache/solr/search/function/TestFunctionQuery.java
    lucene/dev/branches/lucene5969/solr/core/src/test/org/apache/solr/update/TestExceedMaxTermLength.java
    lucene/dev/branches/lucene5969/solr/core/src/test/org/apache/solr/update/processor/AtomicUpdatesTest.java
    lucene/dev/branches/lucene5969/solr/example/   (props changed)
    lucene/dev/branches/lucene5969/solr/example/example-DIH/ivy.xml
    lucene/dev/branches/lucene5969/solr/example/ivy.xml
    lucene/dev/branches/lucene5969/solr/example/solr/collection1/conf/schema.xml
    lucene/dev/branches/lucene5969/solr/example/solr/collection1/conf/solrconfig.xml
    lucene/dev/branches/lucene5969/solr/solrj/   (props changed)
    lucene/dev/branches/lucene5969/solr/solrj/ivy.xml
    lucene/dev/branches/lucene5969/solr/solrj/src/java/org/apache/solr/common/cloud/ClusterState.java
    lucene/dev/branches/lucene5969/solr/solrj/src/java/org/apache/solr/common/cloud/ZkStateReader.java
    lucene/dev/branches/lucene5969/solr/solrj/src/java/org/apache/solr/common/params/CollectionParams.java
    lucene/dev/branches/lucene5969/solr/solrj/src/test/org/apache/solr/client/solrj/embedded/SolrExampleJettyTest.java
    lucene/dev/branches/lucene5969/solr/test-framework/   (props changed)
    lucene/dev/branches/lucene5969/solr/test-framework/ivy.xml

Modified: lucene/dev/branches/lucene5969/lucene/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5969/lucene/CHANGES.txt?rev=1633538&r1=1633537&r2=1633538&view=diff
==============================================================================
--- lucene/dev/branches/lucene5969/lucene/CHANGES.txt (original)
+++ lucene/dev/branches/lucene5969/lucene/CHANGES.txt Wed Oct 22 05:44:17 2014
@@ -71,7 +71,7 @@ New Features
   Robert Muir)
 
 * LUCENE-5911: Add MemoryIndex.freeze() to allow thread-safe searching over a 
-  MemoryIndex. (Alan Woodward)
+  MemoryIndex. (Alan Woodward, David Smiley, Robert Muir)
 
 * LUCENE-5969: Lucene 5.0 has a new index format with mismatched file detection,
   improved exception handling, and indirect norms encoding for sparse fields.
@@ -164,6 +164,10 @@ API Changes
   will be DocValuesType.NUMERIC if the field indexed and does not omit
   norms, else null.  (Robert Muir, Mike McCandless)
 
+* LUCENE-6013: Removed indexed boolean from IndexableFieldType and
+  FieldInfo, since it's redundant with IndexOptions != null. (Robert
+  Muir, Mike McCandless)
+
 Bug Fixes
 
 * LUCENE-5650: Enforce read-only access to any path outside the temporary
@@ -184,6 +188,10 @@ Bug Fixes
 
 * LUCENE-5980: Don't let document length overflow. (Robert Muir)
 
+* LUCENE-5961: Fix the exists() method for FunctionValues returned by many ValueSoures to
+  behave properly when wrapping other ValueSources which do not exist for the specified document
+  (hossman)
+
 Documentation
 
 * LUCENE-5392: Add/improve analysis package documentation to reflect

Modified: lucene/dev/branches/lucene5969/lucene/MIGRATE.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5969/lucene/MIGRATE.txt?rev=1633538&r1=1633537&r2=1633538&view=diff
==============================================================================
--- lucene/dev/branches/lucene5969/lucene/MIGRATE.txt (original)
+++ lucene/dev/branches/lucene5969/lucene/MIGRATE.txt Wed Oct 22 05:44:17 2014
@@ -6,3 +6,11 @@ The API of oal.document was restructured
 documents and indexed documents. IndexReader.document(int) now returns 
 StoredDocument instead of Document. In most cases a simple replacement
 of the return type is enough to upgrade.
+
+## FunctionValues.exist() Behavior Changes due to ValueSource bug fixes (LUCENE-5961)
+
+Bugs fixed in several ValueSource functions may result in different behavior in 
+situations where some documents do not have values for fields wrapped in other 
+ValueSources.  Users who want to preserve the previous behavior may need to wrap 
+their ValueSources in a "DefFunction" along with a ConstValueSource of "0.0".
+

Modified: lucene/dev/branches/lucene5969/lucene/analysis/common/ivy.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5969/lucene/analysis/common/ivy.xml?rev=1633538&r1=1633537&r2=1633538&view=diff
==============================================================================
--- lucene/dev/branches/lucene5969/lucene/analysis/common/ivy.xml (original)
+++ lucene/dev/branches/lucene5969/lucene/analysis/common/ivy.xml Wed Oct 22 05:44:17 2014
@@ -17,5 +17,5 @@
    under the License.    
 -->
 <ivy-module version="2.0">
-    <info organisation="org.apache.lucene" module="analyzers-common"/>
+  <info organisation="org.apache.lucene" module="analyzers-common"/>
 </ivy-module>

Modified: lucene/dev/branches/lucene5969/lucene/analysis/icu/ivy.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5969/lucene/analysis/icu/ivy.xml?rev=1633538&r1=1633537&r2=1633538&view=diff
==============================================================================
--- lucene/dev/branches/lucene5969/lucene/analysis/icu/ivy.xml (original)
+++ lucene/dev/branches/lucene5969/lucene/analysis/icu/ivy.xml Wed Oct 22 05:44:17 2014
@@ -17,9 +17,12 @@
    under the License.    
 -->
 <ivy-module version="2.0">
-    <info organisation="org.apache.lucene" module="analyzers-icu"/>
-    <dependencies>
-      <dependency org="com.ibm.icu" name="icu4j" rev="${/com.ibm.icu/icu4j}" transitive="false"/>
-      <exclude org="*" ext="*" matcher="regexp" type="${ivy.exclude.types}"/> 
-    </dependencies>
+  <info organisation="org.apache.lucene" module="analyzers-icu"/>
+  <configurations defaultconfmapping="compile->master">
+    <conf name="compile" transitive="false"/>
+  </configurations>
+  <dependencies>
+    <dependency org="com.ibm.icu" name="icu4j" rev="${/com.ibm.icu/icu4j}" conf="compile"/>
+    <exclude org="*" ext="*" matcher="regexp" type="${ivy.exclude.types}"/> 
+  </dependencies>
 </ivy-module>

Modified: lucene/dev/branches/lucene5969/lucene/analysis/kuromoji/ivy.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5969/lucene/analysis/kuromoji/ivy.xml?rev=1633538&r1=1633537&r2=1633538&view=diff
==============================================================================
--- lucene/dev/branches/lucene5969/lucene/analysis/kuromoji/ivy.xml (original)
+++ lucene/dev/branches/lucene5969/lucene/analysis/kuromoji/ivy.xml Wed Oct 22 05:44:17 2014
@@ -18,18 +18,20 @@
 -->
 <ivy-module version="2.0">
   <info organisation="org.apache.lucene" module="analyzers-kuromoji"/>
-    <configurations>
-      <conf name="default" description="compile dependencies"/>
-      <conf name="ipadic" description="ipadic dictionary"/>
-      <conf name="naist" description="naist-jdic dictionary"/>
-    </configurations>
+  
+  <configurations defaultconfmapping="ipadic->default;naist->default"> <!-- 'master' conf not available to map to -->
+    <conf name="default" description="explicitly declare this configuration in order to not download dictionaries unless explicitly called for"/>
+    <conf name="ipadic" description="ipadic dictionary" transitive="false"/>
+    <conf name="naist" description="naist-jdic dictionary" transitive="false"/>
+  </configurations>
 
   <dependencies>
-    <dependency org="mecab" name="mecab-ipadic" rev="${/mecab/mecab-ipadic}" conf="ipadic->default"> 
-       <artifact name="ipadic" type=".tar.gz" url="http://mecab.googlecode.com/files/mecab-ipadic-2.7.0-20070801.tar.gz"/>
-     </dependency>
-     <dependency org="mecab" name="mecab-naist-jdic" rev="${/mecab/mecab-naist-jdic}" conf="naist->default">
-       <artifact name="mecab-naist-jdic" type=".tar.gz" url="http://sourceforge.jp/frs/redir.php?m=iij&amp;f=/naist-jdic/53500/mecab-naist-jdic-0.6.3b-20111013.tar.gz"/>
-     </dependency>
-    </dependencies>
+    <dependency org="mecab" name="mecab-ipadic" rev="${/mecab/mecab-ipadic}" conf="ipadic"> 
+      <artifact name="ipadic" type=".tar.gz" url="http://mecab.googlecode.com/files/mecab-ipadic-2.7.0-20070801.tar.gz"/>
+    </dependency>
+    <dependency org="mecab" name="mecab-naist-jdic" rev="${/mecab/mecab-naist-jdic}" conf="naist">
+      <artifact name="mecab-naist-jdic" type=".tar.gz" url="http://sourceforge.jp/frs/redir.php?m=iij&amp;f=/naist-jdic/53500/mecab-naist-jdic-0.6.3b-20111013.tar.gz"/>
+    </dependency>
+    <exclude org="*" ext="*" matcher="regexp" type="${ivy.exclude.types}"/>
+  </dependencies>
 </ivy-module>

Modified: lucene/dev/branches/lucene5969/lucene/analysis/morfologik/ivy.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5969/lucene/analysis/morfologik/ivy.xml?rev=1633538&r1=1633537&r2=1633538&view=diff
==============================================================================
--- lucene/dev/branches/lucene5969/lucene/analysis/morfologik/ivy.xml (original)
+++ lucene/dev/branches/lucene5969/lucene/analysis/morfologik/ivy.xml Wed Oct 22 05:44:17 2014
@@ -17,11 +17,14 @@
    under the License.    
 -->
 <ivy-module version="2.0">
-    <info organisation="org.apache.lucene" module="analyzers-morfologik"/>
-    <dependencies>
-      <dependency org="org.carrot2" name="morfologik-polish" rev="${/org.carrot2/morfologik-polish}" transitive="false"/>
-      <dependency org="org.carrot2" name="morfologik-fsa" rev="${/org.carrot2/morfologik-fsa}" transitive="false"/>
-      <dependency org="org.carrot2" name="morfologik-stemming" rev="${/org.carrot2/morfologik-stemming}" transitive="false"/>
-      <exclude org="*" ext="*" matcher="regexp" type="${ivy.exclude.types}"/> 
-    </dependencies>
+  <info organisation="org.apache.lucene" module="analyzers-morfologik"/>
+  <configurations defaultconfmapping="compile->master">
+    <conf name="compile" transitive="false"/>
+  </configurations>
+  <dependencies>
+    <dependency org="org.carrot2" name="morfologik-polish" rev="${/org.carrot2/morfologik-polish}" conf="compile"/>
+    <dependency org="org.carrot2" name="morfologik-fsa" rev="${/org.carrot2/morfologik-fsa}" conf="compile"/>
+    <dependency org="org.carrot2" name="morfologik-stemming" rev="${/org.carrot2/morfologik-stemming}" conf="compile"/>
+    <exclude org="*" ext="*" matcher="regexp" type="${ivy.exclude.types}"/> 
+  </dependencies>
 </ivy-module>

Modified: lucene/dev/branches/lucene5969/lucene/analysis/phonetic/ivy.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5969/lucene/analysis/phonetic/ivy.xml?rev=1633538&r1=1633537&r2=1633538&view=diff
==============================================================================
--- lucene/dev/branches/lucene5969/lucene/analysis/phonetic/ivy.xml (original)
+++ lucene/dev/branches/lucene5969/lucene/analysis/phonetic/ivy.xml Wed Oct 22 05:44:17 2014
@@ -17,9 +17,12 @@
    under the License.    
 -->
 <ivy-module version="2.0">
-    <info organisation="org.apache.lucene" module="analyzers-phonetic"/>
-    <dependencies>
-      <dependency org="commons-codec" name="commons-codec" rev="${/commons-codec/commons-codec}" transitive="false"/>
-      <exclude org="*" ext="*" matcher="regexp" type="${ivy.exclude.types}"/> 
-    </dependencies>
+  <info organisation="org.apache.lucene" module="analyzers-phonetic"/>
+  <configurations defaultconfmapping="compile->master">
+    <conf name="compile" transitive="false"/>
+  </configurations>
+  <dependencies>
+    <dependency org="commons-codec" name="commons-codec" rev="${/commons-codec/commons-codec}" conf="compile"/>
+    <exclude org="*" ext="*" matcher="regexp" type="${ivy.exclude.types}"/> 
+  </dependencies>
 </ivy-module>

Modified: lucene/dev/branches/lucene5969/lucene/analysis/smartcn/ivy.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5969/lucene/analysis/smartcn/ivy.xml?rev=1633538&r1=1633537&r2=1633538&view=diff
==============================================================================
--- lucene/dev/branches/lucene5969/lucene/analysis/smartcn/ivy.xml (original)
+++ lucene/dev/branches/lucene5969/lucene/analysis/smartcn/ivy.xml Wed Oct 22 05:44:17 2014
@@ -17,5 +17,5 @@
    under the License.    
 -->
 <ivy-module version="2.0">
-    <info organisation="org.apache.lucene" module="analyzers-smartcn"/>
+  <info organisation="org.apache.lucene" module="analyzers-smartcn"/>
 </ivy-module>

Modified: lucene/dev/branches/lucene5969/lucene/analysis/stempel/ivy.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5969/lucene/analysis/stempel/ivy.xml?rev=1633538&r1=1633537&r2=1633538&view=diff
==============================================================================
--- lucene/dev/branches/lucene5969/lucene/analysis/stempel/ivy.xml (original)
+++ lucene/dev/branches/lucene5969/lucene/analysis/stempel/ivy.xml Wed Oct 22 05:44:17 2014
@@ -17,5 +17,5 @@
    under the License.    
 -->
 <ivy-module version="2.0">
-    <info organisation="org.apache.lucene" module="analyzers-stempel"/>
+  <info organisation="org.apache.lucene" module="analyzers-stempel"/>
 </ivy-module>

Modified: lucene/dev/branches/lucene5969/lucene/analysis/uima/ivy.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5969/lucene/analysis/uima/ivy.xml?rev=1633538&r1=1633537&r2=1633538&view=diff
==============================================================================
--- lucene/dev/branches/lucene5969/lucene/analysis/uima/ivy.xml (original)
+++ lucene/dev/branches/lucene5969/lucene/analysis/uima/ivy.xml Wed Oct 22 05:44:17 2014
@@ -17,11 +17,14 @@
    under the License.    
 -->
 <ivy-module version="2.0">
-    <info organisation="org.apache.lucene" module="analyzers-uima"/>
-    <dependencies>
-      <dependency org="org.apache.uima" name="Tagger" rev="${/org.apache.uima/Tagger}" transitive="false"/>
-      <dependency org="org.apache.uima" name="WhitespaceTokenizer" rev="${/org.apache.uima/WhitespaceTokenizer}" transitive="false"/>
-      <dependency org="org.apache.uima" name="uimaj-core" rev="${/org.apache.uima/uimaj-core}" transitive="false"/>
-      <exclude org="*" ext="*" matcher="regexp" type="${ivy.exclude.types}"/> 
-    </dependencies>
+  <info organisation="org.apache.lucene" module="analyzers-uima"/>
+  <configurations defaultconfmapping="compile->master">
+    <conf name="compile" transitive="false"/>
+  </configurations>
+  <dependencies>
+    <dependency org="org.apache.uima" name="Tagger" rev="${/org.apache.uima/Tagger}" conf="compile"/>
+    <dependency org="org.apache.uima" name="WhitespaceTokenizer" rev="${/org.apache.uima/WhitespaceTokenizer}" conf="compile"/>
+    <dependency org="org.apache.uima" name="uimaj-core" rev="${/org.apache.uima/uimaj-core}" conf="compile"/>
+    <exclude org="*" ext="*" matcher="regexp" type="${ivy.exclude.types}"/> 
+  </dependencies>
 </ivy-module>

Modified: lucene/dev/branches/lucene5969/lucene/backward-codecs/ivy.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5969/lucene/backward-codecs/ivy.xml?rev=1633538&r1=1633537&r2=1633538&view=diff
==============================================================================
--- lucene/dev/branches/lucene5969/lucene/backward-codecs/ivy.xml (original)
+++ lucene/dev/branches/lucene5969/lucene/backward-codecs/ivy.xml Wed Oct 22 05:44:17 2014
@@ -17,5 +17,5 @@
    under the License.    
 -->
 <ivy-module version="2.0">
-    <info organisation="org.apache.lucene" module="backward-codecs"/>
+  <info organisation="org.apache.lucene" module="backward-codecs"/>
 </ivy-module>

Modified: lucene/dev/branches/lucene5969/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40FieldInfosFormat.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5969/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40FieldInfosFormat.java?rev=1633538&r1=1633537&r2=1633538&view=diff
==============================================================================
--- lucene/dev/branches/lucene5969/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40FieldInfosFormat.java (original)
+++ lucene/dev/branches/lucene5969/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene40/Lucene40FieldInfosFormat.java Wed Oct 22 05:44:17 2014
@@ -106,7 +106,7 @@ public class Lucene40FieldInfosFormat ex
           // Undead norms!  Lucene40NormsReader will check this and bring norms back from the dead:
           UndeadNormsProducer.setUndead(attributes);
         }
-        infos[i] = new FieldInfo(name, isIndexed, fieldNumber, storeTermVector, 
+        infos[i] = new FieldInfo(name, fieldNumber, storeTermVector, 
           omitNorms, storePayloads, indexOptions, oldValuesType.mapping, -1, Collections.unmodifiableMap(attributes));
       }
 

Modified: lucene/dev/branches/lucene5969/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene42/Lucene42FieldInfosFormat.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5969/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene42/Lucene42FieldInfosFormat.java?rev=1633538&r1=1633537&r2=1633538&view=diff
==============================================================================
--- lucene/dev/branches/lucene5969/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene42/Lucene42FieldInfosFormat.java (original)
+++ lucene/dev/branches/lucene5969/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene42/Lucene42FieldInfosFormat.java Wed Oct 22 05:44:17 2014
@@ -93,7 +93,7 @@ public class Lucene42FieldInfosFormat ex
           UndeadNormsProducer.setUndead(attributes);
         }
 
-        infos[i] = new FieldInfo(name, isIndexed, fieldNumber, storeTermVector, 
+        infos[i] = new FieldInfo(name, fieldNumber, storeTermVector, 
           omitNorms, storePayloads, indexOptions, docValuesType, -1, Collections.unmodifiableMap(attributes));
       }
 

Modified: lucene/dev/branches/lucene5969/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene46/Lucene46FieldInfosFormat.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5969/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene46/Lucene46FieldInfosFormat.java?rev=1633538&r1=1633537&r2=1633538&view=diff
==============================================================================
--- lucene/dev/branches/lucene5969/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene46/Lucene46FieldInfosFormat.java (original)
+++ lucene/dev/branches/lucene5969/lucene/backward-codecs/src/java/org/apache/lucene/codecs/lucene46/Lucene46FieldInfosFormat.java Wed Oct 22 05:44:17 2014
@@ -95,7 +95,7 @@ public final class Lucene46FieldInfosFor
           UndeadNormsProducer.setUndead(attributes);
         }
 
-        infos[i] = new FieldInfo(name, isIndexed, fieldNumber, storeTermVector, 
+        infos[i] = new FieldInfo(name, fieldNumber, storeTermVector, 
           omitNorms, storePayloads, indexOptions, docValuesType, dvGen, Collections.unmodifiableMap(attributes));
       }
       

Modified: lucene/dev/branches/lucene5969/lucene/benchmark/ivy.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5969/lucene/benchmark/ivy.xml?rev=1633538&r1=1633537&r2=1633538&view=diff
==============================================================================
--- lucene/dev/branches/lucene5969/lucene/benchmark/ivy.xml (original)
+++ lucene/dev/branches/lucene5969/lucene/benchmark/ivy.xml Wed Oct 22 05:44:17 2014
@@ -17,13 +17,16 @@
    under the License.    
 -->
 <ivy-module version="2.0">
-    <info organisation="org.apache.lucene" module="benchmark"/>
-    <dependencies>
-      <dependency org="org.apache.commons" name="commons-compress" rev="${/org.apache.commons/commons-compress}" transitive="false"/>
-      <dependency org="xerces" name="xercesImpl" rev="${/xerces/xercesImpl}" transitive="false"/>
-      <dependency org="net.sourceforge.nekohtml" name="nekohtml" rev="${/net.sourceforge.nekohtml/nekohtml}" transitive="false"/>
-      <dependency org="com.ibm.icu" name="icu4j" rev="${/com.ibm.icu/icu4j}" transitive="false"/>
-      <dependency org="com.spatial4j" name="spatial4j" rev="${/com.spatial4j/spatial4j}" transitive="false"/>
-      <exclude org="*" ext="*" matcher="regexp" type="${ivy.exclude.types}"/> 
-    </dependencies>
+  <info organisation="org.apache.lucene" module="benchmark"/>
+  <configurations defaultconfmapping="compile->master">
+    <conf name="compile" transitive="false"/>
+  </configurations>
+  <dependencies>
+    <dependency org="org.apache.commons" name="commons-compress" rev="${/org.apache.commons/commons-compress}" conf="compile"/>
+    <dependency org="xerces" name="xercesImpl" rev="${/xerces/xercesImpl}" conf="compile"/>
+    <dependency org="net.sourceforge.nekohtml" name="nekohtml" rev="${/net.sourceforge.nekohtml/nekohtml}" conf="compile"/>
+    <dependency org="com.ibm.icu" name="icu4j" rev="${/com.ibm.icu/icu4j}" conf="compile"/>
+    <dependency org="com.spatial4j" name="spatial4j" rev="${/com.spatial4j/spatial4j}" conf="compile"/>
+    <exclude org="*" ext="*" matcher="regexp" type="${ivy.exclude.types}"/> 
+  </dependencies>
 </ivy-module>

Modified: lucene/dev/branches/lucene5969/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DocMaker.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5969/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DocMaker.java?rev=1633538&r1=1633537&r2=1633538&view=diff
==============================================================================
--- lucene/dev/branches/lucene5969/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DocMaker.java (original)
+++ lucene/dev/branches/lucene5969/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/feeds/DocMaker.java Wed Oct 22 05:44:17 2014
@@ -231,7 +231,6 @@ public class DocMaker implements Closeab
     
     // Set ID_FIELD
     FieldType ft = new FieldType(valType);
-    ft.setIndexed(true);
     ft.setStored(true);
 
     Field idField = ds.getField(ID_FIELD, ft);

Modified: lucene/dev/branches/lucene5969/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReadTokensTask.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5969/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReadTokensTask.java?rev=1633538&r1=1633537&r2=1633538&view=diff
==============================================================================
--- lucene/dev/branches/lucene5969/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReadTokensTask.java (original)
+++ lucene/dev/branches/lucene5969/lucene/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ReadTokensTask.java Wed Oct 22 05:44:17 2014
@@ -72,7 +72,7 @@ public class ReadTokensTask extends Perf
     List<Field> fields = doc.getFields();
     Analyzer analyzer = getRunData().getAnalyzer();
     int tokenCount = 0;
-    for(final IndexableField field : fields) {
+    for(final Field field : fields) {
       if (!field.fieldType().tokenized() ||
           field instanceof IntField ||
           field instanceof LongField ||

Modified: lucene/dev/branches/lucene5969/lucene/classification/ivy.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5969/lucene/classification/ivy.xml?rev=1633538&r1=1633537&r2=1633538&view=diff
==============================================================================
--- lucene/dev/branches/lucene5969/lucene/classification/ivy.xml (original)
+++ lucene/dev/branches/lucene5969/lucene/classification/ivy.xml Wed Oct 22 05:44:17 2014
@@ -17,5 +17,5 @@
    under the License.    
 -->
 <ivy-module version="2.0">
-    <info organisation="org.apache.lucene" module="classification"/>
+  <info organisation="org.apache.lucene" module="classification"/>
 </ivy-module>

Modified: lucene/dev/branches/lucene5969/lucene/codecs/ivy.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5969/lucene/codecs/ivy.xml?rev=1633538&r1=1633537&r2=1633538&view=diff
==============================================================================
--- lucene/dev/branches/lucene5969/lucene/codecs/ivy.xml (original)
+++ lucene/dev/branches/lucene5969/lucene/codecs/ivy.xml Wed Oct 22 05:44:17 2014
@@ -17,5 +17,5 @@
    under the License.    
 -->
 <ivy-module version="2.0">
-    <info organisation="org.apache.lucene" module="codecs"/>
+  <info organisation="org.apache.lucene" module="codecs"/>
 </ivy-module>

Modified: lucene/dev/branches/lucene5969/lucene/codecs/src/java/org/apache/lucene/codecs/blockterms/BlockTermsReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5969/lucene/codecs/src/java/org/apache/lucene/codecs/blockterms/BlockTermsReader.java?rev=1633538&r1=1633537&r2=1633538&view=diff
==============================================================================
--- lucene/dev/branches/lucene5969/lucene/codecs/src/java/org/apache/lucene/codecs/blockterms/BlockTermsReader.java (original)
+++ lucene/dev/branches/lucene5969/lucene/codecs/src/java/org/apache/lucene/codecs/blockterms/BlockTermsReader.java Wed Oct 22 05:44:17 2014
@@ -46,7 +46,6 @@ import org.apache.lucene.util.ArrayUtil;
 import org.apache.lucene.util.Bits;
 import org.apache.lucene.util.BytesRef;
 import org.apache.lucene.util.BytesRefBuilder;
-import org.apache.lucene.util.DoubleBarrelLRUCache;
 import org.apache.lucene.util.RamUsageEstimator;
 
 /** Handles a terms dict, but decouples all details of
@@ -76,7 +75,7 @@ public class BlockTermsReader extends Fi
   private TermsIndexReaderBase indexReader;
   
   // Used as key for the terms cache
-  private static class FieldAndTerm extends DoubleBarrelLRUCache.CloneableKey {
+  private static class FieldAndTerm implements Cloneable {
     String field;
     BytesRef term;
 

Modified: lucene/dev/branches/lucene5969/lucene/codecs/src/java/org/apache/lucene/codecs/simpletext/SimpleTextFieldInfosFormat.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5969/lucene/codecs/src/java/org/apache/lucene/codecs/simpletext/SimpleTextFieldInfosFormat.java?rev=1633538&r1=1633537&r2=1633538&view=diff
==============================================================================
--- lucene/dev/branches/lucene5969/lucene/codecs/src/java/org/apache/lucene/codecs/simpletext/SimpleTextFieldInfosFormat.java (original)
+++ lucene/dev/branches/lucene5969/lucene/codecs/src/java/org/apache/lucene/codecs/simpletext/SimpleTextFieldInfosFormat.java Wed Oct 22 05:44:17 2014
@@ -53,7 +53,6 @@ public class SimpleTextFieldInfosFormat 
   static final BytesRef NUMFIELDS       =  new BytesRef("number of fields ");
   static final BytesRef NAME            =  new BytesRef("  name ");
   static final BytesRef NUMBER          =  new BytesRef("  number ");
-  static final BytesRef ISINDEXED       =  new BytesRef("  indexed ");
   static final BytesRef STORETV         =  new BytesRef("  term vectors ");
   static final BytesRef STORETVPOS      =  new BytesRef("  term vector positions ");
   static final BytesRef STORETVOFF      =  new BytesRef("  term vector offsets ");
@@ -89,19 +88,16 @@ public class SimpleTextFieldInfosFormat 
         assert StringHelper.startsWith(scratch.get(), NUMBER);
         int fieldNumber = Integer.parseInt(readString(NUMBER.length, scratch));
 
-        SimpleTextUtil.readLine(input, scratch);
-        assert StringHelper.startsWith(scratch.get(), ISINDEXED);
-        boolean isIndexed = Boolean.parseBoolean(readString(ISINDEXED.length, scratch));
-        
         final IndexOptions indexOptions;
-        if (isIndexed) {
-          SimpleTextUtil.readLine(input, scratch);
-          assert StringHelper.startsWith(scratch.get(), INDEXOPTIONS);
-          indexOptions = IndexOptions.valueOf(readString(INDEXOPTIONS.length, scratch));          
-        } else {
+        SimpleTextUtil.readLine(input, scratch);
+        assert StringHelper.startsWith(scratch.get(), INDEXOPTIONS);
+        String s = readString(INDEXOPTIONS.length, scratch);
+        if ("null".equals(s)) {
           indexOptions = null;
+        } else {
+          indexOptions = IndexOptions.valueOf(s);
         }
-        
+
         SimpleTextUtil.readLine(input, scratch);
         assert StringHelper.startsWith(scratch.get(), STORETV);
         boolean storeTermVector = Boolean.parseBoolean(readString(STORETV.length, scratch));
@@ -139,7 +135,7 @@ public class SimpleTextFieldInfosFormat 
           atts.put(key, value);
         }
 
-        infos[i] = new FieldInfo(name, isIndexed, fieldNumber, storeTermVector, 
+        infos[i] = new FieldInfo(name, fieldNumber, storeTermVector, 
           omitNorms, storePayloads, indexOptions, docValuesType, dvGen, Collections.unmodifiableMap(atts));
       }
 
@@ -189,16 +185,15 @@ public class SimpleTextFieldInfosFormat 
         SimpleTextUtil.write(out, Integer.toString(fi.number), scratch);
         SimpleTextUtil.writeNewline(out);
         
-        SimpleTextUtil.write(out, ISINDEXED);
-        SimpleTextUtil.write(out, Boolean.toString(fi.isIndexed()), scratch);
-        SimpleTextUtil.writeNewline(out);
-        
-        if (fi.isIndexed()) {
+        SimpleTextUtil.write(out, INDEXOPTIONS);
+        IndexOptions indexOptions = fi.getIndexOptions();
+        if (indexOptions != null) {
           assert fi.getIndexOptions().compareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) >= 0 || !fi.hasPayloads();
-          SimpleTextUtil.write(out, INDEXOPTIONS);
           SimpleTextUtil.write(out, fi.getIndexOptions().toString(), scratch);
-          SimpleTextUtil.writeNewline(out);
+        } else {
+          SimpleTextUtil.write(out, "null", scratch);
         }
+        SimpleTextUtil.writeNewline(out);
         
         SimpleTextUtil.write(out, STORETV);
         SimpleTextUtil.write(out, Boolean.toString(fi.hasVectors()), scratch);

Modified: lucene/dev/branches/lucene5969/lucene/core/ivy.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5969/lucene/core/ivy.xml?rev=1633538&r1=1633537&r2=1633538&view=diff
==============================================================================
--- lucene/dev/branches/lucene5969/lucene/core/ivy.xml (original)
+++ lucene/dev/branches/lucene5969/lucene/core/ivy.xml Wed Oct 22 05:44:17 2014
@@ -17,5 +17,5 @@
    under the License.    
 -->
 <ivy-module version="2.0">
-    <info organisation="org.apache.lucene" module="core"/>
+  <info organisation="org.apache.lucene" module="core"/>
 </ivy-module>

Modified: lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/analysis/NumericTokenStream.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/analysis/NumericTokenStream.java?rev=1633538&r1=1633537&r2=1633538&view=diff
==============================================================================
--- lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/analysis/NumericTokenStream.java (original)
+++ lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/analysis/NumericTokenStream.java Wed Oct 22 05:44:17 2014
@@ -316,6 +316,12 @@ public final class NumericTokenStream ex
   public int getPrecisionStep() {
     return precisionStep;
   }
+
+  @Override
+  public String toString() {
+    // We override default because it can throw cryptic "illegal shift value":
+    return getClass().getSimpleName() + "(precisionStep=" + precisionStep + " valueSize=" + numericAtt.getValueSize() + " shift=" + numericAtt.getShift() + ")";
+  }
   
   // members
   private final NumericTermAttribute numericAtt = addAttribute(NumericTermAttribute.class);

Modified: lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/codecs/lucene50/Lucene50FieldInfosFormat.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/codecs/lucene50/Lucene50FieldInfosFormat.java?rev=1633538&r1=1633537&r2=1633538&view=diff
==============================================================================
--- lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/codecs/lucene50/Lucene50FieldInfosFormat.java (original)
+++ lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/codecs/lucene50/Lucene50FieldInfosFormat.java Wed Oct 22 05:44:17 2014
@@ -49,7 +49,7 @@ import org.apache.lucene.store.IndexOutp
  *   <li>Header --&gt; {@link CodecUtil#checkIndexHeader IndexHeader}</li>
  *   <li>FieldsCount --&gt; {@link DataOutput#writeVInt VInt}</li>
  *   <li>FieldName --&gt; {@link DataOutput#writeString String}</li>
- *   <li>FieldBits, DocValuesBits --&gt; {@link DataOutput#writeByte Byte}</li>
+ *   <li>FieldBits, IndexOptions, DocValuesBits --&gt; {@link DataOutput#writeByte Byte}</li>
  *   <li>FieldNumber --&gt; {@link DataOutput#writeInt VInt}</li>
  *   <li>Attributes --&gt; {@link DataOutput#writeStringStringMap Map&lt;String,String&gt;}</li>
  *   <li>DocValuesGen --&gt; {@link DataOutput#writeLong(long) Int64}</li>
@@ -64,39 +64,39 @@ import org.apache.lucene.store.IndexOutp
  *       Lucene, the fields are not numbered implicitly by their order in the
  *       file, instead explicitly.</li>
  *   <li>FieldBits: a byte containing field options.
- *       <ul>
- *         <li>The low-order bit is one for indexed fields, and zero for non-indexed
- *             fields.</li>
- *         <li>The second lowest-order bit is one for fields that have term vectors
- *             stored, and zero for fields without term vectors.</li>
- *         <li>If the third lowest order-bit is set (0x4), offsets are stored into
- *             the postings list in addition to positions.</li>
- *         <li>Fourth bit is unused.</li>
- *         <li>If the fifth lowest-order bit is set (0x10), norms are omitted for the
- *             indexed field.</li>
- *         <li>If the sixth lowest-order bit is set (0x20), payloads are stored for the
- *             indexed field.</li>
- *         <li>If the seventh lowest-order bit is set (0x40), term frequencies and
- *             positions omitted for the indexed field.</li>
- *         <li>If the eighth lowest-order bit is set (0x80), positions are omitted for the
- *             indexed field.</li>
- *       </ul>
- *    </li>
- *    <li>DocValuesBits: a byte containing per-document value types. The type
- *        recorded as two four-bit integers, with the high-order bits representing
- *        <code>norms</code> options, and the low-order bits representing 
- *        {@code DocValues} options. Each four-bit integer can be decoded as such:
- *        <ul>
- *          <li>0: no DocValues for this field.</li>
- *          <li>1: NumericDocValues. ({@link DocValuesType#NUMERIC})</li>
- *          <li>2: BinaryDocValues. ({@code DocValuesType#BINARY})</li>
- *          <li>3: SortedDocValues. ({@code DocValuesType#SORTED})</li>
- *        </ul>
- *    </li>
- *    <li>DocValuesGen is the generation count of the field's DocValues. If this is -1,
- *        there are no DocValues updates to that field. Anything above zero means there 
- *        are updates stored by {@link DocValuesFormat}.</li>
- *    <li>Attributes: a key-value map of codec-private attributes.</li>
+ *     <ul>
+ *       <li>The low order bit (0x1) is one for fields that have term vectors
+ *           stored, and zero for fields without term vectors.</li>
+ *       <li>If the second lowest order-bit is set (0x2), norms are omitted for the
+ *           indexed field.</li>
+ *       <li>If the third lowest-order bit is set (0x4), payloads are stored for the
+ *           indexed field.</li>
+ *     </ul>
+ *   </li>
+ *   <li>IndexOptions: a byte containing index options.
+ *     <ul>
+ *       <li>0: not indexed</li>
+ *       <li>1: indexed as DOCS_ONLY</li>
+ *       <li>2: indexed as DOCS_AND_FREQS</li>
+ *       <li>3: indexed as DOCS_AND_FREQS_AND_POSITIONS</li>
+ *       <li>4: indexed as DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS</li>
+ *     </ul>
+ *   </li>
+ *   <li>DocValuesBits: a byte containing per-document value types. The type
+ *       recorded as two four-bit integers, with the high-order bits representing
+ *       <code>norms</code> options, and the low-order bits representing 
+ *       {@code DocValues} options. Each four-bit integer can be decoded as such:
+ *     <ul>
+ *       <li>0: no DocValues for this field.</li>
+ *       <li>1: NumericDocValues. ({@link DocValuesType#NUMERIC})</li>
+ *       <li>2: BinaryDocValues. ({@code DocValuesType#BINARY})</li>
+ *       <li>3: SortedDocValues. ({@code DocValuesType#SORTED})</li>
+ *      </ul>
+ *   </li>
+ *   <li>DocValuesGen is the generation count of the field's DocValues. If this is -1,
+ *       there are no DocValues updates to that field. Anything above zero means there 
+ *       are updates stored by {@link DocValuesFormat}.</li>
+ *   <li>Attributes: a key-value map of codec-private attributes.</li>
  * </ul>
  *
  * @lucene.experimental
@@ -109,7 +109,7 @@ public final class Lucene50FieldInfosFor
   
   @Override
   public FieldInfos read(Directory directory, SegmentInfo segmentInfo, String segmentSuffix, IOContext context) throws IOException {
-    final String fileName = IndexFileNames.segmentFileName(segmentInfo.name, segmentSuffix, Lucene50FieldInfosFormat.EXTENSION);
+    final String fileName = IndexFileNames.segmentFileName(segmentInfo.name, segmentSuffix, EXTENSION);
     try (ChecksumIndexInput input = directory.openChecksumInput(fileName, context)) {
       Throwable priorE = null;
       FieldInfo infos[] = null;
@@ -129,30 +129,18 @@ public final class Lucene50FieldInfosFor
             throw new CorruptIndexException("invalid field number for field: " + name + ", fieldNumber=" + fieldNumber, input);
           }
           byte bits = input.readByte();
-          boolean isIndexed = (bits & Lucene50FieldInfosFormat.IS_INDEXED) != 0;
-          boolean storeTermVector = (bits & Lucene50FieldInfosFormat.STORE_TERMVECTOR) != 0;
-          boolean omitNorms = (bits & Lucene50FieldInfosFormat.OMIT_NORMS) != 0;
-          boolean storePayloads = (bits & Lucene50FieldInfosFormat.STORE_PAYLOADS) != 0;
-          final IndexOptions indexOptions;
-          if (!isIndexed) {
-            indexOptions = null;
-          } else if ((bits & Lucene50FieldInfosFormat.OMIT_TERM_FREQ_AND_POSITIONS) != 0) {
-            indexOptions = IndexOptions.DOCS_ONLY;
-          } else if ((bits & Lucene50FieldInfosFormat.OMIT_POSITIONS) != 0) {
-            indexOptions = IndexOptions.DOCS_AND_FREQS;
-          } else if ((bits & Lucene50FieldInfosFormat.STORE_OFFSETS_IN_POSTINGS) != 0) {
-            indexOptions = IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS;
-          } else {
-            indexOptions = IndexOptions.DOCS_AND_FREQS_AND_POSITIONS;
-          }
+          boolean storeTermVector = (bits & STORE_TERMVECTOR) != 0;
+          boolean omitNorms = (bits & OMIT_NORMS) != 0;
+          boolean storePayloads = (bits & STORE_PAYLOADS) != 0;
+
+          final IndexOptions indexOptions = getIndexOptions(input, input.readByte());
           
           // DV Types are packed in one byte
-          byte val = input.readByte();
-          final DocValuesType docValuesType = getDocValuesType(input, (byte) (val & 0x0F));
+          final DocValuesType docValuesType = getDocValuesType(input, input.readByte());
           final long dvGen = input.readLong();
           final Map<String,String> attributes = input.readStringStringMap();
           try {
-            infos[i] = new FieldInfo(name, isIndexed, fieldNumber, storeTermVector, omitNorms, storePayloads, 
+            infos[i] = new FieldInfo(name, fieldNumber, storeTermVector, omitNorms, storePayloads, 
                                      indexOptions, docValuesType, dvGen, Collections.unmodifiableMap(attributes));
             infos[i].checkConsistency();
           } catch (IllegalStateException e) {
@@ -168,56 +156,119 @@ public final class Lucene50FieldInfosFor
     }
   }
   
+  static {
+    // We "mirror" DocValues enum values with the constants below; let's try to ensure if we add a new DocValuesType while this format is
+    // still used for writing, we remember to fix this encoding:
+    assert DocValuesType.values().length == 5;
+  }
+
+  private static byte docValuesByte(DocValuesType type) {
+    if (type == null) {
+      return 0;
+    } else {
+      switch(type) {
+      case NUMERIC:
+        return 1;
+      case BINARY:
+        return 2;
+      case SORTED:
+        return 3;
+      case SORTED_SET:
+        return 4;
+      case SORTED_NUMERIC:
+        return 5;
+      default:
+        // BUG
+        throw new AssertionError("unhandled DocValuesType: " + type);
+      }
+    }
+  }
+
   private static DocValuesType getDocValuesType(IndexInput input, byte b) throws IOException {
-    if (b == 0) {
+    switch(b) {
+    case 0:
       return null;
-    } else if (b == 1) {
+    case 1:
       return DocValuesType.NUMERIC;
-    } else if (b == 2) {
+    case 2:
       return DocValuesType.BINARY;
-    } else if (b == 3) {
+    case 3:
       return DocValuesType.SORTED;
-    } else if (b == 4) {
+    case 4:
       return DocValuesType.SORTED_SET;
-    } else if (b == 5) {
+    case 5:
       return DocValuesType.SORTED_NUMERIC;
-    } else {
+    default:
       throw new CorruptIndexException("invalid docvalues byte: " + b, input);
     }
   }
 
+  static {
+    // We "mirror" IndexOptions enum values with the constants below; let's try to ensure if we add a new IndexOption while this format is
+    // still used for writing, we remember to fix this encoding:
+    assert IndexOptions.values().length == 4;
+  }
+
+  private static byte indexOptionsByte(IndexOptions indexOptions) {
+    if (indexOptions == null) {
+      return 0;
+    } else {
+      switch (indexOptions) {
+      case DOCS_ONLY:
+        return 1;
+      case DOCS_AND_FREQS:
+        return 2;
+      case DOCS_AND_FREQS_AND_POSITIONS:
+        return 3;
+      case DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS:
+        return 4;
+      default:
+        // BUG:
+        throw new AssertionError("unhandled IndexOptions: " + indexOptions);
+      }
+    }
+  }
+  
+  private static IndexOptions getIndexOptions(IndexInput input, byte b) throws IOException {
+    switch (b) {
+    case 0:
+      return null;
+    case 1:
+      return IndexOptions.DOCS_ONLY;
+    case 2:
+      return IndexOptions.DOCS_AND_FREQS;
+    case 3:
+      return IndexOptions.DOCS_AND_FREQS_AND_POSITIONS;
+    case 4:
+      return IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS;
+    default:
+      // BUG
+      throw new CorruptIndexException("invalid IndexOptions byte: " + b, input);
+    }
+  }
+
   @Override
   public void write(Directory directory, SegmentInfo segmentInfo, String segmentSuffix, FieldInfos infos, IOContext context) throws IOException {
-    final String fileName = IndexFileNames.segmentFileName(segmentInfo.name, segmentSuffix, Lucene50FieldInfosFormat.EXTENSION);
+    final String fileName = IndexFileNames.segmentFileName(segmentInfo.name, segmentSuffix, EXTENSION);
     try (IndexOutput output = directory.createOutput(fileName, context)) {
       CodecUtil.writeIndexHeader(output, Lucene50FieldInfosFormat.CODEC_NAME, Lucene50FieldInfosFormat.FORMAT_CURRENT, segmentInfo.getId(), segmentSuffix);
       output.writeVInt(infos.size());
       for (FieldInfo fi : infos) {
         fi.checkConsistency();
-        IndexOptions indexOptions = fi.getIndexOptions();
-        byte bits = 0x0;
-        if (fi.hasVectors()) bits |= Lucene50FieldInfosFormat.STORE_TERMVECTOR;
-        if (fi.omitsNorms()) bits |= Lucene50FieldInfosFormat.OMIT_NORMS;
-        if (fi.hasPayloads()) bits |= Lucene50FieldInfosFormat.STORE_PAYLOADS;
-        if (fi.isIndexed()) {
-          bits |= Lucene50FieldInfosFormat.IS_INDEXED;
-          assert indexOptions.compareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) >= 0 || !fi.hasPayloads();
-          if (indexOptions == IndexOptions.DOCS_ONLY) {
-            bits |= Lucene50FieldInfosFormat.OMIT_TERM_FREQ_AND_POSITIONS;
-          } else if (indexOptions == IndexOptions.DOCS_AND_FREQS_AND_POSITIONS_AND_OFFSETS) {
-            bits |= Lucene50FieldInfosFormat.STORE_OFFSETS_IN_POSTINGS;
-          } else if (indexOptions == IndexOptions.DOCS_AND_FREQS) {
-            bits |= Lucene50FieldInfosFormat.OMIT_POSITIONS;
-          }
-        }
+
         output.writeString(fi.name);
         output.writeVInt(fi.number);
+
+        byte bits = 0x0;
+        if (fi.hasVectors()) bits |= STORE_TERMVECTOR;
+        if (fi.omitsNorms()) bits |= OMIT_NORMS;
+        if (fi.hasPayloads()) bits |= STORE_PAYLOADS;
         output.writeByte(bits);
 
+        output.writeByte(indexOptionsByte(fi.getIndexOptions()));
+
         // pack the DV type and hasNorms in one byte
-        final byte dv = docValuesByte(fi.getDocValuesType());
-        assert (dv & (~0xF)) == 0;
-        output.writeByte(dv);
+        output.writeByte(docValuesByte(fi.getDocValuesType()));
         output.writeLong(fi.getDocValuesGen());
         output.writeStringStringMap(fi.attributes());
       }
@@ -225,24 +276,6 @@ public final class Lucene50FieldInfosFor
     }
   }
   
-  private static byte docValuesByte(DocValuesType type) {
-    if (type == null) {
-      return 0;
-    } else if (type == DocValuesType.NUMERIC) {
-      return 1;
-    } else if (type == DocValuesType.BINARY) {
-      return 2;
-    } else if (type == DocValuesType.SORTED) {
-      return 3;
-    } else if (type == DocValuesType.SORTED_SET) {
-      return 4;
-    } else if (type == DocValuesType.SORTED_NUMERIC) {
-      return 5;
-    } else {
-      throw new AssertionError();
-    }
-  }
-  
   /** Extension of field infos */
   static final String EXTENSION = "fnm";
   
@@ -252,11 +285,7 @@ public final class Lucene50FieldInfosFor
   static final int FORMAT_CURRENT = FORMAT_START;
   
   // Field flags
-  static final byte IS_INDEXED = 0x1;
-  static final byte STORE_TERMVECTOR = 0x2;
-  static final byte STORE_OFFSETS_IN_POSTINGS = 0x4;
-  static final byte OMIT_NORMS = 0x10;
-  static final byte STORE_PAYLOADS = 0x20;
-  static final byte OMIT_TERM_FREQ_AND_POSITIONS = 0x40;
-  static final byte OMIT_POSITIONS = -128;
+  static final byte STORE_TERMVECTOR = 0x1;
+  static final byte OMIT_NORMS = 0x2;
+  static final byte STORE_PAYLOADS = 0x4;
 }

Modified: lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/Document.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/Document.java?rev=1633538&r1=1633537&r2=1633538&view=diff
==============================================================================
--- lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/Document.java (original)
+++ lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/Document.java Wed Oct 22 05:44:17 2014
@@ -319,7 +319,7 @@ public final class Document implements I
     return new FilterIterator<IndexableField, Field>(fields.iterator()) {
       @Override
       protected boolean predicateFunction(Field field) {
-        return field.type.indexed();
+        return field.type.indexOptions() != null;
       }
     };
   }

Modified: lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/DocumentStoredFieldVisitor.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/DocumentStoredFieldVisitor.java?rev=1633538&r1=1633537&r2=1633538&view=diff
==============================================================================
--- lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/DocumentStoredFieldVisitor.java (original)
+++ lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/DocumentStoredFieldVisitor.java Wed Oct 22 05:44:17 2014
@@ -69,7 +69,6 @@ public class DocumentStoredFieldVisitor 
   public void stringField(FieldInfo fieldInfo, String value) throws IOException {
     final FieldType ft = new FieldType(TextField.TYPE_STORED);
     ft.setStoreTermVectors(fieldInfo.hasVectors());
-    ft.setIndexed(fieldInfo.isIndexed());
     ft.setOmitNorms(fieldInfo.omitsNorms());
     ft.setIndexOptions(fieldInfo.getIndexOptions());
     doc.add(new StoredField(fieldInfo.name, value, ft));

Modified: lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/DoubleField.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/DoubleField.java?rev=1633538&r1=1633537&r2=1633538&view=diff
==============================================================================
--- lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/DoubleField.java (original)
+++ lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/DoubleField.java Wed Oct 22 05:44:17 2014
@@ -119,7 +119,6 @@ public final class DoubleField extends F
    */
   public static final FieldType TYPE_NOT_STORED = new FieldType();
   static {
-    TYPE_NOT_STORED.setIndexed(true);
     TYPE_NOT_STORED.setTokenized(true);
     TYPE_NOT_STORED.setOmitNorms(true);
     TYPE_NOT_STORED.setIndexOptions(IndexOptions.DOCS_ONLY);
@@ -133,7 +132,6 @@ public final class DoubleField extends F
    */
   public static final FieldType TYPE_STORED = new FieldType();
   static {
-    TYPE_STORED.setIndexed(true);
     TYPE_STORED.setTokenized(true);
     TYPE_STORED.setOmitNorms(true);
     TYPE_STORED.setIndexOptions(IndexOptions.DOCS_ONLY);

Modified: lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/Field.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/Field.java?rev=1633538&r1=1633537&r2=1633538&view=diff
==============================================================================
--- lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/Field.java (original)
+++ lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/Field.java Wed Oct 22 05:44:17 2014
@@ -122,7 +122,7 @@ public class Field implements IndexableF
     if (type.stored()) {
       throw new IllegalArgumentException("fields with a Reader value cannot be stored");
     }
-    if (type.indexed() && !type.tokenized()) {
+    if (type.indexOptions() != null && !type.tokenized()) {
       throw new IllegalArgumentException("non-tokenized fields must use String values");
     }
     
@@ -148,7 +148,7 @@ public class Field implements IndexableF
     if (tokenStream == null) {
       throw new NullPointerException("tokenStream cannot be null");
     }
-    if (!type.indexed() || !type.tokenized()) {
+    if (type.indexOptions() == null || !type.tokenized()) {
       throw new IllegalArgumentException("TokenStream fields must be indexed and tokenized");
     }
     if (type.stored()) {
@@ -214,7 +214,7 @@ public class Field implements IndexableF
     if (bytes == null) {
       throw new IllegalArgumentException("bytes cannot be null");
     }
-    if (type.indexed()) {
+    if (type.indexOptions() != null) {
       throw new IllegalArgumentException("Fields with BytesRef values cannot be indexed");
     }
     this.fieldsData = bytes;
@@ -241,7 +241,7 @@ public class Field implements IndexableF
     if (value == null) {
       throw new IllegalArgumentException("value cannot be null");
     }
-    if (!type.stored() && !type.indexed()) {
+    if (!type.stored() && type.indexOptions() == null) {
       throw new IllegalArgumentException("it doesn't make sense to have a field that "
         + "is neither indexed nor stored");
     }
@@ -338,7 +338,7 @@ public class Field implements IndexableF
     if (!(fieldsData instanceof BytesRef)) {
       throw new IllegalArgumentException("cannot change value type from " + fieldsData.getClass().getSimpleName() + " to BytesRef");
     }
-    if (type.indexed()) {
+    if (type.indexOptions() != null) {
       throw new IllegalArgumentException("cannot set a BytesRef value on an indexed field");
     }
     if (value == null) {
@@ -419,7 +419,7 @@ public class Field implements IndexableF
    * values from stringValue() or getBinaryValue()
    */
   public void setTokenStream(TokenStream tokenStream) {
-    if (!type.indexed() || !type.tokenized()) {
+    if (type.indexOptions() == null || !type.tokenized()) {
       throw new IllegalArgumentException("TokenStream fields must be indexed and tokenized");
     }
     if (type.numericType() != null) {
@@ -452,7 +452,7 @@ public class Field implements IndexableF
    */
   public void setBoost(float boost) {
     if (boost != 1.0f) {
-      if (type.indexed() == false || type.omitNorms()) {
+      if (type.indexOptions() == null || type.omitNorms()) {
         throw new IllegalArgumentException("You cannot set an index-time boost on an unindexed field, or one that omits norms");
       }
     }
@@ -502,7 +502,8 @@ public class Field implements IndexableF
 
   @Override
   public TokenStream tokenStream(Analyzer analyzer, TokenStream reuse) throws IOException {
-    if (!fieldType().indexed()) {
+    if (fieldType().indexOptions() == null) {
+      // Not indexed
       return null;
     }
 

Modified: lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/FieldType.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/FieldType.java?rev=1633538&r1=1633537&r2=1633538&view=diff
==============================================================================
--- lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/FieldType.java (original)
+++ lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/FieldType.java Wed Oct 22 05:44:17 2014
@@ -43,7 +43,6 @@ public class FieldType implements Indexa
     DOUBLE
   }
 
-  private boolean indexed;
   private boolean stored;
   private boolean tokenized = true;
   private boolean storeTermVectors;
@@ -51,7 +50,7 @@ public class FieldType implements Indexa
   private boolean storeTermVectorPositions;
   private boolean storeTermVectorPayloads;
   private boolean omitNorms;
-  private IndexOptions indexOptions = IndexOptions.DOCS_AND_FREQS_AND_POSITIONS;
+  private IndexOptions indexOptions;
   private NumericType numericType;
   private boolean frozen;
   private int numericPrecisionStep = NumericUtils.PRECISION_STEP_DEFAULT;
@@ -61,7 +60,6 @@ public class FieldType implements Indexa
    * Create a new mutable FieldType with all of the properties from <code>ref</code>
    */
   public FieldType(FieldType ref) {
-    this.indexed = ref.indexed();
     this.stored = ref.stored();
     this.tokenized = ref.tokenized();
     this.storeTermVectors = ref.storeTermVectors();
@@ -100,29 +98,6 @@ public class FieldType implements Indexa
    * {@inheritDoc}
    * <p>
    * The default is <code>false</code>.
-   * @see #setIndexed(boolean)
-   */
-  @Override
-  public boolean indexed() {
-    return this.indexed;
-  }
-  
-  /**
-   * Set to <code>true</code> to index (invert) this field.
-   * @param value true if this field should be indexed.
-   * @throws IllegalStateException if this FieldType is frozen against
-   *         future modifications.
-   * @see #indexed()
-   */
-  public void setIndexed(boolean value) {
-    checkIfFrozen();
-    this.indexed = value;
-  }
-
-  /**
-   * {@inheritDoc}
-   * <p>
-   * The default is <code>false</code>.
    * @see #setStored(boolean)
    */
   @Override
@@ -148,7 +123,6 @@ public class FieldType implements Indexa
    * The default is <code>true</code>.
    * @see #setTokenized(boolean)
    */
-  @Override
   public boolean tokenized() {
     return this.tokenized;
   }
@@ -367,7 +341,7 @@ public class FieldType implements Indexa
     if (stored()) {
       result.append("stored");
     }
-    if (indexed()) {
+    if (indexOptions != null) {
       if (result.length() > 0)
         result.append(",");
       result.append("indexed");
@@ -441,7 +415,6 @@ public class FieldType implements Indexa
     int result = 1;
     result = prime * result + ((docValueType == null) ? 0 : docValueType.hashCode());
     result = prime * result + ((indexOptions == null) ? 0 : indexOptions.hashCode());
-    result = prime * result + (indexed ? 1231 : 1237);
     result = prime * result + numericPrecisionStep;
     result = prime * result + ((numericType == null) ? 0 : numericType.hashCode());
     result = prime * result + (omitNorms ? 1231 : 1237);
@@ -462,7 +435,6 @@ public class FieldType implements Indexa
     FieldType other = (FieldType) obj;
     if (docValueType != other.docValueType) return false;
     if (indexOptions != other.indexOptions) return false;
-    if (indexed != other.indexed) return false;
     if (numericPrecisionStep != other.numericPrecisionStep) return false;
     if (numericType != other.numericType) return false;
     if (omitNorms != other.omitNorms) return false;

Modified: lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/FloatField.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/FloatField.java?rev=1633538&r1=1633537&r2=1633538&view=diff
==============================================================================
--- lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/FloatField.java (original)
+++ lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/FloatField.java Wed Oct 22 05:44:17 2014
@@ -119,7 +119,6 @@ public final class FloatField extends Fi
    */
   public static final FieldType TYPE_NOT_STORED = new FieldType();
   static {
-    TYPE_NOT_STORED.setIndexed(true);
     TYPE_NOT_STORED.setTokenized(true);
     TYPE_NOT_STORED.setOmitNorms(true);
     TYPE_NOT_STORED.setIndexOptions(IndexOptions.DOCS_ONLY);
@@ -134,7 +133,6 @@ public final class FloatField extends Fi
    */
   public static final FieldType TYPE_STORED = new FieldType();
   static {
-    TYPE_STORED.setIndexed(true);
     TYPE_STORED.setTokenized(true);
     TYPE_STORED.setOmitNorms(true);
     TYPE_STORED.setIndexOptions(IndexOptions.DOCS_ONLY);

Modified: lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/IntField.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/IntField.java?rev=1633538&r1=1633537&r2=1633538&view=diff
==============================================================================
--- lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/IntField.java (original)
+++ lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/IntField.java Wed Oct 22 05:44:17 2014
@@ -119,7 +119,6 @@ public final class IntField extends Fiel
    */
   public static final FieldType TYPE_NOT_STORED = new FieldType();
   static {
-    TYPE_NOT_STORED.setIndexed(true);
     TYPE_NOT_STORED.setTokenized(true);
     TYPE_NOT_STORED.setOmitNorms(true);
     TYPE_NOT_STORED.setIndexOptions(IndexOptions.DOCS_ONLY);
@@ -134,7 +133,6 @@ public final class IntField extends Fiel
    */
   public static final FieldType TYPE_STORED = new FieldType();
   static {
-    TYPE_STORED.setIndexed(true);
     TYPE_STORED.setTokenized(true);
     TYPE_STORED.setOmitNorms(true);
     TYPE_STORED.setIndexOptions(IndexOptions.DOCS_ONLY);

Modified: lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/LongField.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/LongField.java?rev=1633538&r1=1633537&r2=1633538&view=diff
==============================================================================
--- lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/LongField.java (original)
+++ lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/LongField.java Wed Oct 22 05:44:17 2014
@@ -129,7 +129,6 @@ public final class LongField extends Fie
    */
   public static final FieldType TYPE_NOT_STORED = new FieldType();
   static {
-    TYPE_NOT_STORED.setIndexed(true);
     TYPE_NOT_STORED.setTokenized(true);
     TYPE_NOT_STORED.setOmitNorms(true);
     TYPE_NOT_STORED.setIndexOptions(IndexOptions.DOCS_ONLY);
@@ -143,7 +142,6 @@ public final class LongField extends Fie
    */
   public static final FieldType TYPE_STORED = new FieldType();
   static {
-    TYPE_STORED.setIndexed(true);
     TYPE_STORED.setTokenized(true);
     TYPE_STORED.setOmitNorms(true);
     TYPE_STORED.setIndexOptions(IndexOptions.DOCS_ONLY);

Modified: lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/StringField.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/StringField.java?rev=1633538&r1=1633537&r2=1633538&view=diff
==============================================================================
--- lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/StringField.java (original)
+++ lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/StringField.java Wed Oct 22 05:44:17 2014
@@ -36,13 +36,11 @@ public final class StringField extends F
   public static final FieldType TYPE_STORED = new FieldType();
 
   static {
-    TYPE_NOT_STORED.setIndexed(true);
     TYPE_NOT_STORED.setOmitNorms(true);
     TYPE_NOT_STORED.setIndexOptions(IndexOptions.DOCS_ONLY);
     TYPE_NOT_STORED.setTokenized(false);
     TYPE_NOT_STORED.freeze();
 
-    TYPE_STORED.setIndexed(true);
     TYPE_STORED.setOmitNorms(true);
     TYPE_STORED.setIndexOptions(IndexOptions.DOCS_ONLY);
     TYPE_STORED.setStored(true);

Modified: lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/TextField.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/TextField.java?rev=1633538&r1=1633537&r2=1633538&view=diff
==============================================================================
--- lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/TextField.java (original)
+++ lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/document/TextField.java Wed Oct 22 05:44:17 2014
@@ -20,6 +20,7 @@ package org.apache.lucene.document;
 import java.io.Reader;
 
 import org.apache.lucene.analysis.TokenStream;
+import org.apache.lucene.index.FieldInfo.IndexOptions;
 
 /** A field that is indexed and tokenized, without term
  *  vectors.  For example this would be used on a 'body'
@@ -34,11 +35,11 @@ public final class TextField extends Fie
   public static final FieldType TYPE_STORED = new FieldType();
 
   static {
-    TYPE_NOT_STORED.setIndexed(true);
+    TYPE_NOT_STORED.setIndexOptions(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS);
     TYPE_NOT_STORED.setTokenized(true);
     TYPE_NOT_STORED.freeze();
 
-    TYPE_STORED.setIndexed(true);
+    TYPE_STORED.setIndexOptions(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS);
     TYPE_STORED.setTokenized(true);
     TYPE_STORED.setStored(true);
     TYPE_STORED.freeze();

Modified: lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/index/DefaultIndexingChain.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/index/DefaultIndexingChain.java?rev=1633538&r1=1633537&r2=1633538&view=diff
==============================================================================
--- lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/index/DefaultIndexingChain.java (original)
+++ lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/index/DefaultIndexingChain.java Wed Oct 22 05:44:17 2014
@@ -361,7 +361,7 @@ final class DefaultIndexingChain extends
   }
 
   private static void verifyFieldType(String name, IndexableFieldType ft) {
-    if (ft.indexed() == false) {
+    if (ft.indexOptions() == null) {
       if (ft.storeTermVectors()) {
         throw new IllegalArgumentException("cannot store term vectors "
                                            + "for a field that is not indexed (field=\"" + name + "\")");
@@ -580,7 +580,6 @@ final class DefaultIndexingChain extends
         // reset the TokenStream to the first token
         stream.reset();
         invertState.setAttributeSource(stream);
-
         termsHashPerField.start(field, first);
 
         while (stream.incrementToken()) {

Modified: lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/index/FieldInfo.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/index/FieldInfo.java?rev=1633538&r1=1633537&r2=1633538&view=diff
==============================================================================
--- lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/index/FieldInfo.java (original)
+++ lucene/dev/branches/lucene5969/lucene/core/src/java/org/apache/lucene/index/FieldInfo.java Wed Oct 22 05:44:17 2014
@@ -34,7 +34,6 @@ public final class FieldInfo {
   /** Internal field number */
   public final int number;
 
-  private boolean indexed;
   private DocValuesType docValueType;
 
   // True if any document indexed term vectors
@@ -124,14 +123,13 @@ public final class FieldInfo {
    *
    * @lucene.experimental
    */
-  public FieldInfo(String name, boolean indexed, int number, boolean storeTermVector, boolean omitNorms, 
+  public FieldInfo(String name, int number, boolean storeTermVector, boolean omitNorms, 
       boolean storePayloads, IndexOptions indexOptions, DocValuesType docValues,
       long dvGen, Map<String,String> attributes) {
     this.name = name;
-    this.indexed = indexed;
     this.number = number;
     this.docValueType = docValues;
-    if (indexed) {
+    if (indexOptions != null) {
       this.storeTermVector = storeTermVector;
       this.storePayloads = storePayloads;
       this.omitNorms = omitNorms;
@@ -152,10 +150,7 @@ public final class FieldInfo {
    * Always returns true (or throws IllegalStateException) 
    */
   public boolean checkConsistency() {
-    if (indexed) {
-      if (indexOptions == null) {
-        throw new IllegalStateException("indexed field '" + name + "' must have index options");
-      }
+    if (indexOptions != null) {
       // Cannot store payloads unless positions are indexed:
       if (indexOptions.compareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) < 0 && storePayloads) {
         throw new IllegalStateException("indexed field '" + name + "' cannot have payloads without positions");
@@ -183,31 +178,33 @@ public final class FieldInfo {
   }
 
   void update(IndexableFieldType ft) {
-    update(ft.indexed(), false, ft.omitNorms(), false, ft.indexOptions());
+    update(false, ft.omitNorms(), false, ft.indexOptions());
   }
 
   // should only be called by FieldInfos#addOrUpdate
-  void update(boolean indexed, boolean storeTermVector, boolean omitNorms, boolean storePayloads, IndexOptions indexOptions) {
+  void update(boolean storeTermVector, boolean omitNorms, boolean storePayloads, IndexOptions indexOptions) {
     //System.out.println("FI.update field=" + name + " indexed=" + indexed + " omitNorms=" + omitNorms + " this.omitNorms=" + this.omitNorms);
-    this.indexed |= indexed;  // once indexed, always indexed
-    if (indexed) { // if updated field data is not for indexing, leave the updates out
+    if (this.indexOptions != indexOptions) {
+      if (this.indexOptions == null) {
+        this.indexOptions = indexOptions;
+      } else if (indexOptions != null) {
+        // downgrade
+        this.indexOptions = this.indexOptions.compareTo(indexOptions) < 0 ? this.indexOptions : indexOptions;
+      }
+    }
+
+    if (this.indexOptions != null) { // if updated field data is not for indexing, leave the updates out
       this.storeTermVector |= storeTermVector;                // once vector, always vector
       this.storePayloads |= storePayloads;
-      if (this.omitNorms != omitNorms) {
+
+      // Awkward: only drop norms if incoming update is indexed:
+      if (indexOptions != null && this.omitNorms != omitNorms) {
         this.omitNorms = true;                // if one require omitNorms at least once, it remains off for life
       }
-      if (this.indexOptions != indexOptions) {
-        if (this.indexOptions == null) {
-          this.indexOptions = indexOptions;
-        } else {
-          // downgrade
-          this.indexOptions = this.indexOptions.compareTo(indexOptions) < 0 ? this.indexOptions : indexOptions;
-        }
-        if (this.indexOptions.compareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) < 0) {
-          // cannot store payloads if we don't store positions:
-          this.storePayloads = false;
-        }
-      }
+    }
+    if (this.indexOptions == null || this.indexOptions.compareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) < 0) {
+      // cannot store payloads if we don't store positions:
+      this.storePayloads = false;
     }
     assert checkConsistency();
   }
@@ -259,7 +256,7 @@ public final class FieldInfo {
   }
   
   void setStorePayloads() {
-    if (indexed && indexOptions.compareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) >= 0) {
+    if (indexOptions != null && indexOptions.compareTo(IndexOptions.DOCS_AND_FREQS_AND_POSITIONS) >= 0) {
       storePayloads = true;
     }
     assert checkConsistency();
@@ -276,14 +273,14 @@ public final class FieldInfo {
    * Returns true if this field actually has any norms.
    */
   public boolean hasNorms() {
-    return indexed && omitNorms == false;
+    return isIndexed() && omitNorms == false;
   }
   
   /**
-   * Returns true if this field is indexed.
+   * Returns true if this field is indexed (has non-null {@link #getIndexOptions}).
    */
   public boolean isIndexed() {
-    return indexed;
+    return indexOptions != null;
   }
   
   /**



Mime
View raw message