You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@lucene.apache.org by sa...@apache.org on 2011/06/14 21:26:31 UTC
svn commit: r1135759 [1/2] - in /lucene/dev/branches/solr2452: ./
dev-tools/idea/.idea/ dev-tools/idea/lucene/
dev-tools/idea/solr/contrib/analysis-extras/ lucene/ lucene/backwards/
lucene/contrib/ lucene/contrib/misc/src/java/org/apache/lucene/index/ ...
Author: sarowe
Date: Tue Jun 14 19:26:27 2011
New Revision: 1135759
URL: http://svn.apache.org/viewvc?rev=1135759&view=rev
Log:
Merged with trunk up to r1135758
Added:
lucene/dev/branches/solr2452/lucene/contrib/misc/src/java/org/apache/lucene/index/NRTManager.java
- copied unchanged from r1135665, lucene/dev/trunk/lucene/contrib/misc/src/java/org/apache/lucene/index/NRTManager.java
lucene/dev/branches/solr2452/lucene/contrib/misc/src/java/org/apache/lucene/index/NRTManagerReopenThread.java
- copied unchanged from r1135665, lucene/dev/trunk/lucene/contrib/misc/src/java/org/apache/lucene/index/NRTManagerReopenThread.java
lucene/dev/branches/solr2452/lucene/contrib/misc/src/test/org/apache/lucene/index/TestNRTManager.java
- copied, changed from r1135665, lucene/dev/trunk/lucene/contrib/misc/src/test/org/apache/lucene/index/TestNRTManager.java
lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/store/InputStreamDataInput.java
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/java/org/apache/lucene/store/InputStreamDataInput.java
lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/store/OutputStreamDataOutput.java
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/java/org/apache/lucene/store/OutputStreamDataOutput.java
lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/util/TwoPhaseCommit.java
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/TwoPhaseCommit.java
lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/util/TwoPhaseCommitTool.java
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/java/org/apache/lucene/util/TwoPhaseCommitTool.java
lucene/dev/branches/solr2452/lucene/src/site/build/ (props changed)
- copied from r1135665, lucene/dev/trunk/lucene/src/site/build/
lucene/dev/branches/solr2452/lucene/src/site/build/site/
- copied from r1135665, lucene/dev/trunk/lucene/src/site/build/site/
lucene/dev/branches/solr2452/lucene/src/site/build/site/.htaccess
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/.htaccess
lucene/dev/branches/solr2452/lucene/src/site/build/site/broken-links.xml
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/broken-links.xml
lucene/dev/branches/solr2452/lucene/src/site/build/site/contributions.html
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/contributions.html
lucene/dev/branches/solr2452/lucene/src/site/build/site/demo.html
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/demo.html
lucene/dev/branches/solr2452/lucene/src/site/build/site/demo2.html
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/demo2.html
lucene/dev/branches/solr2452/lucene/src/site/build/site/fileformats.html
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/fileformats.html
lucene/dev/branches/solr2452/lucene/src/site/build/site/gettingstarted.html
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/gettingstarted.html
lucene/dev/branches/solr2452/lucene/src/site/build/site/images/
- copied from r1135665, lucene/dev/trunk/lucene/src/site/build/site/images/
lucene/dev/branches/solr2452/lucene/src/site/build/site/images/built-with-forrest-button.png
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/images/built-with-forrest-button.png
lucene/dev/branches/solr2452/lucene/src/site/build/site/images/favicon.ico
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/images/favicon.ico
lucene/dev/branches/solr2452/lucene/src/site/build/site/images/instruction_arrow.png
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/images/instruction_arrow.png
lucene/dev/branches/solr2452/lucene/src/site/build/site/index.html
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/index.html
lucene/dev/branches/solr2452/lucene/src/site/build/site/linkmap.html
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/linkmap.html
lucene/dev/branches/solr2452/lucene/src/site/build/site/lucene-contrib/
- copied from r1135665, lucene/dev/trunk/lucene/src/site/build/site/lucene-contrib/
lucene/dev/branches/solr2452/lucene/src/site/build/site/lucene-contrib/index.html
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/lucene-contrib/index.html
lucene/dev/branches/solr2452/lucene/src/site/build/site/queryparsersyntax.html
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/queryparsersyntax.html
lucene/dev/branches/solr2452/lucene/src/site/build/site/scoring.html
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/scoring.html
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/
- copied from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/CommonMessages_de.xml
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/CommonMessages_de.xml
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/CommonMessages_en_US.xml
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/CommonMessages_en_US.xml
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/CommonMessages_es.xml
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/CommonMessages_es.xml
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/CommonMessages_fr.xml
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/CommonMessages_fr.xml
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/basic.css
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/basic.css
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/breadcrumbs-optimized.js
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/breadcrumbs-optimized.js
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/breadcrumbs.js
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/breadcrumbs.js
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/css/
- copied from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/css/
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/fontsize.js
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/fontsize.js
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/getBlank.js
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/getBlank.js
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/getMenu.js
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/getMenu.js
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/images/
- copied from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/images/
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/images/README.txt
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/images/README.txt
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/images/add.jpg
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/images/add.jpg
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/images/apache-thanks.png
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/images/apache-thanks.png
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/images/built-with-cocoon.gif
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/images/built-with-cocoon.gif
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/images/built-with-forrest-button.png
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/images/built-with-forrest-button.png
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/images/chapter.gif
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/images/chapter.gif
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/images/corner-imports.svg.xslt
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/images/corner-imports.svg.xslt
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/images/current.gif
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/images/current.gif
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/images/dc.svg.xslt
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/images/dc.svg.xslt
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/images/external-link.gif
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/images/external-link.gif
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/images/fix.jpg
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/images/fix.jpg
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/images/forrest-credit-logo.png
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/images/forrest-credit-logo.png
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/images/hack.jpg
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/images/hack.jpg
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/images/page.gif
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/images/page.gif
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/images/pdfdoc.gif
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/images/pdfdoc.gif
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/images/poddoc.png
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/images/poddoc.png
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/images/poddoc.svg.xslt
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/images/poddoc.svg.xslt
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/images/printer.gif
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/images/printer.gif
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/images/rc-b-l-15-1body-2menu-3menu.png
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/images/rc-b-l-15-1body-2menu-3menu.png
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/images/rc-b-r-15-1body-2menu-3menu.png
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/images/rc-b-r-15-1body-2menu-3menu.png
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/images/rc-b-r-5-1header-2tab-selected-3tab-selected.png
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/images/rc-b-r-5-1header-2tab-selected-3tab-selected.png
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/images/rc-t-l-5-1header-2searchbox-3searchbox.png
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/images/rc-t-l-5-1header-2searchbox-3searchbox.png
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/images/rc-t-l-5-1header-2tab-selected-3tab-selected.png
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/images/rc-t-l-5-1header-2tab-selected-3tab-selected.png
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/images/rc-t-l-5-1header-2tab-unselected-3tab-unselected.png
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/images/rc-t-l-5-1header-2tab-unselected-3tab-unselected.png
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/images/rc-t-r-15-1body-2menu-3menu.png
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/images/rc-t-r-15-1body-2menu-3menu.png
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/images/rc-t-r-5-1header-2searchbox-3searchbox.png
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/images/rc-t-r-5-1header-2searchbox-3searchbox.png
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/images/rc-t-r-5-1header-2tab-selected-3tab-selected.png
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/images/rc-t-r-5-1header-2tab-selected-3tab-selected.png
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/images/rc-t-r-5-1header-2tab-unselected-3tab-unselected.png
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/images/rc-t-r-5-1header-2tab-unselected-3tab-unselected.png
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/images/rc.svg.xslt
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/images/rc.svg.xslt
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/images/remove.jpg
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/images/remove.jpg
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/images/rss.png
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/images/rss.png
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/images/spacer.gif
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/images/spacer.gif
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/images/txtdoc.png
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/images/txtdoc.png
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/images/txtdoc.svg.xslt
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/images/txtdoc.svg.xslt
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/images/update.jpg
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/images/update.jpg
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/images/valid-html401.png
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/images/valid-html401.png
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/images/vcss.png
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/images/vcss.png
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/images/xmldoc.gif
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/images/xmldoc.gif
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/menu.js
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/menu.js
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/note.txt
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/note.txt
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/print.css
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/print.css
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/profile.css
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/profile.css
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/prototype.js
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/prototype.js
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/screen.css
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/screen.css
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/scripts/
- copied from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/scripts/
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/skinconf.xsl
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/skinconf.xsl
lucene/dev/branches/solr2452/lucene/src/site/build/site/skin/translations/
- copied from r1135665, lucene/dev/trunk/lucene/src/site/build/site/skin/translations/
lucene/dev/branches/solr2452/lucene/src/site/build/site/systemrequirements.html
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/site/build/site/systemrequirements.html
lucene/dev/branches/solr2452/lucene/src/test/org/apache/lucene/util/TestTwoPhaseCommitTool.java
- copied unchanged from r1135665, lucene/dev/trunk/lucene/src/test/org/apache/lucene/util/TestTwoPhaseCommitTool.java
lucene/dev/branches/solr2452/solr/contrib/uima/src/java/org/apache/solr/uima/processor/exception/
- copied from r1135675, lucene/dev/trunk/solr/contrib/uima/src/main/java/org/apache/solr/uima/processor/exception/
lucene/dev/branches/solr2452/solr/contrib/uima/src/java/org/apache/solr/uima/processor/exception/FieldMappingException.java
- copied unchanged from r1135675, lucene/dev/trunk/solr/contrib/uima/src/main/java/org/apache/solr/uima/processor/exception/FieldMappingException.java
Removed:
lucene/dev/branches/solr2452/lucene/docs/
lucene/dev/branches/solr2452/modules/suggest/src/java/org/apache/lucene/search/suggest/fst/InputStreamDataInput.java
lucene/dev/branches/solr2452/modules/suggest/src/java/org/apache/lucene/search/suggest/fst/OutputStreamDataOutput.java
Modified:
lucene/dev/branches/solr2452/ (props changed)
lucene/dev/branches/solr2452/dev-tools/idea/.idea/compiler.xml
lucene/dev/branches/solr2452/dev-tools/idea/lucene/lucene.iml
lucene/dev/branches/solr2452/dev-tools/idea/solr/contrib/analysis-extras/analysis-extras.iml
lucene/dev/branches/solr2452/lucene/ (props changed)
lucene/dev/branches/solr2452/lucene/CHANGES.txt
lucene/dev/branches/solr2452/lucene/backwards/backwards-readme.txt
lucene/dev/branches/solr2452/lucene/build.xml
lucene/dev/branches/solr2452/lucene/contrib/CHANGES.txt
lucene/dev/branches/solr2452/lucene/contrib/misc/src/java/org/apache/lucene/index/IndexSplitter.java
lucene/dev/branches/solr2452/lucene/contrib/misc/src/test/org/apache/lucene/index/TestIndexSplitter.java
lucene/dev/branches/solr2452/lucene/contrib/queries/src/test/org/apache/lucene/search/regex/TestSpanRegexQuery.java (props changed)
lucene/dev/branches/solr2452/lucene/contrib/xml-query-parser/src/test/org/apache/lucene/xmlparser/builders/TestNumericRangeFilterBuilder.java (props changed)
lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/index/CheckIndex.java
lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/index/CompoundFileReader.java
lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/index/DocumentsWriterFlushControl.java
lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/index/IndexWriter.java
lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/index/MergePolicy.java
lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/index/values/FixedStraightBytesImpl.java
lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/store/FSDirectory.java
lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/store/MMapDirectory.java
lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/util/fst/FST.java
lucene/dev/branches/solr2452/lucene/src/site/ (props changed)
lucene/dev/branches/solr2452/lucene/src/site/changes/changes2html.pl
lucene/dev/branches/solr2452/lucene/src/site/forrest.properties
lucene/dev/branches/solr2452/lucene/src/site/src/documentation/skinconf.xml
lucene/dev/branches/solr2452/lucene/src/test-framework/org/apache/lucene/util/_TestUtil.java
lucene/dev/branches/solr2452/lucene/src/test/org/apache/lucene/index/TestTermVectorsReader.java
lucene/dev/branches/solr2452/lucene/src/test/org/apache/lucene/index/values/TestDocValuesIndexing.java
lucene/dev/branches/solr2452/lucene/src/test/org/apache/lucene/store/TestMultiMMap.java
lucene/dev/branches/solr2452/modules/suggest/src/java/org/apache/lucene/search/suggest/fst/FSTLookup.java
lucene/dev/branches/solr2452/solr/ (props changed)
lucene/dev/branches/solr2452/solr/CHANGES.txt (contents, props changed)
lucene/dev/branches/solr2452/solr/LICENSE.txt (props changed)
lucene/dev/branches/solr2452/solr/NOTICE.txt (props changed)
lucene/dev/branches/solr2452/solr/README.txt (props changed)
lucene/dev/branches/solr2452/solr/build.xml (props changed)
lucene/dev/branches/solr2452/solr/client/ (props changed)
lucene/dev/branches/solr2452/solr/common-build.xml (props changed)
lucene/dev/branches/solr2452/solr/contrib/ (props changed)
lucene/dev/branches/solr2452/solr/contrib/dataimporthandler-extras/src/java/ (props changed)
lucene/dev/branches/solr2452/solr/contrib/dataimporthandler-extras/src/java/org/apache/solr/handler/dataimport/MailEntityProcessor.java
lucene/dev/branches/solr2452/solr/contrib/uima/CHANGES.txt
lucene/dev/branches/solr2452/solr/contrib/uima/README.txt
lucene/dev/branches/solr2452/solr/contrib/uima/src/java/ (props changed)
lucene/dev/branches/solr2452/solr/contrib/uima/src/java/org/apache/solr/uima/processor/UIMAToSolrMapper.java
lucene/dev/branches/solr2452/solr/contrib/uima/src/java/org/apache/solr/uima/processor/UIMAUpdateRequestProcessor.java
lucene/dev/branches/solr2452/solr/contrib/uima/src/test-files/ (props changed)
lucene/dev/branches/solr2452/solr/contrib/uima/src/test-files/solr-uima/conf/solrconfig.xml
lucene/dev/branches/solr2452/solr/example/ (props changed)
lucene/dev/branches/solr2452/solr/lib/ (props changed)
lucene/dev/branches/solr2452/solr/site/ (props changed)
lucene/dev/branches/solr2452/solr/src/ (props changed)
lucene/dev/branches/solr2452/solr/src/java/org/apache/solr/handler/AnalysisRequestHandlerBase.java
lucene/dev/branches/solr2452/solr/src/java/org/apache/solr/search/function/SimpleBoolFunction.java
lucene/dev/branches/solr2452/solr/src/test/org/apache/solr/handler/AnalysisRequestHandlerTestBase.java
lucene/dev/branches/solr2452/solr/src/test/org/apache/solr/handler/DocumentAnalysisRequestHandlerTest.java
lucene/dev/branches/solr2452/solr/src/test/org/apache/solr/handler/FieldAnalysisRequestHandlerTest.java
lucene/dev/branches/solr2452/solr/testlogging.properties (props changed)
Modified: lucene/dev/branches/solr2452/dev-tools/idea/.idea/compiler.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/dev-tools/idea/.idea/compiler.xml?rev=1135759&r1=1135758&r2=1135759&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/dev-tools/idea/.idea/compiler.xml (original)
+++ lucene/dev/branches/solr2452/dev-tools/idea/.idea/compiler.xml Tue Jun 14 19:26:27 2011
@@ -9,6 +9,7 @@
<entry name="?*.brk" />
<entry name="?*.bz2" />
<entry name="?*.csv" />
+ <entry name="?*.docx"/>
<entry name="?*.dtd" />
<entry name="?*.ftl" />
<entry name="?*.gif" />
Modified: lucene/dev/branches/solr2452/dev-tools/idea/lucene/lucene.iml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/dev-tools/idea/lucene/lucene.iml?rev=1135759&r1=1135758&r2=1135759&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/dev-tools/idea/lucene/lucene.iml (original)
+++ lucene/dev/branches/solr2452/dev-tools/idea/lucene/lucene.iml Tue Jun 14 19:26:27 2011
@@ -6,6 +6,7 @@
<exclude-output />
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/java" isTestSource="false" />
+ <sourceFolder url="file://$MODULE_DIR$/src/tools/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test-framework" isTestSource="true" />
<sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" />
<excludeFolder url="file://$MODULE_DIR$/build" />
Modified: lucene/dev/branches/solr2452/dev-tools/idea/solr/contrib/analysis-extras/analysis-extras.iml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/dev-tools/idea/solr/contrib/analysis-extras/analysis-extras.iml?rev=1135759&r1=1135758&r2=1135759&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/dev-tools/idea/solr/contrib/analysis-extras/analysis-extras.iml (original)
+++ lucene/dev/branches/solr2452/dev-tools/idea/solr/contrib/analysis-extras/analysis-extras.iml Tue Jun 14 19:26:27 2011
@@ -7,6 +7,7 @@
<content url="file://$MODULE_DIR$">
<sourceFolder url="file://$MODULE_DIR$/src/java" isTestSource="false" />
<sourceFolder url="file://$MODULE_DIR$/src/test" isTestSource="true" />
+ <sourceFolder url="file://$MODULE_DIR$/src/test-files" isTestSource="true" />
</content>
<orderEntry type="inheritedJdk" />
<orderEntry type="sourceFolder" forTests="false" />
Modified: lucene/dev/branches/solr2452/lucene/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/lucene/CHANGES.txt?rev=1135759&r1=1135758&r2=1135759&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/lucene/CHANGES.txt (original)
+++ lucene/dev/branches/solr2452/lucene/CHANGES.txt Tue Jun 14 19:26:27 2011
@@ -12,15 +12,15 @@ Changes in backwards compatibility polic
- On upgrading to 3.1, if you do not fully reindex your documents,
Lucene will emulate the new flex API on top of the old index,
incurring some performance cost (up to ~10% slowdown, typically).
- Likewise, if you use the deprecated pre-flex APIs on a newly
- created flex index, this emulation will also incur some
- performance loss.
+ To prevent this slowdown, use oal.index.IndexUpgrader
+ to upgrade your indexes to latest file format (LUCENE-3082).
Mixed flex/pre-flex indexes are perfectly fine -- the two
emulation layers (flex API on pre-flex index, and pre-flex API on
flex index) will remap the access as required. So on upgrading to
3.1 you can start indexing new documents into an existing index.
- But for best performance you should fully reindex.
+ To get optimal performance, use oal.index.IndexUpgrader
+ to upgrade your indexes to latest file format (LUCENE-3082).
- The postings APIs (TermEnum, TermDocsEnum, TermPositionsEnum)
have been removed in favor of the new flexible
@@ -482,6 +482,19 @@ Changes in runtime behavior
* LUCENE-3146: IndexReader.setNorm throws IllegalStateException if the field
does not store norms. (Shai Erera, Mike McCandless)
+
+* LUCENE-3198: On Linux, if the JRE is 64 bit and supports unmapping,
+ FSDirectory.open now defaults to MMapDirectory instead of
+ NIOFSDirectory since MMapDirectory gives better performance. (Mike
+ McCandless)
+
+* LUCENE-3200: MMapDirectory now uses chunk sizes that are powers of 2.
+ When setting the chunk size, it is rounded down to the next possible
+ value. The new default value for 64 bit platforms is 2^30 (1 GiB),
+ for 32 bit platforms it stays unchanged at 2^28 (256 MiB).
+ Internally, MMapDirectory now only uses one dedicated final IndexInput
+ implementation supporting multiple chunks, which makes Hotspot's life
+ easier. (Uwe Schindler, Robert Muir, Mike McCandless)
Bug fixes
@@ -503,6 +516,10 @@ New Features
* LUCENE-3140: Added experimental FST implementation to Lucene.
(Robert Muir, Dawid Weiss, Mike McCandless)
+* LUCENE-3193: A new TwoPhaseCommitTool allows running a 2-phase commit
+ algorithm over objects that implement the new TwoPhaseCommit interface (such
+ as IndexWriter). (Shai Erera)
+
Build
* LUCENE-1344: Create OSGi bundle using dev-tools/maven.
Modified: lucene/dev/branches/solr2452/lucene/backwards/backwards-readme.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/lucene/backwards/backwards-readme.txt?rev=1135759&r1=1135758&r2=1135759&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/lucene/backwards/backwards-readme.txt (original)
+++ lucene/dev/branches/solr2452/lucene/backwards/backwards-readme.txt Tue Jun 14 19:26:27 2011
@@ -1,18 +1,21 @@
-* This is a placeholder for 4.1, when 4.0 will be branched *
-
-============== DISABLED =============================================================================
-
This folder contains the src/ folder of the previous Lucene major version.
The test-backwards ANT task compiles the previous version's tests (bundled) against the
previous released lucene-core.jar file (bundled). After that the compiled test classes
are run against the new lucene-core.jar file, created by ANT before.
-After branching a new Lucene major version (branch name "lucene_X_Y") do the following:
+After tagging a new Lucene *major* version (tag name "lucene_solr_X_Y_0") do the following
+(for minor versions never do this); also always use the x.y.0 version for the backwards folder,
+later bugfix releases should not be tested (the reason is that the new version must be backwards
+compatible to the last base version, bugfixes should not taken into account):
-* svn rm backwards/src/test
-* svn cp https://svn.apache.org/repos/asf/lucene/dev/branches/lucene_X_Y/lucene/src/test backwards/src/test
-* Copy the lucene-core.jar from the last release tarball to backwards/lib and delete old one.
+* cd lucene/backwards
+* svn rm src/test src/test-framework lib/lucene-core*.jar
+* svn commit (1st commit; you must do this, else you will corrupt your checkout)
+* svn cp https://svn.apache.org/repos/asf/lucene/dev/tags/lucene_solr_X_Y_0/lucene/src/test-framework src
+* svn cp https://svn.apache.org/repos/asf/lucene/dev/tags/lucene_solr_X_Y_0/lucene/src/test src
+* Copy the lucene-core.jar from the last release tarball to lib.
* Check that everything is correct: The backwards folder should contain a src/ folder
- that now contains "test". The files should be the ones from the branch.
+ that now contains "test" and "test-framework". The files should be the ones from the last version.
* Run "ant test-backwards"
+* Commit the stuff again (2nd commit)
Modified: lucene/dev/branches/solr2452/lucene/build.xml
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/lucene/build.xml?rev=1135759&r1=1135758&r2=1135759&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/lucene/build.xml (original)
+++ lucene/dev/branches/solr2452/lucene/build.xml Tue Jun 14 19:26:27 2011
@@ -50,7 +50,7 @@
excludes="*-src.jar"
/>
<patternset id="binary.root.dist.patterns"
- includes="docs/,CHANGES.txt,LICENSE.txt,NOTICE.txt,README.txt,MIGRATE.txt,JRE_VERSION_MIGRATION.txt,contrib/**/README*,**/CHANGES.txt,contrib/**/*.sh contrib/**/docs/ contrib/xml-query-parser/*.dtd,lib/*.jar,lib/*LICENSE*.txt,lib/*NOTICE*.txt,contrib/*/lib/*.jar,contrib/*/lib/*LICENSE*.txt,contrib/*/lib/*NOTICE*.txt"
+ includes="CHANGES.txt,LICENSE.txt,NOTICE.txt,README.txt,MIGRATE.txt,JRE_VERSION_MIGRATION.txt,contrib/**/README*,**/CHANGES.txt,contrib/**/*.sh contrib/**/docs/ contrib/xml-query-parser/*.dtd,lib/*.jar,lib/*LICENSE*.txt,lib/*NOTICE*.txt,contrib/*/lib/*.jar,contrib/*/lib/*LICENSE*.txt,contrib/*/lib/*NOTICE*.txt"
/>
@@ -147,8 +147,11 @@
<!-- ================================================================== -->
<!-- -->
<!-- ================================================================== -->
- <target name="docs" description="Build the website">
- <echo>DEPRECATED - Doing Nothing. See http://wiki.apache.org/lucene-java/HowToUpdateTheWebsite</echo>
+ <target name="docs">
+ <!-- copies the docs over to the docs folder -->
+ <copy todir="build/docs">
+ <fileset dir="src/site/build/site"/>
+ </copy>
</target>
<target name="javadoc" depends="javadocs"/>
@@ -260,7 +263,7 @@
<!-- ================================================================== -->
<!-- -->
<!-- ================================================================== -->
- <target name="package" depends="jar-core, jar-test-framework, javadocs, build-contrib, init-dist, changes-to-html"/>
+ <target name="package" depends="jar-core, jar-test-framework, docs, javadocs, build-contrib, init-dist, changes-to-html"/>
<target name="nightly" depends="test, package-tgz">
</target>
@@ -636,11 +639,12 @@
<attribute name="changes.target.dir" default="${changes.target.dir}"/>
<sequential>
<mkdir dir="@{changes.target.dir}"/>
- <exec executable="perl" input="CHANGES.txt" output="@{changes.target.dir}/Changes.html" failonerror="true">
+ <exec executable="perl" input="CHANGES.txt" output="@{changes.target.dir}/Changes.html"
+ failonerror="true" logError="true">
<arg value="@{changes.src.dir}/changes2html.pl"/>
</exec>
<exec executable="perl" input="contrib/CHANGES.txt" output="@{changes.target.dir}/Contrib-Changes.html"
- failonerror="true">
+ failonerror="true" logError="true">
<arg value="@{changes.src.dir}/changes2html.pl"/>
</exec>
<copy todir="@{changes.target.dir}">
Modified: lucene/dev/branches/solr2452/lucene/contrib/CHANGES.txt
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/lucene/contrib/CHANGES.txt?rev=1135759&r1=1135758&r2=1135759&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/lucene/contrib/CHANGES.txt (original)
+++ lucene/dev/branches/solr2452/lucene/contrib/CHANGES.txt Tue Jun 14 19:26:27 2011
@@ -70,6 +70,11 @@ New Features
document sharing the same group was indexed as a doc block
(IndexWriter.add/updateDocuments). (Mike McCandless)
+ * LUCENE-2955: Added NRTManager and NRTManagerReopenThread, to
+ simplify handling NRT reopen with multiple search threads, and to
+ allow an app to control which indexing changes must be visible to
+ which search requests. (Mike McCandless)
+
API Changes
* LUCENE-3141: add getter method to access fragInfos in FieldFragList.
@@ -81,9 +86,13 @@ API Changes
Bug Fixes
- * LUCENE-3185: Fix bug in NRTCachingDirectory.deleteFile that would
- always throw exception and sometimes fail to actually delete the
- file. (Mike McCandless)
+ * LUCENE-3185: Fix bug in NRTCachingDirectory.deleteFile that would
+ always throw exception and sometimes fail to actually delete the
+ file. (Mike McCandless)
+
+ * LUCENE-3188: contrib/misc IndexSplitter creates indexes with incorrect
+ SegmentInfos.counter; added CheckIndex check & fix for this problem.
+ (Ivan Dimitrov Vasilev via Steve Rowe)
Build
Modified: lucene/dev/branches/solr2452/lucene/contrib/misc/src/java/org/apache/lucene/index/IndexSplitter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/lucene/contrib/misc/src/java/org/apache/lucene/index/IndexSplitter.java?rev=1135759&r1=1135758&r2=1135759&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/lucene/contrib/misc/src/java/org/apache/lucene/index/IndexSplitter.java (original)
+++ lucene/dev/branches/solr2452/lucene/contrib/misc/src/java/org/apache/lucene/index/IndexSplitter.java Tue Jun 14 19:26:27 2011
@@ -147,6 +147,7 @@ public class IndexSplitter {
destDir.mkdirs();
FSDirectory destFSDir = FSDirectory.open(destDir);
SegmentInfos destInfos = new SegmentInfos(codecs);
+ destInfos.counter = infos.counter;
for (String n : segs) {
SegmentInfo info = getInfo(n);
destInfos.add(info);
Modified: lucene/dev/branches/solr2452/lucene/contrib/misc/src/test/org/apache/lucene/index/TestIndexSplitter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/lucene/contrib/misc/src/test/org/apache/lucene/index/TestIndexSplitter.java?rev=1135759&r1=1135758&r2=1135759&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/lucene/contrib/misc/src/test/org/apache/lucene/index/TestIndexSplitter.java (original)
+++ lucene/dev/branches/solr2452/lucene/contrib/misc/src/test/org/apache/lucene/index/TestIndexSplitter.java Tue Jun 14 19:26:27 2011
@@ -20,6 +20,7 @@ import java.io.File;
import org.apache.lucene.analysis.MockAnalyzer;
import org.apache.lucene.document.Document;
+import org.apache.lucene.document.Field;
import org.apache.lucene.index.IndexWriterConfig.OpenMode;
import org.apache.lucene.store.Directory;
import org.apache.lucene.util.LuceneTestCase;
@@ -91,4 +92,64 @@ public class TestIndexSplitter extends L
r.close();
fsDir.close();
}
+
+ public void testDeleteThenOptimize() throws Exception {
+ // Create directories where the indexes will reside
+ File indexPath = new File(TEMP_DIR, "testfilesplitter");
+ _TestUtil.rmDir(indexPath);
+ indexPath.mkdirs();
+ File indexSplitPath = new File(TEMP_DIR, "testfilesplitterdest");
+ _TestUtil.rmDir(indexSplitPath);
+ indexSplitPath.mkdirs();
+
+ // Create the original index
+ LogMergePolicy mergePolicy = new LogByteSizeMergePolicy();
+ mergePolicy.setNoCFSRatio(1);
+ IndexWriterConfig iwConfig
+ = new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random))
+ .setOpenMode(OpenMode.CREATE)
+ .setMergePolicy(mergePolicy);
+ Directory fsDir = newFSDirectory(indexPath);
+ IndexWriter indexWriter = new IndexWriter(fsDir, iwConfig);
+ Document doc = new Document();
+ doc.add(new Field("content", "doc 1", Field.Store.YES, Field.Index.ANALYZED_NO_NORMS));
+ indexWriter.addDocument(doc);
+ doc = new Document();
+ doc.add(new Field("content", "doc 2", Field.Store.YES, Field.Index.ANALYZED_NO_NORMS));
+ indexWriter.addDocument(doc);
+ indexWriter.close();
+ fsDir.close();
+
+ // Create the split index
+ IndexSplitter indexSplitter = new IndexSplitter(indexPath);
+ String splitSegName = indexSplitter.infos.info(0).name;
+ indexSplitter.split(indexSplitPath, new String[] {splitSegName});
+
+ // Delete the first document in the split index
+ Directory fsDirDest = newFSDirectory(indexSplitPath);
+ IndexReader indexReader = IndexReader.open(fsDirDest, false);
+ indexReader.deleteDocument(0);
+ assertEquals(1, indexReader.numDocs());
+ indexReader.close();
+ fsDirDest.close();
+
+ // Optimize the split index
+ mergePolicy = new LogByteSizeMergePolicy();
+ mergePolicy.setNoCFSRatio(1);
+ iwConfig = new IndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random))
+ .setOpenMode(OpenMode.APPEND)
+ .setMergePolicy(mergePolicy);
+ fsDirDest = newFSDirectory(indexSplitPath);
+ indexWriter = new IndexWriter(fsDirDest, iwConfig);
+ indexWriter.optimize();
+ indexWriter.close();
+ fsDirDest.close();
+
+ // Read the number of docs in the index
+ fsDirDest = newFSDirectory(indexSplitPath);
+ indexReader = IndexReader.open(fsDirDest);
+ assertEquals(1, indexReader.numDocs());
+ indexReader.close();
+ fsDirDest.close();
+ }
}
Copied: lucene/dev/branches/solr2452/lucene/contrib/misc/src/test/org/apache/lucene/index/TestNRTManager.java (from r1135665, lucene/dev/trunk/lucene/contrib/misc/src/test/org/apache/lucene/index/TestNRTManager.java)
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/lucene/contrib/misc/src/test/org/apache/lucene/index/TestNRTManager.java?p2=lucene/dev/branches/solr2452/lucene/contrib/misc/src/test/org/apache/lucene/index/TestNRTManager.java&p1=lucene/dev/trunk/lucene/contrib/misc/src/test/org/apache/lucene/index/TestNRTManager.java&r1=1135665&r2=1135759&rev=1135759&view=diff
==============================================================================
--- lucene/dev/trunk/lucene/contrib/misc/src/test/org/apache/lucene/index/TestNRTManager.java (original)
+++ lucene/dev/branches/solr2452/lucene/contrib/misc/src/test/org/apache/lucene/index/TestNRTManager.java Tue Jun 14 19:26:27 2011
@@ -113,16 +113,18 @@ public class TestNRTManager extends Luce
Directory dir = _dir;
final IndexWriterConfig conf = newIndexWriterConfig(TEST_VERSION_CURRENT, new MockAnalyzer(random)).setOpenMode(IndexWriterConfig.OpenMode.CREATE);
- // newIWConfig makes smallish max seg size, which
- // results in tons and tons of segments for this test
- // when run nightly:
- MergePolicy mp = conf.getMergePolicy();
- if (mp instanceof TieredMergePolicy) {
- ((TieredMergePolicy) mp).setMaxMergedSegmentMB(5000.);
- } else if (mp instanceof LogByteSizeMergePolicy) {
- ((LogByteSizeMergePolicy) mp).setMaxMergeMB(1000.);
- } else if (mp instanceof LogMergePolicy) {
- ((LogMergePolicy) mp).setMaxMergeDocs(100000);
+ if (LuceneTestCase.TEST_NIGHTLY) {
+ // newIWConfig makes smallish max seg size, which
+ // results in tons and tons of segments for this test
+ // when run nightly:
+ MergePolicy mp = conf.getMergePolicy();
+ if (mp instanceof TieredMergePolicy) {
+ ((TieredMergePolicy) mp).setMaxMergedSegmentMB(5000.);
+ } else if (mp instanceof LogByteSizeMergePolicy) {
+ ((LogByteSizeMergePolicy) mp).setMaxMergeMB(1000.);
+ } else if (mp instanceof LogMergePolicy) {
+ ((LogMergePolicy) mp).setMaxMergeDocs(100000);
+ }
}
conf.setMergedSegmentWarmer(new IndexWriter.IndexReaderWarmer() {
@@ -194,7 +196,7 @@ public class TestNRTManager extends Luce
System.out.println("TEST: " + NUM_INDEX_THREADS + " index threads; " + NUM_SEARCH_THREADS + " search threads");
}
- final int RUN_TIME_SEC = LuceneTestCase.TEST_NIGHTLY ? 300 : 5;
+ final int RUN_TIME_SEC = LuceneTestCase.TEST_NIGHTLY ? 300 : RANDOM_MULTIPLIER;
final AtomicBoolean failed = new AtomicBoolean();
final AtomicInteger addCount = new AtomicInteger();
Modified: lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/index/CheckIndex.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/index/CheckIndex.java?rev=1135759&r1=1135758&r2=1135759&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/index/CheckIndex.java (original)
+++ lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/index/CheckIndex.java Tue Jun 14 19:26:27 2011
@@ -119,6 +119,12 @@ public class CheckIndex {
* argument). */
public boolean partial;
+ /** The greatest segment name. */
+ public int maxSegmentName;
+
+ /** Whether the SegmentInfos.counter is greater than any of the segments' names. */
+ public boolean validCounter;
+
/** Holds the userData of the last commit in the index */
public Map<String, String> userData;
@@ -413,9 +419,14 @@ public class CheckIndex {
result.newSegments = (SegmentInfos) sis.clone();
result.newSegments.clear();
+ result.maxSegmentName = -1;
for(int i=0;i<numSegments;i++) {
final SegmentInfo info = sis.info(i);
+ int segmentName = Integer.parseInt(info.name.substring(1), Character.MAX_RADIX);
+ if (segmentName > result.maxSegmentName) {
+ result.maxSegmentName = segmentName;
+ }
if (onlySegments != null && !onlySegments.contains(info.name))
continue;
Status.SegmentInfoStatus segInfoStat = new Status.SegmentInfoStatus();
@@ -555,10 +566,19 @@ public class CheckIndex {
if (0 == result.numBadSegments) {
result.clean = true;
- msg("No problems were detected with this index.\n");
} else
msg("WARNING: " + result.numBadSegments + " broken segments (containing " + result.totLoseDocCount + " documents) detected");
+ if ( ! (result.validCounter = (result.maxSegmentName < sis.counter))) {
+ result.clean = false;
+ result.newSegments.counter = result.maxSegmentName + 1;
+ msg("ERROR: Next segment name counter " + sis.counter + " is not greater than max segment name " + result.maxSegmentName);
+ }
+
+ if (result.clean) {
+ msg("No problems were detected with this index.\n");
+ }
+
return result;
}
Modified: lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/index/CompoundFileReader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/index/CompoundFileReader.java?rev=1135759&r1=1135758&r2=1135759&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/index/CompoundFileReader.java (original)
+++ lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/index/CompoundFileReader.java Tue Jun 14 19:26:27 2011
@@ -28,7 +28,6 @@ import java.util.HashMap;
import java.io.FileNotFoundException;
import java.io.IOException;
-
/**
* Class for accessing a compound stream.
* This class implements a directory, but is limited to only read operations.
@@ -36,289 +35,273 @@ import java.io.IOException;
* @lucene.experimental
*/
public class CompoundFileReader extends Directory {
-
- private int readBufferSize;
-
- private static final class FileEntry {
- long offset;
- long length;
- }
-
-
- // Base info
- private Directory directory;
- private String fileName;
-
- private IndexInput stream;
- private HashMap<String,FileEntry> entries = new HashMap<String,FileEntry>();
-
-
+
+ private int readBufferSize;
+
+ private static final class FileEntry {
+ long offset;
+ long length;
+ }
+
+ // Base info
+ private Directory directory;
+ private String fileName;
+
+ private IndexInput stream;
+ private HashMap<String,FileEntry> entries = new HashMap<String,FileEntry>();
+
public CompoundFileReader(Directory dir, String name) throws IOException {
this(dir, name, BufferedIndexInput.BUFFER_SIZE);
}
-
+
public CompoundFileReader(Directory dir, String name, int readBufferSize) throws IOException {
- directory = dir;
- fileName = name;
- this.readBufferSize = readBufferSize;
-
- boolean success = false;
-
- try {
- stream = dir.openInput(name, readBufferSize);
-
- // read the first VInt. If it is negative, it's the version number
- // otherwise it's the count (pre-3.1 indexes)
- int firstInt = stream.readVInt();
-
- final int count;
- final boolean stripSegmentName;
- if (firstInt < CompoundFileWriter.FORMAT_PRE_VERSION) {
- if (firstInt < CompoundFileWriter.FORMAT_CURRENT) {
- throw new CorruptIndexException("Incompatible format version: "
- + firstInt + " expected " + CompoundFileWriter.FORMAT_CURRENT);
- }
- // It's a post-3.1 index, read the count.
- count = stream.readVInt();
- stripSegmentName = false;
- } else {
- count = firstInt;
- stripSegmentName = true;
- }
-
- // read the directory and init files
- FileEntry entry = null;
- for (int i=0; i<count; i++) {
- long offset = stream.readLong();
- String id = stream.readString();
-
- if (stripSegmentName) {
- // Fix the id to not include the segment names. This is relevant for
- // pre-3.1 indexes.
- id = IndexFileNames.stripSegmentName(id);
- }
-
- if (entry != null) {
- // set length of the previous entry
- entry.length = offset - entry.offset;
- }
-
- entry = new FileEntry();
- entry.offset = offset;
- entries.put(id, entry);
- }
-
- // set the length of the final entry
- if (entry != null) {
- entry.length = stream.length() - entry.offset;
- }
-
- success = true;
-
- } finally {
- if (!success && (stream != null)) {
- try {
- stream.close();
- } catch (IOException e) { }
- }
+ assert !(dir instanceof CompoundFileReader) : "compound file inside of compound file: " + name;
+ directory = dir;
+ fileName = name;
+ this.readBufferSize = readBufferSize;
+
+ boolean success = false;
+
+ try {
+ stream = dir.openInput(name, readBufferSize);
+
+ // read the first VInt. If it is negative, it's the version number
+ // otherwise it's the count (pre-3.1 indexes)
+ int firstInt = stream.readVInt();
+
+ final int count;
+ final boolean stripSegmentName;
+ if (firstInt < CompoundFileWriter.FORMAT_PRE_VERSION) {
+ if (firstInt < CompoundFileWriter.FORMAT_CURRENT) {
+ throw new CorruptIndexException("Incompatible format version: "
+ + firstInt + " expected " + CompoundFileWriter.FORMAT_CURRENT);
}
- }
-
- public Directory getDirectory() {
- return directory;
- }
-
- public String getName() {
- return fileName;
- }
-
- @Override
- public synchronized void close() throws IOException {
- if (stream == null)
- throw new IOException("Already closed");
-
- entries.clear();
- stream.close();
- stream = null;
- }
-
- @Override
- public synchronized IndexInput openInput(String id)
- throws IOException
- {
- // Default to readBufferSize passed in when we were opened
- return openInput(id, readBufferSize);
- }
-
- @Override
- public synchronized IndexInput openInput(String id, int readBufferSize)
- throws IOException
- {
- if (stream == null)
- throw new IOException("Stream closed");
+ // It's a post-3.1 index, read the count.
+ count = stream.readVInt();
+ stripSegmentName = false;
+ } else {
+ count = firstInt;
+ stripSegmentName = true;
+ }
+
+ // read the directory and init files
+ FileEntry entry = null;
+ for (int i=0; i<count; i++) {
+ long offset = stream.readLong();
+ String id = stream.readString();
- id = IndexFileNames.stripSegmentName(id);
- final FileEntry entry = entries.get(id);
- if (entry == null)
- throw new IOException("No sub-file with id " + id + " found (files: " + entries.keySet() + ")");
-
- return new CSIndexInput(stream, entry.offset, entry.length, readBufferSize);
- }
-
- /** Returns an array of strings, one for each file in the directory. */
- @Override
- public String[] listAll() {
- String[] res = entries.keySet().toArray(new String[entries.size()]);
- // Add the segment name
- String seg = fileName.substring(0, fileName.indexOf('.'));
- for (int i = 0; i < res.length; i++) {
- res[i] = seg + res[i];
+ if (stripSegmentName) {
+ // Fix the id to not include the segment names. This is relevant for
+ // pre-3.1 indexes.
+ id = IndexFileNames.stripSegmentName(id);
}
- return res;
- }
-
- /** Returns true iff a file with the given name exists. */
- @Override
- public boolean fileExists(String name) {
- return entries.containsKey(IndexFileNames.stripSegmentName(name));
+
+ if (entry != null) {
+ // set length of the previous entry
+ entry.length = offset - entry.offset;
+ }
+
+ entry = new FileEntry();
+ entry.offset = offset;
+ entries.put(id, entry);
+ }
+
+ // set the length of the final entry
+ if (entry != null) {
+ entry.length = stream.length() - entry.offset;
+ }
+
+ success = true;
+
+ } finally {
+ if (!success && (stream != null)) {
+ try {
+ stream.close();
+ } catch (IOException e) { }
+ }
}
-
- /** Returns the time the compound file was last modified. */
- @Override
- public long fileModified(String name) throws IOException {
- return directory.fileModified(fileName);
+ }
+
+ public Directory getDirectory() {
+ return directory;
+ }
+
+ public String getName() {
+ return fileName;
+ }
+
+ @Override
+ public synchronized void close() throws IOException {
+ if (stream == null)
+ throw new IOException("Already closed");
+
+ entries.clear();
+ stream.close();
+ stream = null;
+ }
+
+ @Override
+ public synchronized IndexInput openInput(String id) throws IOException {
+ // Default to readBufferSize passed in when we were opened
+ return openInput(id, readBufferSize);
+ }
+
+ @Override
+ public synchronized IndexInput openInput(String id, int readBufferSize) throws IOException {
+ if (stream == null)
+ throw new IOException("Stream closed");
+
+ id = IndexFileNames.stripSegmentName(id);
+ final FileEntry entry = entries.get(id);
+ if (entry == null)
+ throw new IOException("No sub-file with id " + id + " found (files: " + entries.keySet() + ")");
+
+ return new CSIndexInput(stream, entry.offset, entry.length, readBufferSize);
+ }
+
+ /** Returns an array of strings, one for each file in the directory. */
+ @Override
+ public String[] listAll() {
+ String[] res = entries.keySet().toArray(new String[entries.size()]);
+ // Add the segment name
+ String seg = fileName.substring(0, fileName.indexOf('.'));
+ for (int i = 0; i < res.length; i++) {
+ res[i] = seg + res[i];
}
-
- /** Not implemented
- * @throws UnsupportedOperationException */
- @Override
- public void deleteFile(String name)
- {
- throw new UnsupportedOperationException();
+ return res;
+ }
+
+ /** Returns true iff a file with the given name exists. */
+ @Override
+ public boolean fileExists(String name) {
+ return entries.containsKey(IndexFileNames.stripSegmentName(name));
+ }
+
+ /** Returns the time the compound file was last modified. */
+ @Override
+ public long fileModified(String name) throws IOException {
+ return directory.fileModified(fileName);
+ }
+
+ /** Not implemented
+ * @throws UnsupportedOperationException */
+ @Override
+ public void deleteFile(String name) {
+ throw new UnsupportedOperationException();
+ }
+
+ /** Not implemented
+ * @throws UnsupportedOperationException */
+ public void renameFile(String from, String to) {
+ throw new UnsupportedOperationException();
+ }
+
+ /** Returns the length of a file in the directory.
+ * @throws IOException if the file does not exist */
+ @Override
+ public long fileLength(String name) throws IOException {
+ FileEntry e = entries.get(IndexFileNames.stripSegmentName(name));
+ if (e == null)
+ throw new FileNotFoundException(name);
+ return e.length;
+ }
+
+ /** Not implemented
+ * @throws UnsupportedOperationException */
+ @Override
+ public IndexOutput createOutput(String name) {
+ throw new UnsupportedOperationException();
+ }
+
+ @Override
+ public void sync(Collection<String> names) throws IOException {
+ }
+
+ /** Not implemented
+ * @throws UnsupportedOperationException */
+ @Override
+ public Lock makeLock(String name) {
+ throw new UnsupportedOperationException();
+ }
+
+ /** Implementation of an IndexInput that reads from a portion of the
+ * compound file. The visibility is left as "package" *only* because
+ * this helps with testing since JUnit test cases in a different class
+ * can then access package fields of this class.
+ */
+ static final class CSIndexInput extends BufferedIndexInput {
+ IndexInput base;
+ long fileOffset;
+ long length;
+
+ CSIndexInput(final IndexInput base, final long fileOffset, final long length) {
+ this(base, fileOffset, length, BufferedIndexInput.BUFFER_SIZE);
}
-
- /** Not implemented
- * @throws UnsupportedOperationException */
- public void renameFile(String from, String to)
- {
- throw new UnsupportedOperationException();
+
+ CSIndexInput(final IndexInput base, final long fileOffset, final long length, int readBufferSize) {
+ super(readBufferSize);
+ this.base = (IndexInput)base.clone();
+ this.fileOffset = fileOffset;
+ this.length = length;
}
-
- /** Returns the length of a file in the directory.
- * @throws IOException if the file does not exist */
+
@Override
- public long fileLength(String name) throws IOException {
- FileEntry e = entries.get(IndexFileNames.stripSegmentName(name));
- if (e == null)
- throw new FileNotFoundException(name);
- return e.length;
+ public Object clone() {
+ CSIndexInput clone = (CSIndexInput)super.clone();
+ clone.base = (IndexInput)base.clone();
+ clone.fileOffset = fileOffset;
+ clone.length = length;
+ return clone;
}
-
- /** Not implemented
- * @throws UnsupportedOperationException */
+
+ /** Expert: implements buffer refill. Reads bytes from the current
+ * position in the input.
+ * @param b the array to read bytes into
+ * @param offset the offset in the array to start storing bytes
+ * @param len the number of bytes to read
+ */
@Override
- public IndexOutput createOutput(String name)
- {
- throw new UnsupportedOperationException();
+ protected void readInternal(byte[] b, int offset, int len) throws IOException {
+ long start = getFilePointer();
+ if(start + len > length)
+ throw new IOException("read past EOF");
+ base.seek(fileOffset + start);
+ base.readBytes(b, offset, len, false);
}
-
+
+ /** Expert: implements seek. Sets current position in this file, where
+ * the next {@link #readInternal(byte[],int,int)} will occur.
+ * @see #readInternal(byte[],int,int)
+ */
@Override
- public void sync(Collection<String> names) throws IOException {
+ protected void seekInternal(long pos) {}
+
+ /** Closes the stream to further operations. */
+ @Override
+ public void close() throws IOException {
+ base.close();
}
-
- /** Not implemented
- * @throws UnsupportedOperationException */
+
@Override
- public Lock makeLock(String name)
- {
- throw new UnsupportedOperationException();
+ public long length() {
+ return length;
}
-
- /** Implementation of an IndexInput that reads from a portion of the
- * compound file. The visibility is left as "package" *only* because
- * this helps with testing since JUnit test cases in a different class
- * can then access package fields of this class.
- */
- static final class CSIndexInput extends BufferedIndexInput {
-
- IndexInput base;
- long fileOffset;
- long length;
-
- CSIndexInput(final IndexInput base, final long fileOffset, final long length)
- {
- this(base, fileOffset, length, BufferedIndexInput.BUFFER_SIZE);
- }
-
- CSIndexInput(final IndexInput base, final long fileOffset, final long length, int readBufferSize)
- {
- super(readBufferSize);
- this.base = (IndexInput)base.clone();
- this.fileOffset = fileOffset;
- this.length = length;
- }
-
- @Override
- public Object clone() {
- CSIndexInput clone = (CSIndexInput)super.clone();
- clone.base = (IndexInput)base.clone();
- clone.fileOffset = fileOffset;
- clone.length = length;
- return clone;
- }
-
- /** Expert: implements buffer refill. Reads bytes from the current
- * position in the input.
- * @param b the array to read bytes into
- * @param offset the offset in the array to start storing bytes
- * @param len the number of bytes to read
- */
- @Override
- protected void readInternal(byte[] b, int offset, int len)
- throws IOException
- {
- long start = getFilePointer();
- if(start + len > length)
- throw new IOException("read past EOF");
- base.seek(fileOffset + start);
- base.readBytes(b, offset, len, false);
- }
-
- /** Expert: implements seek. Sets current position in this file, where
- * the next {@link #readInternal(byte[],int,int)} will occur.
- * @see #readInternal(byte[],int,int)
- */
- @Override
- protected void seekInternal(long pos) {}
-
- /** Closes the stream to further operations. */
- @Override
- public void close() throws IOException {
- base.close();
- }
-
- @Override
- public long length() {
- return length;
- }
-
- @Override
- public void copyBytes(IndexOutput out, long numBytes) throws IOException {
- // Copy first whatever is in the buffer
- numBytes -= flushBuffer(out, numBytes);
-
- // If there are more bytes left to copy, delegate the copy task to the
- // base IndexInput, in case it can do an optimized copy.
- if (numBytes > 0) {
- long start = getFilePointer();
- if (start + numBytes > length) {
- throw new IOException("read past EOF");
- }
- base.seek(fileOffset + start);
- base.copyBytes(out, numBytes);
- }
+
+ @Override
+ public void copyBytes(IndexOutput out, long numBytes) throws IOException {
+ // Copy first whatever is in the buffer
+ numBytes -= flushBuffer(out, numBytes);
+
+ // If there are more bytes left to copy, delegate the copy task to the
+ // base IndexInput, in case it can do an optimized copy.
+ if (numBytes > 0) {
+ long start = getFilePointer();
+ if (start + numBytes > length) {
+ throw new IOException("read past EOF");
}
-
+ base.seek(fileOffset + start);
+ base.copyBytes(out, numBytes);
+ }
}
-
+ }
}
Modified: lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/index/DocumentsWriterFlushControl.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/index/DocumentsWriterFlushControl.java?rev=1135759&r1=1135758&r2=1135759&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/index/DocumentsWriterFlushControl.java (original)
+++ lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/index/DocumentsWriterFlushControl.java Tue Jun 14 19:26:27 2011
@@ -99,7 +99,7 @@ public final class DocumentsWriterFlushC
final long ram = flushBytes + activeBytes;
// take peakDelta into account - worst case is that all flushing, pending and blocked DWPT had maxMem and the last doc had the peakDelta
final long expected = (long)(2 * (maxConfiguredRamBuffer * 1024 * 1024)) + ((numPending + numFlushingDWPT() + numBlockedFlushes()) * peakDelta);
- assert ram <= expected : "ram was " + ram + " expected: " + expected + " flush mem: " + flushBytes + " active: " + activeBytes ;
+ assert ram <= expected : "ram was " + ram + " expected: " + expected + " flush mem: " + flushBytes + " active: " + activeBytes + " pending: " + numPending + " flushing: " + numFlushingDWPT() + " blocked: " + numBlockedFlushes() + " peakDelta: " + peakDelta ;
}
return true;
}
Modified: lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/index/IndexWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/index/IndexWriter.java?rev=1135759&r1=1135758&r2=1135759&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/index/IndexWriter.java (original)
+++ lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/index/IndexWriter.java Tue Jun 14 19:26:27 2011
@@ -55,6 +55,7 @@ import org.apache.lucene.util.Constants;
import org.apache.lucene.util.StringHelper;
import org.apache.lucene.util.ThreadInterruptedException;
import org.apache.lucene.util.MapBackedSet;
+import org.apache.lucene.util.TwoPhaseCommit;
/**
An <code>IndexWriter</code> creates and maintains an index.
@@ -190,7 +191,7 @@ import org.apache.lucene.util.MapBackedS
* referenced by the "front" of the index). For this, IndexFileDeleter
* keeps track of the last non commit checkpoint.
*/
-public class IndexWriter implements Closeable {
+public class IndexWriter implements Closeable, TwoPhaseCommit {
/**
* Name of the write lock in the index.
*/
@@ -3866,6 +3867,7 @@ public class IndexWriter implements Clos
}
synchronized boolean nrtIsCurrent(SegmentInfos infos) {
+ //System.out.println("IW.nrtIsCurrent " + (infos.version == segmentInfos.version && !docWriter.anyChanges() && !bufferedDeletesStream.any()));
return infos.version == segmentInfos.version && !docWriter.anyChanges() && !bufferedDeletesStream.any();
}
Modified: lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/index/MergePolicy.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/index/MergePolicy.java?rev=1135759&r1=1135758&r2=1135759&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/index/MergePolicy.java (original)
+++ lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/index/MergePolicy.java Tue Jun 14 19:26:27 2011
@@ -51,7 +51,7 @@ import java.util.Set;
* ConcurrentMergeScheduler} they will be run concurrently.</p>
*
* <p>The default MergePolicy is {@link
- * LogByteSizeMergePolicy}.</p>
+ * TieredMergePolicy}.</p>
*
* @lucene.experimental
*/
Modified: lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/index/values/FixedStraightBytesImpl.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/index/values/FixedStraightBytesImpl.java?rev=1135759&r1=1135758&r2=1135759&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/index/values/FixedStraightBytesImpl.java (original)
+++ lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/index/values/FixedStraightBytesImpl.java Tue Jun 14 19:26:27 2011
@@ -26,6 +26,7 @@ import org.apache.lucene.store.Directory
import org.apache.lucene.store.IndexInput;
import org.apache.lucene.util.AttributeSource;
import org.apache.lucene.util.BytesRef;
+import org.apache.lucene.util.IOUtils;
import org.apache.lucene.util.PagedBytes;
// Simplest storage: stores fixed length byte[] per
@@ -45,11 +46,10 @@ class FixedStraightBytesImpl {
private int lastDocID = -1;
private byte[] oneRecord;
- protected Writer(Directory dir, String id) throws IOException {
+ public Writer(Directory dir, String id) throws IOException {
super(dir, id, CODEC_NAME, VERSION_CURRENT, false, null, null);
}
- // TODO - impl bulk copy here!
@Override
public void add(int docID, BytesRef bytes) throws IOException {
@@ -66,13 +66,6 @@ class FixedStraightBytesImpl {
datOut.writeBytes(bytes.bytes, bytes.offset, bytes.length);
}
- /*
- * (non-Javadoc)
- *
- * @see
- * org.apache.lucene.index.values.Writer#merge(org.apache.lucene.index.values
- * .Writer.MergeState)
- */
@Override
protected void merge(MergeState state) throws IOException {
if (state.bits == null && state.reader instanceof Reader) {
@@ -96,8 +89,9 @@ class FixedStraightBytesImpl {
}
lastDocID += maxDocs - 1;
- } else
+ } else {
super.merge(state);
+ }
}
// Fills up to but not including this docID
@@ -126,7 +120,7 @@ class FixedStraightBytesImpl {
return oneRecord == null ? 0 : oneRecord.length;
}
}
-
+
public static class Reader extends BytesReaderBase {
private final int size;
private final int maxDoc;
@@ -139,19 +133,67 @@ class FixedStraightBytesImpl {
@Override
public Source load() throws IOException {
- return new Source(cloneData(), size, maxDoc);
+ return size == 1 ? new SingleByteSource(cloneData(), maxDoc) :
+ new StraightBytesSource(cloneData(), size, maxDoc);
}
@Override
public void close() throws IOException {
datIn.close();
}
+
+ // specialized version for single bytes
+ private static class SingleByteSource extends Source {
+ private final int maxDoc;
+ private final byte[] data;
- private static class Source extends BytesBaseSource {
+ public SingleByteSource(IndexInput datIn, int maxDoc) throws IOException {
+ this.maxDoc = maxDoc;
+ try {
+ data = new byte[maxDoc];
+ datIn.readBytes(data, 0, data.length, false);
+ } finally {
+ IOUtils.closeSafely(false, datIn);
+ }
+
+ }
+
+ @Override
+ public BytesRef getBytes(int docID, BytesRef bytesRef) {
+ bytesRef.length = 1;
+ bytesRef.bytes = data;
+ bytesRef.offset = docID;
+ return bytesRef;
+ }
+
+ @Override
+ public ValueType type() {
+ return ValueType.BYTES_FIXED_STRAIGHT;
+ }
+
+ @Override
+ public ValuesEnum getEnum(AttributeSource attrSource) throws IOException {
+ return new SourceEnum(attrSource, type(), this, maxDoc) {
+ @Override
+ public int advance(int target) throws IOException {
+ if (target >= numDocs) {
+ return pos = NO_MORE_DOCS;
+ }
+ bytesRef.length = 1;
+ bytesRef.bytes = data;
+ bytesRef.offset = target;
+ return pos = target;
+ }
+ };
+ }
+
+ }
+
+ private static class StraightBytesSource extends BytesBaseSource {
private final int size;
private final int maxDoc;
- public Source(IndexInput datIn, int size, int maxDoc)
+ public StraightBytesSource(IndexInput datIn, int size, int maxDoc)
throws IOException {
super(datIn, null, new PagedBytes(PAGED_BYTES_BITS), size * maxDoc);
this.size = size;
@@ -162,10 +204,10 @@ class FixedStraightBytesImpl {
public BytesRef getBytes(int docID, BytesRef bytesRef) {
return data.fillSlice(bytesRef, docID * size, size);
}
-
+
@Override
public int getValueCount() {
- throw new UnsupportedOperationException();
+ return maxDoc;
}
@Override
Modified: lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/store/FSDirectory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/store/FSDirectory.java?rev=1135759&r1=1135758&r2=1135759&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/store/FSDirectory.java (original)
+++ lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/store/FSDirectory.java Tue Jun 14 19:26:27 2011
@@ -173,7 +173,7 @@ public abstract class FSDirectory extend
/** Just like {@link #open(File)}, but allows you to
* also specify a custom {@link LockFactory}. */
public static FSDirectory open(File path, LockFactory lockFactory) throws IOException {
- if ((Constants.WINDOWS || Constants.SUN_OS)
+ if ((Constants.WINDOWS || Constants.SUN_OS || Constants.LINUX)
&& Constants.JRE_IS_64BIT && MMapDirectory.UNMAP_SUPPORTED) {
return new MMapDirectory(path, lockFactory);
} else if (Constants.WINDOWS) {
Modified: lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/store/MMapDirectory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/store/MMapDirectory.java?rev=1135759&r1=1135758&r2=1135759&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/store/MMapDirectory.java (original)
+++ lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/store/MMapDirectory.java Tue Jun 14 19:26:27 2011
@@ -79,8 +79,8 @@ import org.apache.lucene.util.Constants;
*/
public class MMapDirectory extends FSDirectory {
private boolean useUnmapHack = UNMAP_SUPPORTED;
- public static final int DEFAULT_MAX_BUFF = Constants.JRE_IS_64BIT ? Integer.MAX_VALUE : (256 * 1024 * 1024);
- private int maxBBuf = DEFAULT_MAX_BUFF;
+ public static final int DEFAULT_MAX_BUFF = Constants.JRE_IS_64BIT ? (1 << 30) : (1 << 28);
+ private int chunkSizePower;
/** Create a new MMapDirectory for the named location.
*
@@ -91,6 +91,7 @@ public class MMapDirectory extends FSDir
*/
public MMapDirectory(File path, LockFactory lockFactory) throws IOException {
super(path, lockFactory);
+ setMaxChunkSize(DEFAULT_MAX_BUFF);
}
/** Create a new MMapDirectory for the named location and {@link NativeFSLockFactory}.
@@ -100,6 +101,7 @@ public class MMapDirectory extends FSDir
*/
public MMapDirectory(File path) throws IOException {
super(path, null);
+ setMaxChunkSize(DEFAULT_MAX_BUFF);
}
/**
@@ -180,23 +182,28 @@ public class MMapDirectory extends FSDir
* Especially on 32 bit platform, the address space can be very fragmented,
* so large index files cannot be mapped.
* Using a lower chunk size makes the directory implementation a little
- * bit slower (as the correct chunk must be resolved on each seek)
+ * bit slower (as the correct chunk may be resolved on lots of seeks)
* but the chance is higher that mmap does not fail. On 64 bit
- * Java platforms, this parameter should always be {@link Integer#MAX_VALUE},
+ * Java platforms, this parameter should always be {@code 1 << 30},
* as the address space is big enough.
+ * <b>Please note:</b> This method always rounds down the chunk size
+ * to a power of 2.
*/
- public void setMaxChunkSize(final int maxBBuf) {
- if (maxBBuf<=0)
+ public final void setMaxChunkSize(final int maxChunkSize) {
+ if (maxChunkSize <= 0)
throw new IllegalArgumentException("Maximum chunk size for mmap must be >0");
- this.maxBBuf=maxBBuf;
+ //System.out.println("Requested chunk size: "+maxChunkSize);
+ this.chunkSizePower = 31 - Integer.numberOfLeadingZeros(maxChunkSize);
+ assert this.chunkSizePower >= 0 && this.chunkSizePower <= 30;
+ //System.out.println("Got chunk size: "+getMaxChunkSize());
}
/**
* Returns the current mmap chunk size.
* @see #setMaxChunkSize
*/
- public int getMaxChunkSize() {
- return maxBBuf;
+ public final int getMaxChunkSize() {
+ return 1 << chunkSizePower;
}
/** Creates an IndexInput for the file with the given name. */
@@ -206,152 +213,55 @@ public class MMapDirectory extends FSDir
File f = new File(getDirectory(), name);
RandomAccessFile raf = new RandomAccessFile(f, "r");
try {
- return (raf.length() <= maxBBuf)
- ? (IndexInput) new MMapIndexInput(raf)
- : (IndexInput) new MultiMMapIndexInput(raf, maxBBuf);
+ return new MMapIndexInput(raf, chunkSizePower);
} finally {
raf.close();
}
}
- private class MMapIndexInput extends IndexInput {
-
- private ByteBuffer buffer;
- private final long length;
- private boolean isClone = false;
-
- private MMapIndexInput(RandomAccessFile raf) throws IOException {
- this.length = raf.length();
- this.buffer = raf.getChannel().map(MapMode.READ_ONLY, 0, length);
- }
-
- @Override
- public byte readByte() throws IOException {
- try {
- return buffer.get();
- } catch (BufferUnderflowException e) {
- throw new IOException("read past EOF");
- }
- }
-
- @Override
- public void readBytes(byte[] b, int offset, int len) throws IOException {
- try {
- buffer.get(b, offset, len);
- } catch (BufferUnderflowException e) {
- throw new IOException("read past EOF");
- }
- }
-
- @Override
- public short readShort() throws IOException {
- try {
- return buffer.getShort();
- } catch (BufferUnderflowException e) {
- throw new IOException("read past EOF");
- }
- }
-
- @Override
- public int readInt() throws IOException {
- try {
- return buffer.getInt();
- } catch (BufferUnderflowException e) {
- throw new IOException("read past EOF");
- }
- }
-
- @Override
- public long readLong() throws IOException {
- try {
- return buffer.getLong();
- } catch (BufferUnderflowException e) {
- throw new IOException("read past EOF");
- }
- }
-
- @Override
- public long getFilePointer() {
- return buffer.position();
- }
-
- @Override
- public void seek(long pos) throws IOException {
- buffer.position((int)pos);
- }
-
- @Override
- public long length() {
- return length;
- }
-
- @Override
- public Object clone() {
- if (buffer == null)
- throw new AlreadyClosedException("MMapIndexInput already closed");
- MMapIndexInput clone = (MMapIndexInput)super.clone();
- clone.isClone = true;
- clone.buffer = buffer.duplicate();
- return clone;
- }
-
- @Override
- public void close() throws IOException {
- // unmap the buffer (if enabled) and at least unset it for GC
- try {
- if (isClone || buffer == null) return;
- cleanMapping(buffer);
- } finally {
- buffer = null;
- }
- }
- }
-
// Because Java's ByteBuffer uses an int to address the
// values, it's necessary to access a file >
// Integer.MAX_VALUE in size using multiple byte buffers.
- private class MultiMMapIndexInput extends IndexInput {
+ private final class MMapIndexInput extends IndexInput {
private ByteBuffer[] buffers;
- private int[] bufSizes; // keep here, ByteBuffer.size() method is optional
- private final long length;
+ private final long length, chunkSizeMask, chunkSize;
+ private final int chunkSizePower;
private int curBufIndex;
- private final int maxBufSize;
private ByteBuffer curBuf; // redundant for speed: buffers[curBufIndex]
private boolean isClone = false;
- public MultiMMapIndexInput(RandomAccessFile raf, int maxBufSize)
- throws IOException {
+ MMapIndexInput(RandomAccessFile raf, int chunkSizePower) throws IOException {
this.length = raf.length();
- this.maxBufSize = maxBufSize;
+ this.chunkSizePower = chunkSizePower;
+ this.chunkSize = 1L << chunkSizePower;
+ this.chunkSizeMask = chunkSize - 1L;
- if (maxBufSize <= 0)
- throw new IllegalArgumentException("Non positive maxBufSize: "
- + maxBufSize);
+ if (chunkSizePower < 0 || chunkSizePower > 30)
+ throw new IllegalArgumentException("Invalid chunkSizePower used for ByteBuffer size: " + chunkSizePower);
- if ((length / maxBufSize) > Integer.MAX_VALUE)
- throw new IllegalArgumentException
- ("RandomAccessFile too big for maximum buffer size: "
- + raf.toString());
+ if ((length >>> chunkSizePower) >= Integer.MAX_VALUE)
+ throw new IllegalArgumentException("RandomAccessFile too big for chunk size: " + raf.toString());
- int nrBuffers = (int) (length / maxBufSize);
- if (((long) nrBuffers * maxBufSize) <= length) nrBuffers++;
+ // we always allocate one more buffer, the last one may be a 0 byte one
+ final int nrBuffers = (int) (length >>> chunkSizePower) + 1;
+
+ //System.out.println("length="+length+", chunkSizePower=" + chunkSizePower + ", chunkSizeMask=" + chunkSizeMask + ", nrBuffers=" + nrBuffers);
this.buffers = new ByteBuffer[nrBuffers];
- this.bufSizes = new int[nrBuffers];
- long bufferStart = 0;
+ long bufferStart = 0L;
FileChannel rafc = raf.getChannel();
for (int bufNr = 0; bufNr < nrBuffers; bufNr++) {
- int bufSize = (length > (bufferStart + maxBufSize))
- ? maxBufSize
- : (int) (length - bufferStart);
- this.buffers[bufNr] = rafc.map(MapMode.READ_ONLY,bufferStart,bufSize);
- this.bufSizes[bufNr] = bufSize;
+ int bufSize = (int) ( (length > (bufferStart + chunkSize))
+ ? chunkSize
+ : (length - bufferStart)
+ );
+ this.buffers[bufNr] = rafc.map(MapMode.READ_ONLY, bufferStart, bufSize);
bufferStart += bufSize;
}
seek(0L);
@@ -362,11 +272,13 @@ public class MMapDirectory extends FSDir
try {
return curBuf.get();
} catch (BufferUnderflowException e) {
- curBufIndex++;
- if (curBufIndex >= buffers.length)
- throw new IOException("read past EOF");
- curBuf = buffers[curBufIndex];
- curBuf.position(0);
+ do {
+ curBufIndex++;
+ if (curBufIndex >= buffers.length)
+ throw new IOException("read past EOF");
+ curBuf = buffers[curBufIndex];
+ curBuf.position(0);
+ } while (!curBuf.hasRemaining());
return curBuf.get();
}
}
@@ -421,15 +333,28 @@ public class MMapDirectory extends FSDir
@Override
public long getFilePointer() {
- return ((long) curBufIndex * maxBufSize) + curBuf.position();
+ return (((long) curBufIndex) << chunkSizePower) + curBuf.position();
}
@Override
public void seek(long pos) throws IOException {
- curBufIndex = (int) (pos / maxBufSize);
- curBuf = buffers[curBufIndex];
- int bufOffset = (int) (pos - ((long) curBufIndex * maxBufSize));
- curBuf.position(bufOffset);
+ // we use >> here to preserve negative, so we will catch AIOOBE:
+ final int bi = (int) (pos >> chunkSizePower);
+ try {
+ final ByteBuffer b = buffers[bi];
+ b.position((int) (pos & chunkSizeMask));
+ // write values, on exception all is unchanged
+ this.curBufIndex = bi;
+ this.curBuf = b;
+ } catch (ArrayIndexOutOfBoundsException aioobe) {
+ if (pos < 0L)
+ throw new IllegalArgumentException("Seeking to negative position");
+ throw new IOException("seek past EOF");
+ } catch (IllegalArgumentException iae) {
+ if (pos < 0L)
+ throw new IllegalArgumentException("Seeking to negative position");
+ throw new IOException("seek past EOF");
+ }
}
@Override
@@ -440,11 +365,10 @@ public class MMapDirectory extends FSDir
@Override
public Object clone() {
if (buffers == null)
- throw new AlreadyClosedException("MultiMMapIndexInput already closed");
- MultiMMapIndexInput clone = (MultiMMapIndexInput)super.clone();
+ throw new AlreadyClosedException("MMapIndexInput already closed");
+ final MMapIndexInput clone = (MMapIndexInput)super.clone();
clone.isClone = true;
clone.buffers = new ByteBuffer[buffers.length];
- // No need to clone bufSizes.
// Since most clones will use only one buffer, duplicate() could also be
// done lazy in clones, e.g. when adapting curBuf.
for (int bufNr = 0; bufNr < buffers.length; bufNr++) {
@@ -453,9 +377,7 @@ public class MMapDirectory extends FSDir
try {
clone.seek(getFilePointer());
} catch(IOException ioe) {
- RuntimeException newException = new RuntimeException(ioe);
- newException.initCause(ioe);
- throw newException;
+ throw new RuntimeException("Should never happen", ioe);
}
return clone;
}
Modified: lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/util/fst/FST.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/util/fst/FST.java?rev=1135759&r1=1135758&r2=1135759&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/util/fst/FST.java (original)
+++ lucene/dev/branches/solr2452/lucene/src/java/org/apache/lucene/util/fst/FST.java Tue Jun 14 19:26:27 2011
@@ -490,7 +490,7 @@ public class FST<T> {
if (!targetHasArcs(follow)) {
//System.out.println(" end node");
assert follow.isFinal();
- arc.label = -1;
+ arc.label = END_LABEL;
arc.output = follow.nextFinalOutput;
arc.flags = BIT_LAST_ARC;
return arc;
@@ -544,7 +544,7 @@ public class FST<T> {
//System.out.println(" readFirstTarget follow.target=" + follow.target + " isFinal=" + follow.isFinal());
if (follow.isFinal()) {
// Insert "fake" final first arc:
- arc.label = -1;
+ arc.label = END_LABEL;
arc.output = follow.nextFinalOutput;
if (follow.target <= 0) {
arc.flags = BIT_LAST_ARC;
@@ -599,7 +599,7 @@ public class FST<T> {
/** In-place read; returns the arc. */
public Arc<T> readNextArc(Arc<T> arc) throws IOException {
- if (arc.label == -1) {
+ if (arc.label == END_LABEL) {
// This was a fake inserted "final" arc
if (arc.nextArc <= 0) {
// This arc went to virtual final node, ie has no outgoing arcs
Modified: lucene/dev/branches/solr2452/lucene/src/site/changes/changes2html.pl
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/lucene/src/site/changes/changes2html.pl?rev=1135759&r1=1135758&r2=1135759&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/lucene/src/site/changes/changes2html.pl (original)
+++ lucene/dev/branches/solr2452/lucene/src/site/changes/changes2html.pl Tue Jun 14 19:26:27 2011
@@ -23,7 +23,6 @@
use strict;
use warnings;
-use JSON;
use LWP::Simple;
my $project_info_url = 'https://issues.apache.org/jira/rest/api/2.0.alpha1/project/LUCENE';
@@ -675,8 +674,8 @@ sub setup_release_dates {
'2.4.0' => '2008-10-06', '2.4.1' => '2009-03-09',
'2.9.0' => '2009-09-23', '2.9.1' => '2009-11-06',
'3.0.0' => '2009-11-25');
- my $project_info_json = get($project_info_url);
- my $project_info = decode_json($project_info_json);
+ my $project_info_json = get($project_info_url) || die "Unable to download $project_info_url";
+ my $project_info = json2perl($project_info_json);
for my $version (@{$project_info->{versions}}) {
if ($version->{releaseDate}) {
my $date = substr($version->{releaseDate}, 0, 10);
@@ -851,5 +850,16 @@ sub setup_bugzilla_jira_map {
36628 => 432);
}
+#
+# json2perl
+#
+# Converts a JSON string to the equivalent Perl data structure
+#
+sub json2perl {
+ my $json_string = shift;
+ $json_string =~ s/(:\s*)(true|false)/$1"$2"/g;
+ $json_string =~ s/":/",/g;
+ return eval $json_string;
+}
1;
Modified: lucene/dev/branches/solr2452/lucene/src/site/forrest.properties
URL: http://svn.apache.org/viewvc/lucene/dev/branches/solr2452/lucene/src/site/forrest.properties?rev=1135759&r1=1135758&r2=1135759&view=diff
==============================================================================
--- lucene/dev/branches/solr2452/lucene/src/site/forrest.properties (original)
+++ lucene/dev/branches/solr2452/lucene/src/site/forrest.properties Tue Jun 14 19:26:27 2011
@@ -123,7 +123,7 @@ project.configfile=${project.home}/src/d
# a production environment it is recomended that you specify a known working
# version.
# Run "forrest available-plugins" for a list of plug-ins currently available
-project.required.plugins=org.apache.forrest.plugin.output.pdf
+#project.required.plugins=org.apache.forrest.plugin.output.pdf
# Proxy configuration
# proxy.host=