lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From busc...@apache.org
Subject svn commit: r966819 [17/20] - in /lucene/dev/branches/realtime_search: ./ lucene/ lucene/backwards/ lucene/contrib/ lucene/contrib/benchmark/conf/ lucene/contrib/benchmark/src/java/org/apache/lucene/benchmark/byTask/tasks/ lucene/contrib/benchmark/src/...
Date Thu, 22 Jul 2010 19:34:52 GMT
Modified: lucene/dev/branches/realtime_search/solr/site/index.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/site/index.html?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/site/index.html (original)
+++ lucene/dev/branches/realtime_search/solr/site/index.html Thu Jul 22 19:34:35 2010
@@ -66,7 +66,7 @@
 <a class="selected" href="index.html">Main</a>
 </li>
 <li>
-<a class="unselected" href="http://wiki.apache.org/solr">Wiki</a>
+<a class="unselected" href="http://wiki.apache.org/solr/FrontPage">Wiki</a>
 </li>
 </ul>
 <!--+
@@ -119,7 +119,7 @@ document.write("Last Published: " + docu
 <a href="tutorial.html">Tutorial</a>
 </div>
 <div class="menuitem">
-<a href="http://wiki.apache.org/solr/">Docs (Wiki)</a>
+<a href="http://wiki.apache.org/solr/FrontPage">Docs (Wiki)</a>
 </div>
 <div class="menuitem">
 <a href="http://wiki.apache.org/solr/FAQ">FAQ</a>
@@ -192,6 +192,9 @@ document.write("Last Published: " + docu
 <a href="#news">News</a>
 <ul class="minitoc">
 <li>
+<a href="#25+June+2010+-+Solr+1.4.1+Released">25 June 2010 - Solr 1.4.1 Released</a>
+</li>
+<li>
 <a href="#7+May+2010+-+Apache+Lucene+Eurocon+2010+Coming+to+Prague+May+18-21">7 May 2010 - Apache Lucene Eurocon 2010 Coming to Prague May 18-21</a>
 </li>
 <li>
@@ -274,7 +277,7 @@ customization is required.
         See the complete <a href="features.html">feature list</a> for more details.
       </p>
 <p>
-        For more information about Solr, please see the <a href="http://wiki.apache.org/solr">Solr wiki</a>.
+        For more information about Solr, please see the <a href="http://wiki.apache.org/solr/FrontPage">Solr wiki</a>.
       </p>
 </div>
     
@@ -289,7 +292,7 @@ customization is required.
 <li>Check out the <a href="tutorial.html">tutorial</a>
 </li>
         
-<li>Read the <a href="http://wiki.apache.org/solr">Solr wiki</a> to learn more</li>
+<li>Read the <a href="http://wiki.apache.org/solr/FrontPage">Solr wiki</a> to learn more</li>
         
 <li>Join the <a href="mailing_lists.html">community</a>
 </li>
@@ -303,7 +306,20 @@ customization is required.
 <a name="N10059"></a><a name="news"></a>
 <h2 class="boxed">News</h2>
 <div class="section">
-<a name="N1005F"></a><a name="7+May+2010+-+Apache+Lucene+Eurocon+2010+Coming+to+Prague+May+18-21"></a>
+<a name="N1005F"></a><a name="25+June+2010+-+Solr+1.4.1+Released"></a>
+<h3 class="boxed">25 June 2010 - Solr 1.4.1 Released</h3>
+<p>
+           Solr 1.4.1 has been released and is now available for public
+           <a href="http://www.apache.org/dyn/closer.cgi/lucene/solr/">download</a>!
+
+           Solr 1.4.1 is a bug fix release for Solr 1.4 that includes many
+           Solr bug fixes as well as Lucene bug fixes from Lucene 2.9.3.
+          </p>
+<p>
+          See the <a href="http://svn.apache.org/repos/asf/lucene/solr/tags/release-1.4.1/CHANGES.txt">release notes</a>
+          for more details.
+          </p>
+<a name="N10074"></a><a name="7+May+2010+-+Apache+Lucene+Eurocon+2010+Coming+to+Prague+May+18-21"></a>
 <h3 class="boxed">7 May 2010 - Apache Lucene Eurocon 2010 Coming to Prague May 18-21</h3>
 <p>
           On May 18th to the 21st Prague will play host to the first
@@ -375,7 +391,7 @@ customization is required.
 </li>
         
 </ul>
-<a name="N100AB"></a><a name="10+November+2009+-+Solr+1.4+Released"></a>
+<a name="N100C0"></a><a name="10+November+2009+-+Solr+1.4+Released"></a>
 <h3 class="boxed">10 November 2009 - Solr 1.4 Released</h3>
 <p>
      Solr 1.4 has been released and is now available for public <a href="http://www.apache.org/dyn/closer.cgi/lucene/solr/">download</a>!
@@ -407,7 +423,7 @@ customization is required.
 </ul>
 <p>See the <a href="http://svn.apache.org/repos/asf/lucene/solr/tags/release-1.4.0/CHANGES.txt">release notes</a> for more details.
  </p>
-<a name="N100DB"></a><a name="20+August+2009+-+Solr%27s+first+book+is+published%21"></a>
+<a name="N100F0"></a><a name="20+August+2009+-+Solr%27s+first+book+is+published%21"></a>
 <h3 class="boxed">20 August 2009 - Solr's first book is published!</h3>
 <p>
    
@@ -422,7 +438,7 @@ customization is required.
    </p>
 <p>Finally, this book covers various deployment considerations to include indexing strategies and performance-oriented configuration that will enable you to scale Solr to meet the needs of a high-volume site.
    </p>
-<a name="N100FB"></a><a name="18+August+2009+-+Lucene+at+US+ApacheCon"></a>
+<a name="N10110"></a><a name="18+August+2009+-+Lucene+at+US+ApacheCon"></a>
 <h3 class="boxed">18 August 2009 - Lucene at US ApacheCon</h3>
 <p>
  
@@ -498,7 +514,7 @@ Be sure not to miss:
     Search</a> - Jason Rutherglen @ 15:00</li>
 
 </ul>
-<a name="N1016F"></a><a name="09+February+2009+-+Lucene+at+ApacheCon+Europe+2009+in+Amsterdam"></a>
+<a name="N10184"></a><a name="09+February+2009+-+Lucene+at+ApacheCon+Europe+2009+in+Amsterdam"></a>
 <h3 class="boxed">09 February 2009 - Lucene at ApacheCon Europe 2009 in Amsterdam</h3>
 <p>
                
@@ -536,23 +552,23 @@ Be sure not to miss:
 
 							              
 </ul>
-<a name="N101B8"></a><a name="19+December+2008+-+Solr+Logo+Contest+Results"></a>
+<a name="N101CD"></a><a name="19+December+2008+-+Solr+Logo+Contest+Results"></a>
 <h3 class="boxed">19 December 2008 - Solr Logo Contest Results</h3>
 <p>Many great logos were submitted, but only one could be chosen.  Congratulations Michiel,
 	the creator of the winning logo that is proudly displayed at the top of this page.  
 	</p>
-<a name="N101C1"></a><a name="03+October+2008+-+Solr+Logo+Contest"></a>
+<a name="N101D6"></a><a name="03+October+2008+-+Solr+Logo+Contest"></a>
 <h3 class="boxed">03 October 2008 - Solr Logo Contest</h3>
 <p>By popular demand, Solr is holding a contest to pick a new Solr logo.  Details about how to submit an entry can be found <a href="http://wiki.apache.org/solr/LogoContest">on the wiki</a>.  The Deadline for submissions is November 20th, 2008 @ 11:59PM GMT.
 	</p>
-<a name="N101CE"></a><a name="15+September+2008+-+Solr+1.3.0+Available"></a>
+<a name="N101E3"></a><a name="15+September+2008+-+Solr+1.3.0+Available"></a>
 <h3 class="boxed">15 September 2008 - Solr 1.3.0 Available</h3>
 <p>Solr 1.3.0 is available for public download.  This version contains many enhancements and bug fixes, including distributed search capabilities,
 			Lucene 2.3.x performance improvements and many others.
 		</p>
 <p>See the <a href="http://svn.apache.org/repos/asf/lucene/solr/tags/release-1.3.0/CHANGES.txt">release notes</a> for more details.  Download is
     available from a <a href="http://www.apache.org/dyn/closer.cgi/lucene/solr/">Apache Mirror</a>.</p>
-<a name="N101E2"></a><a name="28+August+2008+-+Lucene%2FSolr+at+ApacheCon+New+Orleans"></a>
+<a name="N101F7"></a><a name="28+August+2008+-+Lucene%2FSolr+at+ApacheCon+New+Orleans"></a>
 <h3 class="boxed">28 August 2008 - Lucene/Solr at ApacheCon New Orleans</h3>
 <p>
 	         
@@ -574,7 +590,7 @@ Be sure not to miss:
 <li>An <a href="http://us.apachecon.com/c/acus2008/schedule/2008/11/05">entire day of Lucene sessions</a> on November 5th</li>
 	        
 </ul>
-<a name="N10210"></a><a name="03+September+2007+-+Lucene+at+ApacheCon+Atlanta"></a>
+<a name="N10225"></a><a name="03+September+2007+-+Lucene+at+ApacheCon+Atlanta"></a>
 <h3 class="boxed">03 September 2007 - Lucene at ApacheCon Atlanta</h3>
 <p>
 <a href="http://www.us.apachecon.com"><img alt="ApacheCon US logo" class="float-right" src="http://www.apache.org/ads/ApacheCon/2007-usa-125x125.png"></a>
@@ -594,7 +610,7 @@ Be sure not to miss:
 <li>November 16, 4:00 pm: <a href="http://us.apachecon.com/us2007/program/talk/2017"> Advanced Indexing Techniques with Apache Lucene</a> by Michael Busch. Information on payloads and advanced indexing techniques.</li>
               
 </ul>
-<a name="N10249"></a><a name="06+June+2007%3A+Release+1.2+available"></a>
+<a name="N1025E"></a><a name="06+June+2007%3A+Release+1.2+available"></a>
 <h3 class="boxed">06 June 2007: Release 1.2 available</h3>
 <p>
         This is the first release since Solr graduated from the Incubator,
@@ -604,40 +620,40 @@ Be sure not to miss:
         and more flexible plugins.
       </p>
 <p>See the <a href="http://svn.apache.org/repos/asf/lucene/solr/tags/release-1.2.0/CHANGES.txt">release notes</a> for more details.</p>
-<a name="N1025A"></a><a name="17+January+2007%3A+Solr+graduates+from+Incubator"></a>
+<a name="N1026F"></a><a name="17+January+2007%3A+Solr+graduates+from+Incubator"></a>
 <h3 class="boxed">17 January 2007: Solr graduates from Incubator</h3>
 <p>
         Solr has graduated from the Apache Incubator, and is now a sub-project of Lucene.
       </p>
-<a name="N10264"></a><a name="22+December+2006%3A+Release+1.1.0+available"></a>
+<a name="N10279"></a><a name="22+December+2006%3A+Release+1.1.0+available"></a>
 <h3 class="boxed">22 December 2006: Release 1.1.0 available</h3>
 <p>
         This is the first release since Solr joined the Incubator, and brings
         many new features and performance optimizations including highlighting,
         faceted search, and JSON/Python/Ruby response formats.
       </p>
-<a name="N1026E"></a><a name="15+August+2006%3A+Solr+at+ApacheCon+US"></a>
+<a name="N10283"></a><a name="15+August+2006%3A+Solr+at+ApacheCon+US"></a>
 <h3 class="boxed">15 August 2006: Solr at ApacheCon US</h3>
 <p>Chris Hostetter will be presenting
         <strong><a href="http://www.apachecon.com/2006/US/html/sessions.html#FR26">"Faceted Searching With Apache Solr"</a></strong>  
         at ApacheCon US 2006, on October 13th at 4:30pm.
         See the <a href="http://www.us.apachecon.com/">ApacheCon</a> website for more details.
       </p>
-<a name="N10281"></a><a name="21+April+2006%3A+Solr+at+ApacheCon"></a>
+<a name="N10296"></a><a name="21+April+2006%3A+Solr+at+ApacheCon"></a>
 <h3 class="boxed">21 April 2006: Solr at ApacheCon</h3>
 <p>Yonik Seeley will be presenting
         <strong>"Apache Solr, a Full-Text Search Server based on Lucene"</strong>  
         at ApacheCon Europe 2006, on June 29th at 5:30pm.
         See the <a href="http://www.eu.apachecon.com/">ApacheCon</a> website for more details.
       </p>
-<a name="N10292"></a><a name="21+February+2006%3A+nightly+builds"></a>
+<a name="N102A7"></a><a name="21+February+2006%3A+nightly+builds"></a>
 <h3 class="boxed">21 February 2006: nightly builds</h3>
 <p>Solr now has nightly builds.  This automatically creates a
       <a href="http://people.apache.org/builds/lucene/solr/nightly/">downloadable version of Solr every
       night</a>.  All unit tests must pass, or a message is sent to
       the developers mailing list and no new version is created.  This
       also updates the <a href="api/index.html">javadoc</a>.</p>
-<a name="N102A4"></a><a name="17+January+2006%3A+Solr+Joins+Apache+Incubator"></a>
+<a name="N102B9"></a><a name="17+January+2006%3A+Solr+Joins+Apache+Incubator"></a>
 <h3 class="boxed">17 January 2006: Solr Joins Apache Incubator</h3>
 <p>Solr, a search server based on Lucene, has been accepted into the Apache Incubator.
             Solr was originally developed by CNET Networks, and is widely used within CNET

Modified: lucene/dev/branches/realtime_search/solr/site/index.pdf
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/site/index.pdf?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/dev/branches/realtime_search/solr/site/issue_tracking.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/site/issue_tracking.html?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/site/issue_tracking.html (original)
+++ lucene/dev/branches/realtime_search/solr/site/issue_tracking.html Thu Jul 22 19:34:35 2010
@@ -66,7 +66,7 @@
 <a class="selected" href="index.html">Main</a>
 </li>
 <li>
-<a class="unselected" href="http://wiki.apache.org/solr">Wiki</a>
+<a class="unselected" href="http://wiki.apache.org/solr/FrontPage">Wiki</a>
 </li>
 </ul>
 <!--+
@@ -119,7 +119,7 @@ document.write("Last Published: " + docu
 <a href="tutorial.html">Tutorial</a>
 </div>
 <div class="menuitem">
-<a href="http://wiki.apache.org/solr/">Docs (Wiki)</a>
+<a href="http://wiki.apache.org/solr/FrontPage">Docs (Wiki)</a>
 </div>
 <div class="menuitem">
 <a href="http://wiki.apache.org/solr/FAQ">FAQ</a>

Modified: lucene/dev/branches/realtime_search/solr/site/linkmap.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/site/linkmap.html?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/site/linkmap.html (original)
+++ lucene/dev/branches/realtime_search/solr/site/linkmap.html Thu Jul 22 19:34:35 2010
@@ -66,7 +66,7 @@
 <a class="selected" href="index.html">Main</a>
 </li>
 <li>
-<a class="unselected" href="http://wiki.apache.org/solr">Wiki</a>
+<a class="unselected" href="http://wiki.apache.org/solr/FrontPage">Wiki</a>
 </li>
 </ul>
 <!--+
@@ -119,7 +119,7 @@ document.write("Last Published: " + docu
 <a href="tutorial.html">Tutorial</a>
 </div>
 <div class="menuitem">
-<a href="http://wiki.apache.org/solr/">Docs (Wiki)</a>
+<a href="http://wiki.apache.org/solr/FrontPage">Docs (Wiki)</a>
 </div>
 <div class="menuitem">
 <a href="http://wiki.apache.org/solr/FAQ">FAQ</a>
@@ -227,7 +227,7 @@ document.write("Last Published: " + docu
     
 <ul>
 <li>
-<a href="http://wiki.apache.org/solr/">Docs (Wiki)</a>&nbsp;&nbsp;___________________&nbsp;&nbsp;<em>wiki</em>
+<a href="http://wiki.apache.org/solr/FrontPage">Docs (Wiki)</a>&nbsp;&nbsp;___________________&nbsp;&nbsp;<em>wiki</em>
 </li>
 </ul>
     

Modified: lucene/dev/branches/realtime_search/solr/site/mailing_lists.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/site/mailing_lists.html?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/site/mailing_lists.html (original)
+++ lucene/dev/branches/realtime_search/solr/site/mailing_lists.html Thu Jul 22 19:34:35 2010
@@ -66,7 +66,7 @@
 <a class="selected" href="index.html">Main</a>
 </li>
 <li>
-<a class="unselected" href="http://wiki.apache.org/solr">Wiki</a>
+<a class="unselected" href="http://wiki.apache.org/solr/FrontPage">Wiki</a>
 </li>
 </ul>
 <!--+
@@ -119,7 +119,7 @@ document.write("Last Published: " + docu
 <a href="tutorial.html">Tutorial</a>
 </div>
 <div class="menuitem">
-<a href="http://wiki.apache.org/solr/">Docs (Wiki)</a>
+<a href="http://wiki.apache.org/solr/FrontPage">Docs (Wiki)</a>
 </div>
 <div class="menuitem">
 <a href="http://wiki.apache.org/solr/FAQ">FAQ</a>

Modified: lucene/dev/branches/realtime_search/solr/site/skin/images/rc-b-l-15-1body-2menu-3menu.png
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/site/skin/images/rc-b-l-15-1body-2menu-3menu.png?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/dev/branches/realtime_search/solr/site/skin/images/rc-b-r-15-1body-2menu-3menu.png
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/site/skin/images/rc-b-r-15-1body-2menu-3menu.png?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/dev/branches/realtime_search/solr/site/skin/images/rc-b-r-5-1header-2tab-selected-3tab-selected.png
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/site/skin/images/rc-b-r-5-1header-2tab-selected-3tab-selected.png?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/dev/branches/realtime_search/solr/site/skin/images/rc-t-l-5-1header-2searchbox-3searchbox.png
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/site/skin/images/rc-t-l-5-1header-2searchbox-3searchbox.png?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/dev/branches/realtime_search/solr/site/skin/images/rc-t-l-5-1header-2tab-selected-3tab-selected.png
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/site/skin/images/rc-t-l-5-1header-2tab-selected-3tab-selected.png?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/dev/branches/realtime_search/solr/site/skin/images/rc-t-l-5-1header-2tab-unselected-3tab-unselected.png
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/site/skin/images/rc-t-l-5-1header-2tab-unselected-3tab-unselected.png?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/dev/branches/realtime_search/solr/site/skin/images/rc-t-r-15-1body-2menu-3menu.png
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/site/skin/images/rc-t-r-15-1body-2menu-3menu.png?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/dev/branches/realtime_search/solr/site/skin/images/rc-t-r-5-1header-2searchbox-3searchbox.png
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/site/skin/images/rc-t-r-5-1header-2searchbox-3searchbox.png?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/dev/branches/realtime_search/solr/site/skin/images/rc-t-r-5-1header-2tab-selected-3tab-selected.png
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/site/skin/images/rc-t-r-5-1header-2tab-selected-3tab-selected.png?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/dev/branches/realtime_search/solr/site/skin/images/rc-t-r-5-1header-2tab-unselected-3tab-unselected.png
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/site/skin/images/rc-t-r-5-1header-2tab-unselected-3tab-unselected.png?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/dev/branches/realtime_search/solr/site/tutorial.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/site/tutorial.html?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/site/tutorial.html (original)
+++ lucene/dev/branches/realtime_search/solr/site/tutorial.html Thu Jul 22 19:34:35 2010
@@ -5,7 +5,7 @@
 <meta content="Apache Forrest" name="Generator">
 <meta name="Forrest-version" content="0.8">
 <meta name="Forrest-skin-name" content="lucene">
-<title>Solr tutorial (version 3.0.0.2010.05.07.13.09.33)</title>
+<title>Solr tutorial (version 3.0.0.2010.07.10.11.10.25)</title>
 <link type="text/css" href="skin/basic.css" rel="stylesheet">
 <link media="screen" type="text/css" href="skin/screen.css" rel="stylesheet">
 <link media="print" type="text/css" href="skin/print.css" rel="stylesheet">
@@ -66,7 +66,7 @@
 <a class="selected" href="index.html">Main</a>
 </li>
 <li>
-<a class="unselected" href="http://wiki.apache.org/solr">Wiki</a>
+<a class="unselected" href="http://wiki.apache.org/solr/FrontPage">Wiki</a>
 </li>
 </ul>
 <!--+
@@ -119,7 +119,7 @@ document.write("Last Published: " + docu
 <div class="menupagetitle">Tutorial</div>
 </div>
 <div class="menuitem">
-<a href="http://wiki.apache.org/solr/">Docs (Wiki)</a>
+<a href="http://wiki.apache.org/solr/FrontPage">Docs (Wiki)</a>
 </div>
 <div class="menuitem">
 <a href="http://wiki.apache.org/solr/FAQ">FAQ</a>
@@ -157,7 +157,7 @@ document.write("Last Published: " + docu
 </div>
 <div id="credit">
 <hr>
-      This document is for Apache Solr version 3.0.0.2010.05.07.13.09.33.  If you are using a different version of Solr, please consult the documentation that was distributed with the version you are using.
+      This document is for Apache Solr version 3.0.0.2010.07.10.11.10.25.  If you are using a different version of Solr, please consult the documentation that was distributed with the version you are using.
         </div>
 <div id="roundbottom">
 <img style="display: none" class="corner" height="15" width="15" alt="" src="skin/images/rc-b-l-15-1body-2menu-3menu.png"></div>
@@ -181,7 +181,7 @@ document.write("Last Published: " + docu
 </div>
 <h1>Solr tutorial</h1>
 <div id="motd-area">
-      This document is for Apache Solr version 3.0.0.2010.05.07.13.09.33.  If you are using a different version of Solr, please consult the documentation that was distributed with the version you are using.
+      This document is for Apache Solr version 3.0.0.2010.07.10.11.10.25.  If you are using a different version of Solr, please consult the documentation that was distributed with the version you are using.
         </div>
 <div id="minitoc-area">
 <ul class="minitoc">
@@ -744,7 +744,7 @@ in subsequent searches.
   <a href="http://wiki.apache.org/solr/StatsComponent">numeric field statistics</a>,
   and
   <a href="http://wiki.apache.org/solr/ClusteringComponent">search results clustering</a>.
-  Explore the <a href="http://wiki.apache.org/solr/">Solr Wiki</a> to find out
+  Explore the <a href="http://wiki.apache.org/solr/FrontPage">Solr Wiki</a> to find out
   more details about Solr's many
   <a href="features.html">features</a>.
 </p>

Modified: lucene/dev/branches/realtime_search/solr/site/tutorial.pdf
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/site/tutorial.pdf?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
Binary files - no diff available.

Modified: lucene/dev/branches/realtime_search/solr/site/version_control.html
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/site/version_control.html?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/site/version_control.html (original)
+++ lucene/dev/branches/realtime_search/solr/site/version_control.html Thu Jul 22 19:34:35 2010
@@ -66,7 +66,7 @@
 <a class="selected" href="index.html">Main</a>
 </li>
 <li>
-<a class="unselected" href="http://wiki.apache.org/solr">Wiki</a>
+<a class="unselected" href="http://wiki.apache.org/solr/FrontPage">Wiki</a>
 </li>
 </ul>
 <!--+
@@ -119,7 +119,7 @@ document.write("Last Published: " + docu
 <a href="tutorial.html">Tutorial</a>
 </div>
 <div class="menuitem">
-<a href="http://wiki.apache.org/solr/">Docs (Wiki)</a>
+<a href="http://wiki.apache.org/solr/FrontPage">Docs (Wiki)</a>
 </div>
 <div class="menuitem">
 <a href="http://wiki.apache.org/solr/FAQ">FAQ</a>

Propchange: lucene/dev/branches/realtime_search/solr/src/common/org/apache/solr/common/
------------------------------------------------------------------------------
--- svn:mergeinfo (original)
+++ svn:mergeinfo Thu Jul 22 19:34:35 2010
@@ -1,2 +1,3 @@
-/lucene/dev/branches/branch_3x/solr/src/common/org/apache/solr/common:949730
+/lucene/dev/branches/branch_3x/solr/src/common/org/apache/solr/common:949730,961612
+/lucene/dev/trunk/solr/src/common/org/apache/solr/common:953476-966816
 /lucene/solr/trunk/src/common/org/apache/solr/common:922950-923910,923912-925091

Modified: lucene/dev/branches/realtime_search/solr/src/common/org/apache/solr/common/util/JavaBinCodec.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/common/org/apache/solr/common/util/JavaBinCodec.java?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/common/org/apache/solr/common/util/JavaBinCodec.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/common/org/apache/solr/common/util/JavaBinCodec.java Thu Jul 22 19:34:35 2010
@@ -225,8 +225,8 @@ public class JavaBinCodec {
       writeSolrDocumentList((SolrDocumentList) val);
       return true;
     }
-    if (val instanceof List) {
-      writeArray((List) val);
+    if (val instanceof Collection) {
+      writeArray((Collection) val);
       return true;
     }
     if (val instanceof Object[]) {
@@ -390,6 +390,14 @@ public class JavaBinCodec {
     }
   }
 
+  public void writeArray(Collection coll) throws IOException {
+    writeTag(ARR, coll.size());
+    for (Object o : coll) {
+      writeVal(o);
+    }
+
+  }
+
   public void writeArray(Object[] arr) throws IOException {
     writeTag(ARR, arr.length);
     for (int i = 0; i < arr.length; i++) {

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/analysis/CapitalizationFilterFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/analysis/CapitalizationFilterFactory.java?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/analysis/CapitalizationFilterFactory.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/analysis/CapitalizationFilterFactory.java Thu Jul 22 19:34:35 2010
@@ -17,11 +17,10 @@
 
 package org.apache.solr.analysis;
 
-import org.apache.lucene.analysis.*;
-import org.apache.lucene.analysis.tokenattributes.CharTermAttribute;
+import org.apache.lucene.analysis.TokenStream;
+import org.apache.lucene.analysis.miscellaneous.CapitalizationFilter;
 import org.apache.lucene.analysis.util.CharArraySet;
 
-import java.io.IOException;
 import java.util.ArrayList;
 import java.util.Collection;
 import java.util.Collections;
@@ -29,11 +28,7 @@ import java.util.Map;
 import java.util.StringTokenizer;
 
 /**
- * A filter to apply normal capitalization rules to Tokens.  It will make the first letter
- * capital and the rest lower case.
- * <p/>
- * This filter is particularly useful to build nice looking facet parameters.  This filter
- * is not appropriate if you intend to use a prefix query.
+ * Factory for {@link CapitalizationFilter}.
  * <p/>
  * The factory takes parameters:<br/>
  * "onlyFirstWord" - should each word be capitalized or all of the words?<br/>
@@ -52,7 +47,6 @@ import java.util.StringTokenizer;
  * @since solr 1.3
  */
 public class CapitalizationFilterFactory extends BaseTokenFilterFactory {
-  public static final int DEFAULT_MAX_WORD_COUNT = Integer.MAX_VALUE;
   public static final String KEEP = "keep";
   public static final String KEEP_IGNORE_CASE = "keepIgnoreCase";
   public static final String OK_PREFIX = "okPrefix";
@@ -68,8 +62,8 @@ public class CapitalizationFilterFactory
   Collection<char[]> okPrefix = Collections.emptyList(); // for Example: McK
 
   int minWordLength = 0;  // don't modify capitalization for words shorter then this
-  int maxWordCount = DEFAULT_MAX_WORD_COUNT;
-  int maxTokenLength = DEFAULT_MAX_WORD_COUNT;
+  int maxWordCount = CapitalizationFilter.DEFAULT_MAX_WORD_COUNT;
+  int maxTokenLength = CapitalizationFilter.DEFAULT_MAX_TOKEN_LENGTH;
   boolean onlyFirstWord = true;
   boolean forceFirstLetter = true; // make sure the first letter is capitol even if it is in the keep list
 
@@ -128,116 +122,8 @@ public class CapitalizationFilterFactory
     }
   }
 
-
-  public void processWord(char[] buffer, int offset, int length, int wordCount) {
-    if (length < 1) {
-      return;
-    }
-    if (onlyFirstWord && wordCount > 0) {
-      for (int i = 0; i < length; i++) {
-        buffer[offset + i] = Character.toLowerCase(buffer[offset + i]);
-
-      }
-      return;
-    }
-
-    if (keep != null && keep.contains(buffer, offset, length)) {
-      if (wordCount == 0 && forceFirstLetter) {
-        buffer[offset] = Character.toUpperCase(buffer[offset]);
-      }
-      return;
-    }
-    if (length < minWordLength) {
-      return;
-    }
-    for (char[] prefix : okPrefix) {
-      if (length >= prefix.length) { //don't bother checking if the buffer length is less than the prefix
-        boolean match = true;
-        for (int i = 0; i < prefix.length; i++) {
-          if (prefix[i] != buffer[offset + i]) {
-            match = false;
-            break;
-          }
-        }
-        if (match == true) {
-          return;
-        }
-      }
-    }
-
-    // We know it has at least one character
-    /*char[] chars = w.toCharArray();
-    StringBuilder word = new StringBuilder( w.length() );
-    word.append( Character.toUpperCase( chars[0] ) );*/
-    buffer[offset] = Character.toUpperCase(buffer[offset]);
-
-    for (int i = 1; i < length; i++) {
-      buffer[offset + i] = Character.toLowerCase(buffer[offset + i]);
-    }
-    //return word.toString();
-  }
-
   public CapitalizationFilter create(TokenStream input) {
-    return new CapitalizationFilter(input, this);
-  }
-}
-
-
-/**
- * This relies on the Factory so that the difficult stuff does not need to be
- * re-initialized each time the filter runs.
- * <p/>
- * This is package protected since it is not useful without the Factory
- */
-final class CapitalizationFilter extends TokenFilter {
-  private final CapitalizationFilterFactory factory;
-  private final CharTermAttribute termAtt = addAttribute(CharTermAttribute.class);
-
-  public CapitalizationFilter(TokenStream in, final CapitalizationFilterFactory factory) {
-    super(in);
-    this.factory = factory;
-  }
-
-  @Override
-  public boolean incrementToken() throws IOException {
-    if (!input.incrementToken()) return false;
-
-    char[] termBuffer = termAtt.buffer();
-    int termBufferLength = termAtt.length();
-    char[] backup = null;
-    if (factory.maxWordCount < CapitalizationFilterFactory.DEFAULT_MAX_WORD_COUNT) {
-      //make a backup in case we exceed the word count
-      backup = new char[termBufferLength];
-      System.arraycopy(termBuffer, 0, backup, 0, termBufferLength);
-    }
-    if (termBufferLength < factory.maxTokenLength) {
-      int wordCount = 0;
-
-      int lastWordStart = 0;
-      for (int i = 0; i < termBufferLength; i++) {
-        char c = termBuffer[i];
-        if (c <= ' ' || c == '.') {
-          int len = i - lastWordStart;
-          if (len > 0) {
-            factory.processWord(termBuffer, lastWordStart, len, wordCount++);
-            lastWordStart = i + 1;
-            i++;
-          }
-        }
-      }
-
-      // process the last word
-      if (lastWordStart < termBufferLength) {
-        factory.processWord(termBuffer, lastWordStart, termBufferLength - lastWordStart, wordCount++);
-      }
-
-      if (wordCount > factory.maxWordCount) {
-        termAtt.copyBuffer(backup, 0, termBufferLength);
-      }
-    }
-
-    return true;
+    return new CapitalizationFilter(input, onlyFirstWord, keep, 
+      forceFirstLetter, okPrefix, minWordLength, maxWordCount, maxTokenLength);
   }
-
 }
-

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/analysis/DoubleMetaphoneFilterFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/analysis/DoubleMetaphoneFilterFactory.java?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/analysis/DoubleMetaphoneFilterFactory.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/analysis/DoubleMetaphoneFilterFactory.java Thu Jul 22 19:34:35 2010
@@ -19,6 +19,7 @@ package org.apache.solr.analysis;
 import java.util.Map;
 
 import org.apache.lucene.analysis.TokenStream;
+import org.apache.lucene.analysis.phonetic.DoubleMetaphoneFilter;
 
 public class DoubleMetaphoneFilterFactory extends BaseTokenFilterFactory 
 {

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/analysis/PatternTokenizerFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/analysis/PatternTokenizerFactory.java?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/analysis/PatternTokenizerFactory.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/analysis/PatternTokenizerFactory.java Thu Jul 22 19:34:35 2010
@@ -65,7 +65,6 @@ public class PatternTokenizerFactory ext
   public static final String PATTERN = "pattern";
   public static final String GROUP = "group";
  
-  protected Map<String,String> args;
   protected Pattern pattern;
   protected int group;
   

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/analysis/PhoneticFilterFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/analysis/PhoneticFilterFactory.java?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/analysis/PhoneticFilterFactory.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/analysis/PhoneticFilterFactory.java Thu Jul 22 19:34:35 2010
@@ -29,6 +29,7 @@ import org.apache.commons.codec.language
 import org.apache.commons.codec.language.RefinedSoundex;
 import org.apache.commons.codec.language.Soundex;
 import org.apache.lucene.analysis.TokenStream;
+import org.apache.lucene.analysis.phonetic.PhoneticFilter;
 import org.apache.solr.common.SolrException;
 import org.apache.solr.common.util.StrUtils;
 
@@ -96,6 +97,6 @@ public class PhoneticFilterFactory exten
   }
   
   public PhoneticFilter create(TokenStream input) {
-    return new PhoneticFilter(input,encoder,name,inject);
+    return new PhoneticFilter(input,encoder,inject);
   }
 }

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/CoreContainer.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/CoreContainer.java?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/CoreContainer.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/CoreContainer.java Thu Jul 22 19:34:35 2010
@@ -247,18 +247,40 @@ public class CoreContainer 
         SolrConfig.severeErrors.add(e);
         SolrException.logOnce(log,null,e);
       }
+      
+      // before looping over each core, let's check the names and fail 
+      // fast if the same one is reused multiple times.
+      { // local scope, won't need these vars again
+        NodeList nodes = (NodeList)cfg.evaluate("solr/cores/core/@name", 
+                                                XPathConstants.NODESET);
+        Set<String> names = new HashSet<String>();
+        for (int i=0; i<nodes.getLength(); i++) {
+          String name = DOMUtil.getText(nodes.item(i));
+          if (names.contains(name)) {
+            throw new SolrException(SolrException.ErrorCode.SERVER_ERROR,
+                                    "Multiple cores found with same name: " + 
+                                    name);
+          }
+          names.add(name);
+        }
+      }
 
       NodeList nodes = (NodeList)cfg.evaluate("solr/cores/core", XPathConstants.NODESET);
-      boolean defaultCoreFound = false;
       for (int i=0; i<nodes.getLength(); i++) {
         Node node = nodes.item(i);
         try {
           String name = DOMUtil.getAttr(node, "name", null);
-          if(name.equals(defaultCoreName)){
-            if(defaultCoreFound) throw new SolrException(SolrException.ErrorCode.SERVER_ERROR,"Only one 'DEFAULT_CORE' is allowed ");            
-            defaultCoreFound = true;
+          if (null == name) {
+            throw new SolrException(SolrException.ErrorCode.SERVER_ERROR,
+                                    "Each core in solr.xml must have a 'name'");
+          }
+          if (name.equals(defaultCoreName)){
+            // for the default core we use a blank name,
+            // later on attempts to access it by it's full name will 
+            // be mapped to this.
             name="";
           }
+
           CoreDescriptor p = new CoreDescriptor(this, name, DOMUtil.getAttr(node, "instanceDir", null));
 
           // deal with optional settings
@@ -414,7 +436,7 @@ public class CoreContainer 
         schemaFile = new File(solrLoader.getInstanceDir() + "conf" + File.separator + dcore.getSchemaName());
       }
       if(schemaFile. exists()){
-        String key = schemaFile.getAbsolutePath()+":"+new SimpleDateFormat("yyyyMMddhhmmss", Locale.US).format(new Date(schemaFile.lastModified()));
+        String key = schemaFile.getAbsolutePath()+":"+new SimpleDateFormat("yyyyMMddHHmmss", Locale.US).format(new Date(schemaFile.lastModified()));
         schema = indexSchemaCache.get(key);
         if(schema == null){
           log.info("creating new schema object for core: " + dcore.name);

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/SolrCore.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/SolrCore.java?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/SolrCore.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/SolrCore.java Thu Jul 22 19:34:35 2010
@@ -43,6 +43,7 @@ import org.apache.solr.response.QueryRes
 import org.apache.solr.response.RawResponseWriter;
 import org.apache.solr.response.RubyResponseWriter;
 import org.apache.solr.response.SolrQueryResponse;
+import org.apache.solr.response.VelocityResponseWriter;
 import org.apache.solr.response.XMLResponseWriter;
 import org.apache.solr.schema.IndexSchema;
 import org.apache.solr.search.QParserPlugin;
@@ -689,17 +690,17 @@ public final class SolrCore implements S
       SolrException.log(log, e);
     }
     try {
-      closeSearcher();
+      updateHandler.close();
     } catch (Exception e) {
       SolrException.log(log,e);
     }
     try {
-      searcherExecutor.shutdown();
+      closeSearcher();
     } catch (Exception e) {
       SolrException.log(log,e);
     }
     try {
-      updateHandler.close();
+      searcherExecutor.shutdown();
     } catch (Exception e) {
       SolrException.log(log,e);
     }
@@ -1406,6 +1407,7 @@ public final class SolrCore implements S
     m.put("ruby", new RubyResponseWriter());
     m.put("raw", new RawResponseWriter());
     m.put("javabin", new BinaryResponseWriter());
+    m.put("velocity", new VelocityResponseWriter());
     DEFAULT_RESPONSE_WRITERS = Collections.unmodifiableMap(m);
   }
   

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/SolrResourceLoader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/SolrResourceLoader.java?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/SolrResourceLoader.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/core/SolrResourceLoader.java Thu Jul 22 19:34:35 2010
@@ -32,7 +32,10 @@ import java.util.concurrent.ConcurrentHa
 
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
+
+import java.nio.charset.CharacterCodingException;
 import java.nio.charset.Charset;
+import java.nio.charset.CodingErrorAction;
 import java.lang.reflect.Constructor;
 
 import javax.naming.Context;
@@ -53,6 +56,7 @@ import org.apache.solr.schema.FieldType;
 import org.apache.solr.update.processor.UpdateRequestProcessorFactory;
 import org.apache.solr.util.plugin.ResourceLoaderAware;
 import org.apache.solr.util.plugin.SolrCoreAware;
+import org.apache.solr.search.QParserPlugin;
 
 /**
  * @since solr 1.3
@@ -315,7 +319,9 @@ public class SolrResourceLoader implemen
     ArrayList<String> lines;
     try {
       input = new BufferedReader(new InputStreamReader(openResource(resource),
-          charset));
+          charset.newDecoder()
+          .onMalformedInput(CodingErrorAction.REPORT)
+          .onUnmappableCharacter(CodingErrorAction.REPORT)));
 
       lines = new ArrayList<String>();
       for (String word=null; (word=input.readLine())!=null;) {
@@ -329,6 +335,9 @@ public class SolrResourceLoader implemen
         if (word.length()==0) continue;
         lines.add(word);
       }
+    } catch (CharacterCodingException ex) {
+      throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, 
+          "Error loading resource (wrong encoding?): " + resource, ex);
     } finally {
       if (input != null)
         input.close();
@@ -645,6 +654,7 @@ public class SolrResourceLoader implemen
         CharFilterFactory.class,
         TokenFilterFactory.class,
         TokenizerFactory.class,
+        QParserPlugin.class,
         FieldType.class
       }
     );

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/SnapShooter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/SnapShooter.java?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/SnapShooter.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/SnapShooter.java Thu Jul 22 19:34:35 2010
@@ -111,7 +111,7 @@ public class SnapShooter {
   }
 
   public static final String SNAP_DIR = "snapDir";
-  public static final String DATE_FMT = "yyyyMMddhhmmss";
+  public static final String DATE_FMT = "yyyyMMddHHmmss";
   
 
   private class FileCopier {

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/admin/AdminHandlers.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/admin/AdminHandlers.java?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/admin/AdminHandlers.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/admin/AdminHandlers.java Thu Jul 22 19:34:35 2010
@@ -82,6 +82,7 @@ public class AdminHandlers implements So
     StandardHandler[] list = new StandardHandler[] {
       new StandardHandler( "luke", new LukeRequestHandler() ),
       new StandardHandler( "system", new SystemInfoHandler() ),
+      new StandardHandler( "mbeans", new SolrInfoMBeanHandler() ),
       new StandardHandler( "plugins", new PluginInfoHandler() ),
       new StandardHandler( "threads", new ThreadDumpHandler() ),
       new StandardHandler( "properties", new PropertiesRequestHandler() ),

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/admin/LukeRequestHandler.java Thu Jul 22 19:34:35 2010
@@ -37,13 +37,17 @@ import org.apache.lucene.document.Docume
 import org.apache.lucene.document.Fieldable;
 import org.apache.lucene.index.IndexReader;
 import org.apache.lucene.index.Term;
-import org.apache.lucene.index.TermEnum;
+import org.apache.lucene.index.Fields;
+import org.apache.lucene.index.FieldsEnum;
+import org.apache.lucene.index.TermsEnum;
+import org.apache.lucene.index.MultiFields;
 import org.apache.lucene.index.TermFreqVector;
 import org.apache.lucene.search.Query;
 import org.apache.lucene.search.TermRangeQuery;
 import org.apache.lucene.search.TopDocs;
 import org.apache.lucene.store.Directory;
 import org.apache.lucene.util.PriorityQueue;
+import org.apache.lucene.util.BytesRef;
 import org.apache.solr.analysis.CharFilterFactory;
 import org.apache.solr.analysis.TokenFilterFactory;
 import org.apache.solr.analysis.TokenizerChain;
@@ -261,7 +265,7 @@ public class LukeRequestHandler extends 
           if( v != null ) {
             SimpleOrderedMap<Integer> tfv = new SimpleOrderedMap<Integer>();
             for( int i=0; i<v.size(); i++ ) {
-              tfv.add( v.getTerms()[i], v.getTermFrequencies()[i] );
+              tfv.add( v.getTerms()[i].utf8ToString(), v.getTermFrequencies()[i] );
             }
             f.add( "termVector", tfv );
           }
@@ -468,18 +472,18 @@ public class LukeRequestHandler extends 
     indexInfo.add("maxDoc", reader.maxDoc());
     
     if( countTerms ) {
-      TermEnum te = null;
-      try{
-        te = reader.terms();
-        int numTerms = 0;
-        while (te.next()) {
-          numTerms++;
+      Fields fields = MultiFields.getFields(reader);
+      int numTerms = 0;
+      if (fields != null) {
+        FieldsEnum fieldsEnum = fields.iterator();
+        while(fieldsEnum.next() != null) {
+          TermsEnum termsEnum = fieldsEnum.terms();
+          while(termsEnum.next() != null) {
+            numTerms++;
+          }
         }
-        indexInfo.add("numTerms", numTerms );
-      }
-      finally{
-        if( te != null ) te.close();
       }
+      indexInfo.add("numTerms", numTerms );
     }
 
     indexInfo.add("version", reader.getVersion());  // TODO? Is this different then: IndexReader.getCurrentVersion( dir )?
@@ -528,7 +532,6 @@ public class LukeRequestHandler extends 
     int maxBucket = -1;
     public Map<Integer,Integer> hist = new HashMap<Integer, Integer>();
     
-    private static final double LOG2 = Math.log( 2 );
     public static int getPowerOfTwoBucket( int num )
     {
       return Math.max(1, Integer.highestOneBit(num-1) << 1);
@@ -621,45 +624,48 @@ public class LukeRequestHandler extends 
   private static Map<String,TopTermQueue> getTopTerms( IndexReader reader, Set<String> fields, int numTerms, Set<String> junkWords ) throws Exception 
   {
     Map<String,TopTermQueue> info = new HashMap<String, TopTermQueue>();
-    
-    TermEnum terms = null;
-    try{
-      terms = reader.terms();    
-      while (terms.next()) {
-        String field = terms.term().field();
-        String t = terms.term().text();
-  
-        // Compute distinct terms for every field
-        TopTermQueue tiq = info.get( field );
-        if( tiq == null ) {
-          tiq = new TopTermQueue( numTerms+1 );
-          info.put( field, tiq );
-        }
-        tiq.distinctTerms++;
-        tiq.histogram.add( terms.docFreq() );  // add the term to the histogram
+
+    Fields fieldsC = MultiFields.getFields(reader);
+    if (fieldsC != null) {
+      FieldsEnum fieldsEnum = fieldsC.iterator();
+      String field;
+      while((field = fieldsEnum.next()) != null) {
+
+        TermsEnum termsEnum = fieldsEnum.terms();
+        BytesRef text;
+        while((text = termsEnum.next()) != null) {
+          String t = text.utf8ToString();
+  
+          // Compute distinct terms for every field
+          TopTermQueue tiq = info.get( field );
+          if( tiq == null ) {
+            tiq = new TopTermQueue( numTerms+1 );
+            info.put( field, tiq );
+          }
+
+          tiq.distinctTerms++;
+          tiq.histogram.add( termsEnum.docFreq() );  // add the term to the histogram
         
-        // Only save the distinct terms for fields we worry about
-        if (fields != null && fields.size() > 0) {
-          if( !fields.contains( field ) ) {
+          // Only save the distinct terms for fields we worry about
+          if (fields != null && fields.size() > 0) {
+            if( !fields.contains( field ) ) {
+              continue;
+            }
+          }
+          if( junkWords != null && junkWords.contains( t ) ) {
             continue;
           }
-        }
-        if( junkWords != null && junkWords.contains( t ) ) {
-          continue;
-        }
         
-        if( terms.docFreq() > tiq.minFreq ) {
-          tiq.add(new TopTermQueue.TermInfo(terms.term(), terms.docFreq()));
+          if( termsEnum.docFreq() > tiq.minFreq ) {
+            tiq.add(new TopTermQueue.TermInfo(new Term(field, t), termsEnum.docFreq()));
             if (tiq.size() > numTerms) { // if tiq full
-            tiq.pop(); // remove lowest in tiq
-            tiq.minFreq = ((TopTermQueue.TermInfo)tiq.top()).docFreq; // reset minFreq
+              tiq.pop(); // remove lowest in tiq
+              tiq.minFreq = ((TopTermQueue.TermInfo)tiq.top()).docFreq; // reset minFreq
+            }
           }
         }
       }
     }
-    finally {
-      if( terms != null ) terms.close();
-    }
     return info;
   }
 }

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/admin/SystemInfoHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/admin/SystemInfoHandler.java?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/admin/SystemInfoHandler.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/admin/SystemInfoHandler.java Thu Jul 22 19:34:35 2010
@@ -26,6 +26,7 @@ import java.lang.management.OperatingSys
 import java.lang.management.RuntimeMXBean;
 import java.lang.reflect.Method;
 import java.net.InetAddress;
+import java.net.UnknownHostException;
 import java.text.DecimalFormat;
 import java.util.Date;
 import java.util.Locale;
@@ -58,6 +59,23 @@ public class SystemInfoHandler extends R
 {
   private static Logger log = LoggerFactory.getLogger(SystemInfoHandler.class);
   
+
+  // on some platforms, resolving canonical hostname can cause the thread
+  // to block for several seconds if nameservices aren't available
+  // so resolve this once per handler instance 
+  //(ie: not static, so core reload will refresh)
+  private String hostname = null;
+
+  public SystemInfoHandler() {
+    super();
+    try {
+      InetAddress addr = InetAddress.getLocalHost();
+      hostname = addr.getCanonicalHostName();
+    } catch (UnknownHostException e) {
+      //default to null
+    }
+  }
+
   @Override
   public void handleRequestBody(SolrQueryRequest req, SolrQueryResponse rsp) throws Exception
   {
@@ -71,7 +89,7 @@ public class SystemInfoHandler extends R
   /**
    * Get system info
    */
-  private static SimpleOrderedMap<Object> getCoreInfo( SolrCore core ) throws Exception 
+  private SimpleOrderedMap<Object> getCoreInfo( SolrCore core ) throws Exception 
   {
     SimpleOrderedMap<Object> info = new SimpleOrderedMap<Object>();
     
@@ -79,8 +97,7 @@ public class SystemInfoHandler extends R
     info.add( "schema", schema != null ? schema.getSchemaName():"no schema!" );
     
     // Host
-    InetAddress addr = InetAddress.getLocalHost();
-    info.add( "host", addr.getCanonicalHostName() );
+    info.add( "host", hostname );
 
     // Now
     info.add( "now", new Date() );
@@ -90,6 +107,7 @@ public class SystemInfoHandler extends R
 
     // Solr Home
     SimpleOrderedMap<Object> dirs = new SimpleOrderedMap<Object>();
+    dirs.add( "cwd" , new File( System.getProperty("user.dir")).getAbsolutePath() );
     dirs.add( "instance", new File( core.getResourceLoader().getInstanceDir() ).getAbsolutePath() );
     dirs.add( "data", new File( core.getDataDir() ).getAbsolutePath() );
     dirs.add( "index", new File( core.getIndexDir() ).getAbsolutePath() );
@@ -193,16 +211,28 @@ public class SystemInfoHandler extends R
     Runtime runtime = Runtime.getRuntime();
     jvm.add( "processors", runtime.availableProcessors() );
     
-    long used = runtime.totalMemory() - runtime.freeMemory();
     // not thread safe, but could be thread local
     DecimalFormat df = new DecimalFormat("#.#");
-    double percentUsed = ((double)(used)/(double)runtime.maxMemory())*100;
 
     SimpleOrderedMap<Object> mem = new SimpleOrderedMap<Object>();
-    mem.add("free", humanReadableUnits(runtime.freeMemory(), df));
-    mem.add("total", humanReadableUnits(runtime.totalMemory(), df));
-    mem.add("max", humanReadableUnits(runtime.maxMemory(), df));
-    mem.add("used", humanReadableUnits(used, df) + " (%" + df.format(percentUsed) + ")");
+    SimpleOrderedMap<Object> raw = new SimpleOrderedMap<Object>();
+    long free = runtime.freeMemory();
+    long max = runtime.maxMemory();
+    long total = runtime.totalMemory();
+    long used = total - free;
+    double percentUsed = ((double)(used)/(double)max)*100;
+    raw.add("free",  free );
+    mem.add("free",  humanReadableUnits(free, df));
+    raw.add("total", total );
+    mem.add("total", humanReadableUnits(total, df));
+    raw.add("max",   max );
+    mem.add("max",   humanReadableUnits(max, df));
+    raw.add("used",  used );
+    mem.add("used",  humanReadableUnits(used, df) + 
+            " (%" + df.format(percentUsed) + ")");
+    raw.add("used%", percentUsed);
+
+    mem.add("raw", raw);
     jvm.add("memory", mem);
 
     // JMX properties -- probably should be moved to a different handler
@@ -215,11 +245,10 @@ public class SystemInfoHandler extends R
       // the input arguments passed to the Java virtual machine
       // which does not include the arguments to the main method.
       jmx.add( "commandLineArgs", mx.getInputArguments());
-      // a map of names and values of all system properties.
-      //jmx.add( "SYSTEM PROPERTIES", mx.getSystemProperties());
 
       jmx.add( "startTime", new Date(mx.getStartTime()));
       jmx.add( "upTimeMS",  mx.getUptime() );
+
     }
     catch (Exception e) {
       log.warn("Error getting JMX properties", e);
@@ -231,46 +260,17 @@ public class SystemInfoHandler extends R
   private static SimpleOrderedMap<Object> getLuceneInfo() throws Exception 
   {
     SimpleOrderedMap<Object> info = new SimpleOrderedMap<Object>();
-    
-    String solrImplVersion = "";
-    String solrSpecVersion = "";
-    String luceneImplVersion = "";
-    String luceneSpecVersion = "";
 
-    // ---
     Package p = SolrCore.class.getPackage();
-    StringWriter tmp = new StringWriter();
-    solrImplVersion = p.getImplementationVersion();
-    if (null != solrImplVersion) {
-      XML.escapeCharData(solrImplVersion, tmp);
-      solrImplVersion = tmp.toString();
-    }
-    tmp = new StringWriter();
-    solrSpecVersion = p.getSpecificationVersion() ;
-    if (null != solrSpecVersion) {
-      XML.escapeCharData(solrSpecVersion, tmp);
-      solrSpecVersion = tmp.toString();
-    }
+
+    info.add( "solr-spec-version", p.getSpecificationVersion() );
+    info.add( "solr-impl-version", p.getImplementationVersion() );
   
     p = LucenePackage.class.getPackage();
-    tmp = new StringWriter();
-    luceneImplVersion = p.getImplementationVersion();
-    if (null != luceneImplVersion) {
-      XML.escapeCharData(luceneImplVersion, tmp);
-      luceneImplVersion = tmp.toString();
-    }
-    tmp = new StringWriter();
-    luceneSpecVersion = p.getSpecificationVersion() ;
-    if (null != luceneSpecVersion) {
-      XML.escapeCharData(luceneSpecVersion, tmp);
-      luceneSpecVersion = tmp.toString();
-    }
-    
-    // Add it to the list
-    info.add( "solr-spec-version",   solrSpecVersion   );
-    info.add( "solr-impl-version",   solrImplVersion   );
-    info.add( "lucene-spec-version", luceneSpecVersion );
-    info.add( "lucene-impl-version", luceneImplVersion );
+
+    info.add( "lucene-spec-version", p.getSpecificationVersion() );
+    info.add( "lucene-impl-version", p.getImplementationVersion() );
+
     return info;
   }
   

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/component/QueryElevationComponent.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/component/QueryElevationComponent.java?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/component/QueryElevationComponent.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/component/QueryElevationComponent.java Thu Jul 22 19:34:35 2010
@@ -29,6 +29,8 @@ import java.util.HashMap;
 import java.util.List;
 import java.util.Map;
 import java.util.WeakHashMap;
+
+import org.apache.solr.common.params.QueryElevationParams;
 import org.slf4j.Logger;
 import org.slf4j.LoggerFactory;
 
@@ -77,22 +79,20 @@ public class QueryElevationComponent ext
   // Constants used in solrconfig.xml
   static final String FIELD_TYPE = "queryFieldType";
   static final String CONFIG_FILE = "config-file";
-  static final String FORCE_ELEVATION = "forceElevation";
   static final String EXCLUDE = "exclude";
   
   // Runtime param -- should be in common?
-  static final String ENABLE = "enableElevation";
-    
+
   private SolrParams initArgs = null;
   private Analyzer analyzer = null;
   private String idField = null;
+
   boolean forceElevation = false;
-  
   // For each IndexReader, keep a query->elevation map
   // When the configuration is loaded from the data directory.
   // The key is null if loaded from the config directory, and
   // is never re-loaded.
-  final Map<IndexReader,Map<String, ElevationObj>> elevationCache = 
+  final Map<IndexReader,Map<String, ElevationObj>> elevationCache =
     new WeakHashMap<IndexReader, Map<String,ElevationObj>>();
 
   class ElevationObj {
@@ -160,7 +160,7 @@ public class QueryElevationComponent ext
     }
     idField = StringHelper.intern(sf.getName());
     
-    forceElevation = initArgs.getBool( FORCE_ELEVATION, forceElevation );
+    forceElevation = initArgs.getBool( QueryElevationParams.FORCE_ELEVATION, forceElevation );
     try {
       synchronized( elevationCache ) {
         elevationCache.clear();
@@ -316,12 +316,13 @@ public class QueryElevationComponent ext
     SolrQueryRequest req = rb.req;
     SolrParams params = req.getParams();
     // A runtime param can skip 
-    if( !params.getBool( ENABLE, true ) ) {
+    if( !params.getBool( QueryElevationParams.ENABLE, true ) ) {
       return;
     }
 
+    boolean exclusive = params.getBool(QueryElevationParams.EXCLUSIVE, false);
     // A runtime parameter can alter the config value for forceElevation
-    boolean force = params.getBool( FORCE_ELEVATION, forceElevation );
+    boolean force = params.getBool( QueryElevationParams.FORCE_ELEVATION, forceElevation );
     
     Query query = rb.getQuery();
     String qstr = rb.getQueryString();
@@ -342,15 +343,21 @@ public class QueryElevationComponent ext
     
     if( booster != null ) {
       // Change the query to insert forced documents
-      BooleanQuery newq = new BooleanQuery( true );
-      newq.add( query, BooleanClause.Occur.SHOULD );
-      newq.add( booster.include, BooleanClause.Occur.SHOULD );
-      if( booster.exclude != null ) {
-        for( BooleanClause bq : booster.exclude ) {
-          newq.add( bq );
+      if (exclusive == true){
+        //we only want these results
+        rb.setQuery(booster.include);
+      } else {
+        BooleanQuery newq = new BooleanQuery( true );
+        newq.add( query, BooleanClause.Occur.SHOULD );
+        newq.add( booster.include, BooleanClause.Occur.SHOULD );
+        if( booster.exclude != null ) {
+          for( BooleanClause bq : booster.exclude ) {
+            newq.add( bq );
+          }
         }
+        rb.setQuery( newq );
       }
-      rb.setQuery( newq );
+
       
       // if the sort is 'score desc' use a custom sorting method to 
       // insert documents in their proper place 

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/component/TermVectorComponent.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/component/TermVectorComponent.java?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/component/TermVectorComponent.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/handler/component/TermVectorComponent.java Thu Jul 22 19:34:35 2010
@@ -1,12 +1,17 @@
 package org.apache.solr.handler.component;
 
 import org.apache.lucene.document.Document;
+import org.apache.lucene.document.Field;
+import org.apache.lucene.document.Fieldable;
 import org.apache.lucene.document.SetBasedFieldSelector;
 import org.apache.lucene.index.IndexReader;
+import org.apache.lucene.index.MultiFields;
 import org.apache.lucene.index.Term;
-import org.apache.lucene.index.TermEnum;
 import org.apache.lucene.index.TermVectorMapper;
 import org.apache.lucene.index.TermVectorOffsetInfo;
+import org.apache.lucene.index.Terms;
+import org.apache.lucene.index.TermsEnum;
+import org.apache.lucene.util.BytesRef;
 import org.apache.solr.common.SolrException;
 import org.apache.solr.common.params.CommonParams;
 import org.apache.solr.common.params.ModifiableSolrParams;
@@ -16,9 +21,11 @@ import org.apache.solr.common.util.Named
 import org.apache.solr.common.util.StrUtils;
 import org.apache.solr.core.SolrCore;
 import org.apache.solr.schema.IndexSchema;
+import org.apache.solr.schema.SchemaField;
 import org.apache.solr.search.DocList;
 import org.apache.solr.search.DocListAndSet;
 import org.apache.solr.search.SolrIndexSearcher;
+import org.apache.solr.util.SolrPluginUtils;
 import org.apache.solr.util.plugin.SolrCoreAware;
 
 import java.io.IOException;
@@ -30,8 +37,9 @@ import java.util.HashMap;
 import java.util.HashSet;
 import java.util.Iterator;
 import java.util.List;
+import java.util.Map;
 import java.util.Set;
-import java.util.logging.Logger;
+
 /**
  * Licensed to the Apache Software Foundation (ASF) under one or more
  * contributor license agreements.  See the NOTICE file distributed with
@@ -75,27 +83,90 @@ public class TermVectorComponent extends
 
     NamedList termVectors = new NamedList();
     rb.rsp.add(TERM_VECTORS, termVectors);
+    FieldOptions allFields = new FieldOptions();
     //figure out what options we have, and try to get the appropriate vector
-    boolean termFreq = params.getBool(TermVectorParams.TF, false);
-    boolean positions = params.getBool(TermVectorParams.POSITIONS, false);
-    boolean offsets = params.getBool(TermVectorParams.OFFSETS, false);
-    boolean docFreq = params.getBool(TermVectorParams.DF, false);
-    boolean tfIdf = params.getBool(TermVectorParams.TF_IDF, false);
+    allFields.termFreq = params.getBool(TermVectorParams.TF, false);
+    allFields.positions = params.getBool(TermVectorParams.POSITIONS, false);
+    allFields.offsets = params.getBool(TermVectorParams.OFFSETS, false);
+    allFields.docFreq = params.getBool(TermVectorParams.DF, false);
+    allFields.tfIdf = params.getBool(TermVectorParams.TF_IDF, false);
     //boolean cacheIdf = params.getBool(TermVectorParams.IDF, false);
     //short cut to all values.
     boolean all = params.getBool(TermVectorParams.ALL, false);
-    if (all == true){
-      termFreq = true;
-      positions = true;
-      offsets = true;
-      docFreq = true;
-      tfIdf = true;
+    if (all == true) {
+      allFields.termFreq = true;
+      allFields.positions = true;
+      allFields.offsets = true;
+      allFields.docFreq = true;
+      allFields.tfIdf = true;
+    }
+
+    String fldLst = params.get(TermVectorParams.FIELDS);
+    if (fldLst == null) {
+      fldLst = params.get(CommonParams.FL);
     }
 
-    String[] fields = params.getParams(TermVectorParams.FIELDS);
-    if (fields == null) {
-      fields = params.getParams(CommonParams.FL);
+    //use this to validate our fields
+    IndexSchema schema = rb.req.getSchema();
+    //Build up our per field mapping
+    Map<String, FieldOptions> fieldOptions = new HashMap<String, FieldOptions>();
+    NamedList warnings = new NamedList();
+    List<String>  noTV = new ArrayList<String>();
+    List<String>  noPos = new ArrayList<String>();
+    List<String>  noOff = new ArrayList<String>();
+
+    //we have specific fields to retrieve
+    if (fldLst != null) {
+      String [] fields = SolrPluginUtils.split(fldLst);
+      for (String field : fields) {
+        SchemaField sf = schema.getFieldOrNull(field);
+        if (sf != null) {
+          if (sf.storeTermVector()) {
+            FieldOptions option = fieldOptions.get(field);
+            if (option == null) {
+              option = new FieldOptions();
+              option.fieldName = field;
+              fieldOptions.put(field, option);
+            }
+            //get the per field mappings
+            option.termFreq = params.getFieldBool(field, TermVectorParams.TF, allFields.termFreq);
+            option.docFreq = params.getFieldBool(field, TermVectorParams.DF, allFields.docFreq);
+            option.tfIdf = params.getFieldBool(field, TermVectorParams.TF_IDF, allFields.tfIdf);
+            //Validate these are even an option
+            option.positions = params.getFieldBool(field, TermVectorParams.POSITIONS, allFields.positions);
+            if (option.positions == true && sf.storeTermPositions() == false){
+              noPos.add(field);
+            }
+            option.offsets = params.getFieldBool(field, TermVectorParams.OFFSETS, allFields.offsets);
+            if (option.offsets == true && sf.storeTermOffsets() == false){
+              noOff.add(field);
+            }
+          } else {//field doesn't have term vectors
+            noTV.add(field);
+          }
+        } else {
+          //field doesn't exist
+          throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, "undefined field: " + field);
+        }
+      }
+    } //else, deal with all fields
+    boolean hasWarnings = false;
+    if (noTV.isEmpty() == false) {
+      warnings.add("noTermVectors", noTV);
+      hasWarnings = true;
+    }
+    if (noPos.isEmpty() == false) {
+      warnings.add("noPositions", noPos);
+      hasWarnings = true;
+    }
+    if (noOff.isEmpty() == false) {
+      warnings.add("noOffsets", noOff);
+      hasWarnings = true;
+    }
+    if (hasWarnings == true) {
+      termVectors.add("warnings", warnings);
     }
+
     DocListAndSet listAndSet = rb.getResults();
     List<Integer> docIds = getInts(params.getParams(TermVectorParams.DOC_IDS));
     Iterator<Integer> iter;
@@ -109,22 +180,43 @@ public class TermVectorComponent extends
 
     IndexReader reader = searcher.getReader();
     //the TVMapper is a TermVectorMapper which can be used to optimize loading of Term Vectors
-    TVMapper mapper = new TVMapper(fields, reader, termFreq, positions, offsets, docFreq, tfIdf);
-    IndexSchema schema = rb.req.getSchema();
-    String uniqFieldName = schema.getUniqueKeyField().getName();
-    //Only load the id field
+    SchemaField keyField = schema.getUniqueKeyField();
+    String uniqFieldName = null;
+    if (keyField != null) {
+      uniqFieldName = keyField.getName();
+    }
+    //Only load the id field to get the uniqueKey of that field
     SetBasedFieldSelector fieldSelector = new SetBasedFieldSelector(Collections.singleton(uniqFieldName), Collections.<String>emptySet());
+    TVMapper mapper = new TVMapper(reader);
+    mapper.fieldOptions = allFields; //this will only stay set if fieldOptions.isEmpty() (in other words, only if the user didn't set any fields)
     while (iter.hasNext()) {
       Integer docId = iter.next();
       NamedList docNL = new NamedList();
-      termVectors.add("doc-" + docId, docNL);
       mapper.docNL = docNL;
-      Document document = reader.document(docId, fieldSelector);
-      String uniqId = document.get(uniqFieldName);
-      docNL.add("uniqueKey", uniqId);
-      reader.getTermFreqVector(docId, mapper);
+      termVectors.add("doc-" + docId, docNL);
+
+      if (keyField != null) {
+        Document document = reader.document(docId, fieldSelector);
+        Fieldable uniqId = document.getField(uniqFieldName);
+        String uniqVal = null;
+        if (uniqId != null) {
+          uniqVal = keyField.getType().storedToReadable(uniqId);          
+        }
+        if (uniqVal != null) {
+          docNL.add("uniqueKey", uniqVal);
+          termVectors.add("uniqueKeyFieldName", uniqFieldName);
+        }
+      }
+      if (fieldOptions.isEmpty() == false) {
+        for (Map.Entry<String, FieldOptions> entry : fieldOptions.entrySet()) {
+          mapper.fieldOptions = entry.getValue();
+          reader.getTermFreqVector(docId, entry.getKey(), mapper);
+        }
+      } else {
+        //deal with all fields by using the allFieldMapper
+        reader.getTermFreqVector(docId, mapper);
+      }
     }
-    termVectors.add("uniqueKeyFieldName", uniqFieldName);
   }
 
   private List<Integer> getInts(String[] vals) {
@@ -183,43 +275,27 @@ public class TermVectorComponent extends
   }
 
   private static class TVMapper extends TermVectorMapper {
-    private NamedList docNL;
     private IndexReader reader;
-    private Set<String> fields;
-    private boolean termFreq, positions, offsets, docFreq, tfIdf;
+    private NamedList docNL;
+
+    //needs to be set for each new field
+    FieldOptions fieldOptions;
+
     //internal vars not passed in by construction
-    private boolean map, useOffsets, usePositions;
+    private boolean useOffsets, usePositions;
     //private Map<String, Integer> idfCache;
     private NamedList fieldNL;
     private Term currentTerm;
 
-    /**
-     *
-     * @param fields
-     * @param reader
-     * @param termFreq
-     * @param positions true if the TVM should try to get position info from the Term Vector, assuming it is present
-     * @param offsets true if the TVM should try to get offset info from the Term Vector, assuming it is present
-     * @param docFreq
-     * @param tfIdf
-     */
-    public TVMapper(String[] fields, IndexReader reader, boolean termFreq, boolean positions, boolean offsets, boolean docFreq, boolean tfIdf) {
 
+    public TVMapper(IndexReader reader) {
       this.reader = reader;
-      this.fields = fields != null ? new HashSet<String>(Arrays.asList(fields)) : Collections.<String>emptySet();
-      this.termFreq = termFreq;
-      this.positions = positions;
-      this.offsets = offsets;
-      this.docFreq = docFreq;
-      this.tfIdf = tfIdf;
-
     }
 
-    public void map(String term, int frequency, TermVectorOffsetInfo[] offsets, int[] positions) {
-      if (map == true && fieldNL != null) {
-        NamedList termInfo = new NamedList();
-        fieldNL.add(term, termInfo);
-        if (termFreq == true) {
+    public void map(BytesRef term, int frequency, TermVectorOffsetInfo[] offsets, int[] positions) {
+      NamedList termInfo = new NamedList();
+        fieldNL.add(term.utf8ToString(), termInfo);
+        if (fieldOptions.termFreq == true) {
           termInfo.add("tf", frequency);
         }
         if (useOffsets == true) {
@@ -234,27 +310,29 @@ public class TermVectorComponent extends
         if (usePositions == true) {
           NamedList positionsNL = new NamedList();
           for (int i = 0; i < positions.length; i++) {
-            positionsNL.add("position", positions[i]);            
+            positionsNL.add("position", positions[i]);
           }
           termInfo.add("positions", positionsNL);
         }
-        if (docFreq == true) {
+        if (fieldOptions.docFreq == true) {
           termInfo.add("df", getDocFreq(term));
         }
-        if (tfIdf == true){
+        if (fieldOptions.tfIdf == true) {
           double tfIdfVal = ((double) frequency) / getDocFreq(term);
           termInfo.add("tf-idf", tfIdfVal);
         }
-      }
     }
 
-    private int getDocFreq(String term) {
+    private int getDocFreq(BytesRef term) {
       int result = 1;
       currentTerm = currentTerm.createTerm(term);
       try {
-        TermEnum termEnum = reader.terms(currentTerm);
-        if (termEnum != null && termEnum.term().equals(currentTerm)) {
-          result = termEnum.docFreq();
+        Terms terms = MultiFields.getTerms(reader, currentTerm.field());
+        if (terms != null) {
+          TermsEnum termsEnum = terms.iterator();
+          if (termsEnum.seek(term) == TermsEnum.SeekStatus.FOUND) {
+            result = termsEnum.docFreq();
+          }
         }
       } catch (IOException e) {
         throw new RuntimeException(e);
@@ -264,29 +342,23 @@ public class TermVectorComponent extends
 
     public void setExpectations(String field, int numTerms, boolean storeOffsets, boolean storePositions) {
 
-      if (docFreq == true && reader != null) {
+      if (fieldOptions.docFreq == true && reader != null) {
         this.currentTerm = new Term(field);
       }
-      useOffsets = storeOffsets && offsets;
-      usePositions = storePositions && positions;
-      if (fields.isEmpty() || fields.contains(field)) {
-        map = true;
-        fieldNL = new NamedList();
-        docNL.add(field, fieldNL);
-      } else {
-        map = false;
-        fieldNL = null;
-      }
+      useOffsets = storeOffsets && fieldOptions.offsets;
+      usePositions = storePositions && fieldOptions.positions;
+      fieldNL = new NamedList();
+      docNL.add(field, fieldNL);
     }
 
     @Override
     public boolean isIgnoringPositions() {
-      return this.positions == false;  // if we are not interested in positions, then return true telling Lucene to skip loading them
+      return fieldOptions.positions == false;  // if we are not interested in positions, then return true telling Lucene to skip loading them
     }
 
     @Override
     public boolean isIgnoringOffsets() {
-      return this.offsets == false;  //  if we are not interested in offsets, then return true telling Lucene to skip loading them
+      return fieldOptions.offsets == false;  //  if we are not interested in offsets, then return true telling Lucene to skip loading them
     }
   }
 
@@ -295,6 +367,7 @@ public class TermVectorComponent extends
   }
 
   //////////////////////// NamedListInitializedPlugin methods //////////////////////
+
   @Override
   public void init(NamedList args) {
     super.init(args);
@@ -321,3 +394,8 @@ public class TermVectorComponent extends
     return "A Component for working with Term Vectors";
   }
 }
+
+class FieldOptions {
+  String fieldName;
+  boolean termFreq, positions, offsets, docFreq, tfIdf;
+}
\ No newline at end of file

Modified: lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/request/PerSegmentSingleValuedFaceting.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/request/PerSegmentSingleValuedFaceting.java?rev=966819&r1=966818&r2=966819&view=diff
==============================================================================
--- lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/request/PerSegmentSingleValuedFaceting.java (original)
+++ lucene/dev/branches/realtime_search/solr/src/java/org/apache/solr/request/PerSegmentSingleValuedFaceting.java Thu Jul 22 19:34:35 2010
@@ -1,11 +1,16 @@
 package org.apache.solr.request;
 
+import org.apache.lucene.index.TermsEnum;
 import org.apache.lucene.search.DocIdSet;
 import org.apache.lucene.search.DocIdSetIterator;
 import org.apache.lucene.search.FieldCache;
 import org.apache.lucene.search.Filter;
 import org.apache.lucene.util.PriorityQueue;
 import org.apache.lucene.util.BytesRef;
+import org.apache.lucene.util.packed.Direct16;
+import org.apache.lucene.util.packed.Direct32;
+import org.apache.lucene.util.packed.Direct8;
+import org.apache.lucene.util.packed.PackedInts;
 import org.apache.solr.common.SolrException;
 import org.apache.solr.common.params.FacetParams;
 import org.apache.solr.common.util.NamedList;
@@ -137,7 +142,9 @@ class PerSegmentSingleValuedFaceting {
           seg.pos = seg.startTermIndex;
         }
         if (seg.pos < seg.endTermIndex) {
-          seg.si.lookup(seg.pos, seg.tempBR);
+          seg.tenum = seg.si.getTermsEnum();          
+          seg.tenum.seek(seg.pos);
+          seg.tempBR = seg.tenum.term();
           queue.add(seg);
         }
       }
@@ -156,7 +163,6 @@ class PerSegmentSingleValuedFaceting {
       SegFacet seg = queue.top();
 
       // make a shallow copy
-      // Is this always safe? Or could the byte[] be changed?
       val.bytes = seg.tempBR.bytes;
       val.offset = seg.tempBR.offset;
       val.length = seg.tempBR.length;
@@ -173,7 +179,7 @@ class PerSegmentSingleValuedFaceting {
           queue.pop();
           seg = queue.top();
         }  else {
-          seg.si.lookup(seg.pos, seg.tempBR);          
+          seg.tempBR = seg.tenum.next();
           seg = queue.updateTop();
         }
       } while (seg != null && val.compareTo(seg.tempBR) == 0);
@@ -215,9 +221,10 @@ class PerSegmentSingleValuedFaceting {
     int endTermIndex;
     int[] counts;
 
-    int pos; // only used during merge with other segments
+    int pos; // only used when merging
+    TermsEnum tenum; // only used when merging
 
-    final BytesRef tempBR = new BytesRef();
+    BytesRef tempBR = new BytesRef();
 
     void countTerms() throws IOException {
       si = FieldCache.DEFAULT.getTermsIndex(reader, fieldName);
@@ -245,21 +252,66 @@ class PerSegmentSingleValuedFaceting {
         DocIdSet idSet = baseSet.getDocIdSet(reader);
         DocIdSetIterator iter = idSet.iterator();
 
-        if (startTermIndex==0 && endTermIndex==si.numOrd()) {
-          // specialized version when collecting counts for all terms
-          int doc;
-          while ((doc = iter.nextDoc()) < DocIdSetIterator.NO_MORE_DOCS) {
-            counts[si.getOrd(doc)]++;
+
+        ////
+        PackedInts.Reader ordReader = si.getDocToOrd();
+        int doc;
+
+        if (ordReader instanceof Direct32) {
+          int[] ords = ((Direct32)ordReader).getArray();
+          if (prefix==null) {
+            while ((doc = iter.nextDoc()) < DocIdSetIterator.NO_MORE_DOCS) {
+              counts[ords[doc]]++;
+            }
+          } else {
+            while ((doc = iter.nextDoc()) < DocIdSetIterator.NO_MORE_DOCS) {
+              int term = ords[doc];
+              int arrIdx = term-startTermIndex;
+              if (arrIdx>=0 && arrIdx<nTerms) counts[arrIdx]++;
+            }
+          }
+        } else if (ordReader instanceof Direct16) {
+          short[] ords = ((Direct16)ordReader).getArray();
+          if (prefix==null) {
+            while ((doc = iter.nextDoc()) < DocIdSetIterator.NO_MORE_DOCS) {
+              counts[ords[doc] & 0xffff]++;
+            }
+          } else {
+            while ((doc = iter.nextDoc()) < DocIdSetIterator.NO_MORE_DOCS) {
+              int term = ords[doc] & 0xffff;
+              int arrIdx = term-startTermIndex;
+              if (arrIdx>=0 && arrIdx<nTerms) counts[arrIdx]++;
+            }
+          }
+        } else if (ordReader instanceof Direct8) {
+          byte[] ords = ((Direct8)ordReader).getArray();
+          if (prefix==null) {
+            while ((doc = iter.nextDoc()) < DocIdSetIterator.NO_MORE_DOCS) {
+              counts[ords[doc] & 0xff]++;
+            }
+          } else {
+            while ((doc = iter.nextDoc()) < DocIdSetIterator.NO_MORE_DOCS) {
+              int term = ords[doc] & 0xff;
+              int arrIdx = term-startTermIndex;
+              if (arrIdx>=0 && arrIdx<nTerms) counts[arrIdx]++;
+            }
           }
         } else {
-          // version that adjusts term numbers because we aren't collecting the full range
-          int doc;
-          while ((doc = iter.nextDoc()) < DocIdSetIterator.NO_MORE_DOCS) {
-            int term = si.getOrd(doc);
-            int arrIdx = term-startTermIndex;
-            if (arrIdx>=0 && arrIdx<nTerms) counts[arrIdx]++;
+          if (prefix==null) {
+            // specialized version when collecting counts for all terms
+            while ((doc = iter.nextDoc()) < DocIdSetIterator.NO_MORE_DOCS) {
+              counts[si.getOrd(doc)]++;
+            }
+          } else {
+            // version that adjusts term numbers because we aren't collecting the full range
+            while ((doc = iter.nextDoc()) < DocIdSetIterator.NO_MORE_DOCS) {
+              int term = si.getOrd(doc);
+              int arrIdx = term-startTermIndex;
+              if (arrIdx>=0 && arrIdx<nTerms) counts[arrIdx]++;
+            }
           }
         }
+
       }
     }
   }



Mime
View raw message