lucene-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From rm...@apache.org
Subject svn commit: r1068718 [14/21] - in /lucene/dev/branches/bulkpostings: ./ dev-tools/eclipse/ dev-tools/idea/.idea/ dev-tools/idea/lucene/ dev-tools/maven/ dev-tools/maven/lucene/ dev-tools/maven/lucene/contrib/ant/ dev-tools/maven/lucene/contrib/db/bdb-j...
Date Wed, 09 Feb 2011 01:04:13 GMT
Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/core/StandardIndexReaderFactory.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/core/StandardIndexReaderFactory.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/core/StandardIndexReaderFactory.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/core/StandardIndexReaderFactory.java Wed Feb  9 01:03:49 2011
@@ -32,6 +32,7 @@ public class StandardIndexReaderFactory 
   /* (non-Javadoc)
    * @see org.apache.solr.core.IndexReaderFactory#newReader(org.apache.lucene.store.Directory, boolean)
    */
+  @Override
   public IndexReader newReader(Directory indexDir, boolean readOnly)
       throws IOException {
     return IndexReader.open(indexDir, null, readOnly, termInfosIndexDivisor);

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/AnalysisRequestHandlerBase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/AnalysisRequestHandlerBase.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/AnalysisRequestHandlerBase.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/AnalysisRequestHandlerBase.java Wed Feb  9 01:03:49 2011
@@ -56,6 +56,7 @@ public abstract class AnalysisRequestHan
 
   public static final Set<BytesRef> EMPTY_BYTES_SET = Collections.emptySet();
 
+  @Override
   public void handleRequestBody(SolrQueryRequest req, SolrQueryResponse rsp) throws Exception {
     rsp.add("analysis", doAnalysis(req));
   }

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/BinaryUpdateRequestHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/BinaryUpdateRequestHandler.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/BinaryUpdateRequestHandler.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/BinaryUpdateRequestHandler.java Wed Feb  9 01:03:49 2011
@@ -46,8 +46,10 @@ import java.util.List;
 public class BinaryUpdateRequestHandler extends ContentStreamHandlerBase {
 
 
+  @Override
   protected ContentStreamLoader newLoader(SolrQueryRequest req, final UpdateRequestProcessor processor) {
     return new ContentStreamLoader() {
+      @Override
       public void load(SolrQueryRequest req, SolrQueryResponse rsp, ContentStream stream) throws Exception {
         InputStream is = null;
         try {
@@ -111,18 +113,22 @@ public class BinaryUpdateRequestHandler 
     }
   }
 
+  @Override
   public String getDescription() {
     return "Add/Update multiple documents with javabin format";
   }
 
+  @Override
   public String getSourceId() {
     return "$Id$";
   }
 
+  @Override
   public String getSource() {
     return "$URL$";
   }
 
+  @Override
   public String getVersion() {
     return "$Revision$";
   }

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/CSVRequestHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/CSVRequestHandler.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/CSVRequestHandler.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/CSVRequestHandler.java Wed Feb  9 01:03:49 2011
@@ -42,6 +42,7 @@ import java.io.*;
 
 public class CSVRequestHandler extends ContentStreamHandlerBase {
 
+  @Override
   protected ContentStreamLoader newLoader(SolrQueryRequest req, UpdateRequestProcessor processor) {
     return new SingleThreadedCSVLoader(req, processor);
   }
@@ -118,6 +119,7 @@ abstract class CSVLoader extends Content
 
   /** add zero length fields */
   private class FieldAdderEmpty extends CSVLoader.FieldAdder {
+    @Override
     void add(SolrInputDocument doc, int line, int column, String val) {
       doc.addField(fields[column].getName(),val,1.0f);
     }
@@ -127,6 +129,7 @@ abstract class CSVLoader extends Content
   private class FieldTrimmer extends CSVLoader.FieldAdder {
     private final CSVLoader.FieldAdder base;
     FieldTrimmer(CSVLoader.FieldAdder base) { this.base=base; }
+    @Override
     void add(SolrInputDocument doc, int line, int column, String val) {
       base.add(doc, line, column, val.trim());
     }
@@ -145,6 +148,7 @@ abstract class CSVLoader extends Content
      this.to=to;
      this.base=base;
    }
+    @Override
     void add(SolrInputDocument doc, int line, int column, String val) {
       if (from.equals(val)) val=to;
       base.add(doc,line,column,val);
@@ -162,6 +166,7 @@ abstract class CSVLoader extends Content
       this.base = base;
     }
 
+    @Override
     void add(SolrInputDocument doc, int line, int column, String val) {
       CSVParser parser = new CSVParser(new StringReader(val), strategy);
       try {
@@ -327,6 +332,7 @@ abstract class CSVLoader extends Content
   }
 
   /** load the CSV input */
+  @Override
   public void load(SolrQueryRequest req, SolrQueryResponse rsp, ContentStream stream) throws IOException {
     errHeader = "CSVLoader: input=" + stream.getSourceInfo();
     Reader reader = null;
@@ -403,6 +409,7 @@ class SingleThreadedCSVLoader extends CS
     super(req, processor);
   }
 
+  @Override
   void addDoc(int line, String[] vals) throws IOException {
     templateAdd.indexedId = null;
     SolrInputDocument doc = new SolrInputDocument();

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/ContentStreamHandlerBase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/ContentStreamHandlerBase.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/ContentStreamHandlerBase.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/ContentStreamHandlerBase.java Wed Feb  9 01:03:49 2011
@@ -32,6 +32,7 @@ import org.apache.solr.update.processor.
  **/
 public abstract class ContentStreamHandlerBase extends RequestHandlerBase {
 
+  @Override
   public void handleRequestBody(SolrQueryRequest req, SolrQueryResponse rsp) throws Exception {
     SolrParams params = req.getParams();
     UpdateRequestProcessorChain processorChain =

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/DocumentAnalysisRequestHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/DocumentAnalysisRequestHandler.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/DocumentAnalysisRequestHandler.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/DocumentAnalysisRequestHandler.java Wed Feb  9 01:03:49 2011
@@ -27,6 +27,7 @@ import org.apache.solr.common.params.Ana
 import org.apache.solr.common.params.CommonParams;
 import org.apache.solr.common.params.SolrParams;
 import org.apache.solr.common.util.ContentStream;
+import org.apache.solr.common.util.ContentStreamBase;
 import org.apache.solr.common.util.NamedList;
 import org.apache.solr.common.util.SimpleOrderedMap;
 import org.apache.solr.request.SolrQueryRequest;
@@ -41,7 +42,7 @@ import javax.xml.stream.XMLStreamConstan
 import javax.xml.stream.XMLStreamException;
 import javax.xml.stream.XMLStreamReader;
 import java.io.IOException;
-import java.io.Reader;
+import java.io.InputStream;
 import java.util.*;
 
 /**
@@ -105,6 +106,7 @@ public class DocumentAnalysisRequestHand
   /**
    * {@inheritDoc}
    */
+  @Override
   protected NamedList doAnalysis(SolrQueryRequest req) throws Exception {
     DocumentAnalysisRequest analysisRequest = resolveAnalysisRequest(req);
     return handleAnalysisRequest(analysisRequest, req.getSchema());
@@ -156,10 +158,14 @@ public class DocumentAnalysisRequestHand
     request.setShowMatch(showMatch);
 
     ContentStream stream = extractSingleContentStream(req);
-    Reader reader = stream.getReader();
-    XMLStreamReader parser = inputFactory.createXMLStreamReader(reader);
-
+    InputStream is = null;
+    XMLStreamReader parser = null;
+    
     try {
+      is = stream.getStream();
+      final String charset = ContentStreamBase.getCharsetFromContentType(stream.getContentType());
+      parser = (charset == null) ?
+        inputFactory.createXMLStreamReader(is) : inputFactory.createXMLStreamReader(is, charset);
 
       while (true) {
         int event = parser.next();
@@ -181,8 +187,8 @@ public class DocumentAnalysisRequestHand
       }
 
     } finally {
-      parser.close();
-      IOUtils.closeQuietly(reader);
+      if (parser != null) parser.close();
+      IOUtils.closeQuietly(is);
     }
   }
 

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/DumpRequestHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/DumpRequestHandler.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/DumpRequestHandler.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/DumpRequestHandler.java Wed Feb  9 01:03:49 2011
@@ -18,7 +18,7 @@
 package org.apache.solr.handler;
 
 import java.io.IOException;
-import java.io.InputStream;
+import java.io.Reader;
 import java.util.ArrayList;
 
 import org.apache.commons.io.IOUtils;
@@ -46,11 +46,11 @@ public class DumpRequestHandler extends 
         stream.add( "sourceInfo", content.getSourceInfo() );
         stream.add( "size", content.getSize() );
         stream.add( "contentType", content.getContentType() );
-        InputStream is = content.getStream();
+        Reader reader = content.getReader();
         try {
-          stream.add( "stream", IOUtils.toString(is) );
+          stream.add( "stream", IOUtils.toString(reader) );
         } finally {
-          is.close();
+          reader.close();
         }
         streams.add( stream );
       }

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/FieldAnalysisRequestHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/FieldAnalysisRequestHandler.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/FieldAnalysisRequestHandler.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/FieldAnalysisRequestHandler.java Wed Feb  9 01:03:49 2011
@@ -94,6 +94,7 @@ public class FieldAnalysisRequestHandler
   /**
    * {@inheritDoc}
    */
+  @Override
   protected NamedList doAnalysis(SolrQueryRequest req) throws Exception {
     FieldAnalysisRequest analysisRequest = resolveAnalysisRequest(req);
     IndexSchema indexSchema = req.getCore().getSchema();

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/JsonUpdateRequestHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/JsonUpdateRequestHandler.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/JsonUpdateRequestHandler.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/JsonUpdateRequestHandler.java Wed Feb  9 01:03:49 2011
@@ -35,6 +35,7 @@ public class JsonUpdateRequestHandler ex
     super.init(args);
   }
 
+  @Override
   protected ContentStreamLoader newLoader(SolrQueryRequest req, UpdateRequestProcessor processor) {
     return new JsonLoader(processor);
   }

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/MoreLikeThisHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/MoreLikeThisHandler.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/MoreLikeThisHandler.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/MoreLikeThisHandler.java Wed Feb  9 01:03:49 2011
@@ -232,7 +232,7 @@ public class MoreLikeThisHandler extends
     // Copied from StandardRequestHandler... perhaps it should be added to doStandardDebug?
     if (dbg == true) {
       try {
-        NamedList<Object> dbgInfo = SolrPluginUtils.doStandardDebug(req, q, mlt.mltquery, mltDocs.docList, dbgQuery, dbgResults);
+        NamedList<Object> dbgInfo = SolrPluginUtils.doStandardDebug(req, q, mlt.getRawMLTQuery(), mltDocs.docList, dbgQuery, dbgResults);
         if (null != dbgInfo) {
           if (null != filters) {
             dbgInfo.add("filter_queries",req.getParams().getParams(CommonParams.FQ));
@@ -279,8 +279,6 @@ public class MoreLikeThisHandler extends
     final boolean needDocSet;
     Map<String,Float> boostFields;
     
-    Query mltquery;  // expose this for debugging
-    
     public MoreLikeThisHelper( SolrParams params, SolrIndexSearcher searcher )
     {
       this.searcher = searcher;
@@ -310,9 +308,26 @@ public class MoreLikeThisHandler extends
       boostFields = SolrPluginUtils.parseFieldBoosts(params.getParams(MoreLikeThisParams.QF));
     }
     
-    private void setBoosts(Query mltquery) {
+    private Query rawMLTQuery;
+    private Query boostedMLTQuery;
+    private BooleanQuery realMLTQuery;
+    
+    public Query getRawMLTQuery(){
+      return rawMLTQuery;
+    }
+    
+    public Query getBoostedMLTQuery(){
+      return boostedMLTQuery;
+    }
+    
+    public Query getRealMLTQuery(){
+      return realMLTQuery;
+    }
+    
+    private Query getBoostedQuery(Query mltquery) {
+      BooleanQuery boostedQuery = (BooleanQuery)mltquery.clone();
       if (boostFields.size() > 0) {
-        List clauses = ((BooleanQuery)mltquery).clauses();
+        List clauses = boostedQuery.clauses();
         for( Object o : clauses ) {
           TermQuery q = (TermQuery)((BooleanClause)o).getQuery();
           Float b = this.boostFields.get(q.getTerm().field());
@@ -321,49 +336,51 @@ public class MoreLikeThisHandler extends
           }
         }
       }
+      return boostedQuery;
     }
     
     public DocListAndSet getMoreLikeThis( int id, int start, int rows, List<Query> filters, List<InterestingTerm> terms, int flags ) throws IOException
     {
       Document doc = reader.document(id);
-      mltquery = mlt.like(id);
-      setBoosts(mltquery);
+      rawMLTQuery = mlt.like(id);
+      boostedMLTQuery = getBoostedQuery( rawMLTQuery );
       if( terms != null ) {
-        fillInterestingTermsFromMLTQuery( mltquery, terms );
+        fillInterestingTermsFromMLTQuery( rawMLTQuery, terms );
       }
 
       // exclude current document from results
-      BooleanQuery mltQuery = new BooleanQuery();
-      mltQuery.add(mltquery, BooleanClause.Occur.MUST);
-      mltQuery.add(
+      realMLTQuery = new BooleanQuery();
+      realMLTQuery.add(boostedMLTQuery, BooleanClause.Occur.MUST);
+      realMLTQuery.add(
           new TermQuery(new Term(uniqueKeyField.getName(), uniqueKeyField.getType().storedToIndexed(doc.getFieldable(uniqueKeyField.getName())))), 
             BooleanClause.Occur.MUST_NOT);
       
       DocListAndSet results = new DocListAndSet();
       if (this.needDocSet) {
-        results = searcher.getDocListAndSet(mltQuery, filters, null, start, rows, flags);
+        results = searcher.getDocListAndSet(realMLTQuery, filters, null, start, rows, flags);
       } else {
-        results.docList = searcher.getDocList(mltQuery, filters, null, start, rows, flags);
+        results.docList = searcher.getDocList(realMLTQuery, filters, null, start, rows, flags);
       }
       return results;
     }
 
     public DocListAndSet getMoreLikeThis( Reader reader, int start, int rows, List<Query> filters, List<InterestingTerm> terms, int flags ) throws IOException
     {
-      mltquery = mlt.like(reader);
-      setBoosts(mltquery);
+      rawMLTQuery = mlt.like(reader);
+      boostedMLTQuery = getBoostedQuery( rawMLTQuery );
       if( terms != null ) {
-        fillInterestingTermsFromMLTQuery( mltquery, terms );
+        fillInterestingTermsFromMLTQuery( boostedMLTQuery, terms );
       }
       DocListAndSet results = new DocListAndSet();
       if (this.needDocSet) {
-        results = searcher.getDocListAndSet(mltquery, filters, null, start, rows, flags);
+        results = searcher.getDocListAndSet( boostedMLTQuery, filters, null, start, rows, flags);
       } else {
-        results.docList = searcher.getDocList(mltquery, filters, null, start, rows, flags);
+        results.docList = searcher.getDocList( boostedMLTQuery, filters, null, start, rows, flags);
       }
       return results;
     }
-    
+
+    @Deprecated
     public NamedList<DocList> getMoreLikeThese( DocList docs, int rows, int flags ) throws IOException
     {
       IndexSchema schema = searcher.getSchema();
@@ -382,7 +399,7 @@ public class MoreLikeThisHandler extends
     
     private void fillInterestingTermsFromMLTQuery( Query query, List<InterestingTerm> terms )
     { 
-      List clauses = ((BooleanQuery)mltquery).clauses();
+      List clauses = ((BooleanQuery)query).clauses();
       for( Object o : clauses ) {
         TermQuery q = (TermQuery)((BooleanClause)o).getQuery();
         InterestingTerm it = new InterestingTerm();

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/ReplicationHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/ReplicationHandler.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/ReplicationHandler.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/ReplicationHandler.java Wed Feb  9 01:03:49 2011
@@ -98,6 +98,7 @@ public class ReplicationHandler extends 
 
   private AtomicBoolean replicationEnabled = new AtomicBoolean(true);
 
+  @Override
   public void handleRequestBody(SolrQueryRequest req, SolrQueryResponse rsp) throws Exception {
     rsp.setHttpCaching(false);
     final SolrParams solrParams = req.getParams();
@@ -143,6 +144,7 @@ public class ReplicationHandler extends 
       }
       final SolrParams paramsCopy = new ModifiableSolrParams(solrParams);
       new Thread() {
+        @Override
         public void run() {
           doFetch(paramsCopy);
         }
@@ -447,18 +449,22 @@ public class ReplicationHandler extends 
     return fileMeta;
   }
 
+  @Override
   public String getDescription() {
     return "ReplicationHandler provides replication of index and configuration files from Master to Slaves";
   }
 
+  @Override
   public String getSourceId() {
     return "$Id$";
   }
 
+  @Override
   public String getSource() {
     return "$URL$";
   }
 
+  @Override
   public String getVersion() {
     return "$Revision$";
   }
@@ -687,12 +693,12 @@ public class ReplicationHandler extends 
           LOG.error("Exception while writing replication details: ", e);
         }
       }
-      if (isMaster)
-        details.add("master", master);
-      if (isSlave && showSlaveDetails)
-        details.add("slave", slave);
-
     }
+
+    if (isMaster)
+      details.add("master", master);
+    if (isSlave && showSlaveDetails)
+      details.add("slave", slave);
     
     NamedList snapshotStats = snapShootDetails;
     if (snapshotStats != null)

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/RequestHandlerUtils.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/RequestHandlerUtils.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/RequestHandlerUtils.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/RequestHandlerUtils.java Wed Feb  9 01:03:49 2011
@@ -49,7 +49,7 @@ public class RequestHandlerUtils
    * Check the request parameters and decide if it should commit or optimize.
    * If it does, it will check parameters for "waitFlush" and "waitSearcher"
    * 
-   * @deprecated Use {@link #handleCommit(UpdateRequestProcessor,SolrParams,boolean)}
+   * @deprecated Use {@link #handleCommit(SolrQueryRequest,UpdateRequestProcessor,SolrParams,boolean)}
    *
    * @since solr 1.2
    */

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/SnapPuller.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/SnapPuller.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/SnapPuller.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/SnapPuller.java Wed Feb  9 01:03:49 2011
@@ -300,15 +300,17 @@ public class SnapPuller {
         isFullCopyNeeded = true;
       successfulInstall = false;
       boolean deleteTmpIdxDir = true;
+      File indexDir = null ;
       try {
-        File indexDir = new File(core.getIndexDir());
+        indexDir = new File(core.getIndexDir());
         downloadIndexFiles(isFullCopyNeeded, tmpIndexDir, latestVersion);
         LOG.info("Total time taken for download : " + ((System.currentTimeMillis() - replicationStartTime) / 1000) + " secs");
         Collection<Map<String, Object>> modifiedConfFiles = getModifiedConfFiles(confFilesToDownload);
         if (!modifiedConfFiles.isEmpty()) {
           downloadConfFiles(confFilesToDownload, latestVersion);
           if (isFullCopyNeeded) {
-            modifyIndexProps(tmpIndexDir.getName());
+            successfulInstall = modifyIndexProps(tmpIndexDir.getName());
+            deleteTmpIdxDir =  false;
           } else {
             successfulInstall = copyIndexFiles(tmpIndexDir, indexDir);
           }
@@ -339,7 +341,8 @@ public class SnapPuller {
       } catch (Exception e) {
         throw new SolrException(SolrException.ErrorCode.SERVER_ERROR, "Index fetch failed : ", e);
       } finally {
-        if(deleteTmpIdxDir) delTree(tmpIndexDir);
+        if (deleteTmpIdxDir) delTree(tmpIndexDir);
+        else delTree(indexDir);
       }
       return successfulInstall;
     } finally {
@@ -505,6 +508,7 @@ public class SnapPuller {
 
   private void reloadCore() {
     new Thread() {
+      @Override
       public void run() {
         try {
           solrCore.getCoreDescriptor().getCoreContainer().reload(solrCore.getName());

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/SnapShooter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/SnapShooter.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/SnapShooter.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/SnapShooter.java Wed Feb  9 01:03:49 2011
@@ -64,6 +64,7 @@ public class SnapShooter {
     replicationHandler.core.getDeletionPolicy().saveCommitPoint(indexCommit.getVersion());
 
     new Thread() {
+      @Override
       public void run() {
         createSnapshot(indexCommit, replicationHandler);
       }

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/XMLLoader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/XMLLoader.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/XMLLoader.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/XMLLoader.java Wed Feb  9 01:03:49 2011
@@ -24,6 +24,7 @@ import org.apache.solr.update.DeleteUpda
 import org.apache.solr.request.SolrQueryRequest;
 import org.apache.solr.response.SolrQueryResponse;
 import org.apache.solr.common.util.ContentStream;
+import org.apache.solr.common.util.ContentStreamBase;
 import org.apache.solr.common.util.StrUtils;
 import org.apache.solr.common.SolrException;
 import org.apache.solr.common.SolrInputDocument;
@@ -36,8 +37,8 @@ import javax.xml.stream.FactoryConfigura
 import javax.xml.stream.XMLStreamConstants;
 import javax.xml.stream.XMLInputFactory;
 import javax.xml.transform.TransformerConfigurationException;
-import java.io.Reader;
-import java.io.StringReader;
+import java.io.ByteArrayInputStream;
+import java.io.InputStream;
 import java.io.IOException;
 
 
@@ -54,24 +55,31 @@ class XMLLoader extends ContentStreamLoa
     this.inputFactory = inputFactory;
   }
 
+  @Override
   public void load(SolrQueryRequest req, SolrQueryResponse rsp, ContentStream stream) throws Exception {
     errHeader = "XMLLoader: " + stream.getSourceInfo();
-    Reader reader = null;
+    InputStream is = null;
+    XMLStreamReader parser = null;
     try {
-      reader = stream.getReader();
+      is = stream.getStream();
+      final String charset = ContentStreamBase.getCharsetFromContentType(stream.getContentType());
       if (XmlUpdateRequestHandler.log.isTraceEnabled()) {
-        String body = IOUtils.toString(reader);
-        XmlUpdateRequestHandler.log.trace("body", body);
-        reader = new StringReader(body);
+        final byte[] body = IOUtils.toByteArray(is);
+        // TODO: The charset may be wrong, as the real charset is later
+        // determined by the XML parser, the content-type is only used as a hint!
+        XmlUpdateRequestHandler.log.trace("body", new String(body, (charset == null) ?
+          ContentStreamBase.DEFAULT_CHARSET : charset));
+        IOUtils.closeQuietly(is);
+        is = new ByteArrayInputStream(body);
       }
-
-      XMLStreamReader parser = inputFactory.createXMLStreamReader(reader);
+      parser = (charset == null) ?
+        inputFactory.createXMLStreamReader(is) : inputFactory.createXMLStreamReader(is, charset);
       this.processUpdate(req, processor, parser);
-    }
-    catch (XMLStreamException e) {
+    } catch (XMLStreamException e) {
       throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, e.getMessage(), e);
     } finally {
-      IOUtils.closeQuietly(reader);
+      if (parser != null) parser.close();
+      IOUtils.closeQuietly(is);
     }
   }
 

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/XmlUpdateRequestHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/XmlUpdateRequestHandler.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/XmlUpdateRequestHandler.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/XmlUpdateRequestHandler.java Wed Feb  9 01:03:49 2011
@@ -80,6 +80,7 @@ public class XmlUpdateRequestHandler ext
     }
   }
 
+  @Override
   protected ContentStreamLoader newLoader(SolrQueryRequest req, UpdateRequestProcessor processor) {
     return new XMLLoader(processor, inputFactory);
   }

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/admin/ShowFileRequestHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/admin/ShowFileRequestHandler.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/admin/ShowFileRequestHandler.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/admin/ShowFileRequestHandler.java Wed Feb  9 01:03:49 2011
@@ -210,7 +210,7 @@ public class ShowFileRequestHandler exte
     }
     try {
       InputStream input = core.getResourceLoader().openResource(path);
-      return IOUtils.toString( input );
+      return IOUtils.toString( input, "UTF-8" );
     }
     catch( Exception ex ) {} // ignore it
     return "";

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/admin/SolrInfoMBeanHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/admin/SolrInfoMBeanHandler.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/admin/SolrInfoMBeanHandler.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/admin/SolrInfoMBeanHandler.java Wed Feb  9 01:03:49 2011
@@ -1,5 +1,22 @@
 package org.apache.solr.handler.admin;
 
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 import org.apache.solr.handler.RequestHandlerBase;
 import org.apache.solr.request.SolrQueryRequest;
 import org.apache.solr.core.SolrInfoMBean;
@@ -32,6 +49,7 @@ public class SolrInfoMBeanHandler extend
   }
   
 
+  @Override
   public void handleRequestBody(SolrQueryRequest req, SolrQueryResponse rsp) throws Exception {
     SolrCore core = req.getCore();
     
@@ -77,18 +95,22 @@ public class SolrInfoMBeanHandler extend
     rsp.setHttpCaching(false); // never cache, no matter what init config looks like
   }
 
+  @Override
   public String getDescription() {
     return "Get Info (and statistics) about all registered SolrInfoMBeans";
   }
 
+  @Override
   public String getSourceId() {
     return "$Id$";
   }
 
+  @Override
   public String getSource() {
     return "$URL$";
   }
 
+  @Override
   public String getVersion() {
     return "$Revision$";
   }

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/admin/SystemInfoHandler.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/admin/SystemInfoHandler.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/admin/SystemInfoHandler.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/admin/SystemInfoHandler.java Wed Feb  9 01:03:49 2011
@@ -185,6 +185,7 @@ public class SystemInfoHandler extends R
     try {
       Process process = Runtime.getRuntime().exec(cmd);
       in = new DataInputStream( process.getInputStream() );
+      // use default charset from locale here, because the command invoked also uses the default locale:
       return IOUtils.toString( in );
     }
     catch( Exception ex ) {

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/DebugComponent.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/DebugComponent.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/DebugComponent.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/DebugComponent.java Wed Feb  9 01:03:49 2011
@@ -86,6 +86,7 @@ public class DebugComponent extends Sear
   }
 
 
+  @Override
   public void modifyRequest(ResponseBuilder rb, SearchComponent who, ShardRequest sreq) {
     if (!rb.isDebug()) return;
 

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/FacetComponent.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/FacetComponent.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/FacetComponent.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/FacetComponent.java Wed Feb  9 01:03:49 2011
@@ -726,6 +726,7 @@ public class FacetComponent extends Sear
     public long count;
     public int termNum;  // term number starting at 0 (used in bit arrays)
 
+    @Override
     public String toString() {
       return "{term="+name+",termNum="+termNum+",count="+count+"}";
     }

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/HighlightComponent.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/HighlightComponent.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/HighlightComponent.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/HighlightComponent.java Wed Feb  9 01:03:49 2011
@@ -131,6 +131,7 @@ public class HighlightComponent extends 
     }
   }
 
+  @Override
   public void modifyRequest(ResponseBuilder rb, SearchComponent who, ShardRequest sreq) {
     if (!rb.doHighlights) return;
 

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/MoreLikeThisComponent.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/MoreLikeThisComponent.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/MoreLikeThisComponent.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/MoreLikeThisComponent.java Wed Feb  9 01:03:49 2011
@@ -23,8 +23,12 @@ import java.net.URL;
 import org.apache.solr.common.params.MoreLikeThisParams;
 import org.apache.solr.common.params.SolrParams;
 import org.apache.solr.common.util.NamedList;
+import org.apache.solr.common.util.SimpleOrderedMap;
 import org.apache.solr.handler.MoreLikeThisHandler;
+import org.apache.solr.schema.IndexSchema;
+import org.apache.solr.search.DocIterator;
 import org.apache.solr.search.DocList;
+import org.apache.solr.search.DocListAndSet;
 import org.apache.solr.search.SolrIndexSearcher;
 
 /**
@@ -50,18 +54,59 @@ public class MoreLikeThisComponent exten
     if( p.getBool( MoreLikeThisParams.MLT, false ) ) {
       SolrIndexSearcher searcher = rb.req.getSearcher();
       
-      MoreLikeThisHandler.MoreLikeThisHelper mlt 
-        = new MoreLikeThisHandler.MoreLikeThisHelper( p, searcher );
-      
-      int mltcount = p.getInt( MoreLikeThisParams.DOC_COUNT, 5 );
-      NamedList<DocList> sim = mlt.getMoreLikeThese(
-          rb.getResults().docList, mltcount, rb.getFieldFlags() );
+      NamedList<DocList> sim = getMoreLikeThese( rb, searcher,
+          rb.getResults().docList, rb.getFieldFlags() );
 
       // TODO ???? add this directly to the response?
       rb.rsp.add( "moreLikeThis", sim );
     }
   }
 
+  NamedList<DocList> getMoreLikeThese( ResponseBuilder rb, SolrIndexSearcher searcher,
+      DocList docs, int flags ) throws IOException {
+    SolrParams p = rb.req.getParams();
+    IndexSchema schema = searcher.getSchema();
+    MoreLikeThisHandler.MoreLikeThisHelper mltHelper 
+      = new MoreLikeThisHandler.MoreLikeThisHelper( p, searcher );
+    NamedList<DocList> mlt = new SimpleOrderedMap<DocList>();
+    DocIterator iterator = docs.iterator();
+
+    SimpleOrderedMap<Object> dbg = null;
+    if( rb.isDebug() ){
+      dbg = new SimpleOrderedMap<Object>();
+    }
+
+    while( iterator.hasNext() ) {
+      int id = iterator.nextDoc();
+      int rows = p.getInt( MoreLikeThisParams.DOC_COUNT, 5 );
+      DocListAndSet sim = mltHelper.getMoreLikeThis( id, 0, rows, null, null, flags );
+      String name = schema.printableUniqueKey( searcher.doc( id ) );
+      mlt.add(name, sim.docList);
+      
+      if( dbg != null ){
+        SimpleOrderedMap<Object> docDbg = new SimpleOrderedMap<Object>();
+        docDbg.add( "rawMLTQuery", mltHelper.getRawMLTQuery().toString() );
+        docDbg.add( "boostedMLTQuery", mltHelper.getBoostedMLTQuery().toString() );
+        docDbg.add( "realMLTQuery", mltHelper.getRealMLTQuery().toString() );
+        SimpleOrderedMap<Object> explains = new SimpleOrderedMap<Object>();
+        DocIterator mltIte = sim.docList.iterator();
+        while( mltIte.hasNext() ){
+          int mltid = mltIte.nextDoc();
+          String key = schema.printableUniqueKey( searcher.doc( mltid ) );
+          explains.add( key, searcher.explain( mltHelper.getRealMLTQuery(), mltid ) );
+        }
+        docDbg.add( "explain", explains );
+        dbg.add( name, docDbg );
+      }
+    }
+
+    // add debug information
+    if( dbg != null ){
+      rb.addDebugInfo( "moreLikeThis", dbg );
+    }
+    return mlt;
+  }
+  
   /////////////////////////////////////////////
   ///  SolrInfoMBean
   ////////////////////////////////////////////

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/PivotFacetHelper.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/PivotFacetHelper.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/PivotFacetHelper.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/PivotFacetHelper.java Wed Feb  9 01:03:49 2011
@@ -102,7 +102,7 @@ public class PivotFacetHelper
     List<NamedList<Object>> values = new ArrayList<NamedList<Object>>( superFacets.size() );
     for (Map.Entry<String, Integer> kv : superFacets) {
       // Only sub-facet if parent facet has positive count - still may not be any values for the sub-field though
-      if (kv.getValue() > minMatch ) {
+      if (kv.getValue() >= minMatch ) {
         // don't reuse the same BytesRef  each time since we will be constructing Term
         // objects that will most likely be cached.
         BytesRef termval = new BytesRef();
@@ -122,7 +122,7 @@ public class PivotFacetHelper
           SimpleFacets sf = getFacetImplementation(rb.req, subset, rb.req.getParams());
           
           NamedList<Integer> nl = sf.getTermCounts(subField);
-          if (nl.size() > minMatch ) {
+          if (nl.size() >= minMatch ) {
             pivot.add( "pivot", doPivots( nl, subField, nextField, fnames, rb, subset, minMatch ) );
             values.add( pivot ); // only add response if there are some counts
           }

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/QueryComponent.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/QueryComponent.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/QueryComponent.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/QueryComponent.java Wed Feb  9 01:03:49 2011
@@ -107,7 +107,6 @@ public class QueryComponent extends Sear
         List<Query> filters = rb.getFilters();
         if (filters==null) {
           filters = new ArrayList<Query>(fqs.length);
-          rb.setFilters( filters );
         }
         for (String fq : fqs) {
           if (fq != null && fq.trim().length()!=0) {
@@ -115,6 +114,12 @@ public class QueryComponent extends Sear
             filters.add(fqp.getQuery());
           }
         }
+        // only set the filters if they are not empty otherwise
+        // fq=&someotherParam= will trigger all docs filter for every request 
+        // if filter cache is disabled
+        if (!filters.isEmpty()) {
+          rb.setFilters( filters );
+        }
       }
     } catch (ParseException e) {
       throw new SolrException(SolrException.ErrorCode.BAD_REQUEST, e);

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/QueryElevationComponent.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/QueryElevationComponent.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/QueryElevationComponent.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/QueryElevationComponent.java Wed Feb  9 01:03:49 2011
@@ -474,6 +474,7 @@ class ElevationComparatorSource extends 
     this.priority = boosts;
   }
 
+  @Override
   public FieldComparator newComparator(final String fieldname, final int numHits, int sortPos, boolean reversed) throws IOException {
     return new FieldComparator() {
       
@@ -482,10 +483,12 @@ class ElevationComparatorSource extends 
       int bottomVal;
       private final BytesRef tempBR = new BytesRef();
 
+      @Override
       public int compare(int slot1, int slot2) {
         return values[slot2] - values[slot1];  // values will be small enough that there is no overflow concern
       }
 
+      @Override
       public void setBottom(int slot) {
         bottomVal = values[slot];
       }
@@ -496,19 +499,23 @@ class ElevationComparatorSource extends 
         return prio == null ? 0 : prio.intValue();
       }
 
+      @Override
       public int compareBottom(int doc) throws IOException {
         return docVal(doc) - bottomVal;
       }
 
+      @Override
       public void copy(int slot, int doc) throws IOException {
         values[slot] = docVal(doc);
       }
 
+      @Override
       public FieldComparator setNextReader(AtomicReaderContext context) throws IOException {
         idIndex = FieldCache.DEFAULT.getTermsIndex(context.reader, fieldname);
         return this;
       }
 
+      @Override
       public Comparable value(int slot) {
         return values[slot];
       }

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/ShardDoc.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/ShardDoc.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/ShardDoc.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/ShardDoc.java Wed Feb  9 01:03:49 2011
@@ -56,6 +56,7 @@ public class ShardDoc {
   int positionInResponse;
   // the ordinal position in the merged response arraylist  
 
+  @Override
   public String toString(){
     return "id="+id
             +" ,score="+score
@@ -226,6 +227,7 @@ class ShardFieldSortedHitQueue extends P
   // the negative sign on the final compareTo().
   Comparator comparatorNatural(String fieldName) {
     return new ShardComparator(fieldName) {
+      @Override
       public final int compare(final Object o1, final Object o2) {
         ShardDoc sd1 = (ShardDoc) o1;
         ShardDoc sd2 = (ShardDoc) o2;
@@ -247,6 +249,7 @@ class ShardFieldSortedHitQueue extends P
       Locale locale) {
     final Collator collator = Collator.getInstance(locale);
     return new ShardComparator(fieldName) {
+      @Override
       public final int compare(final Object o1, final Object o2) {
         ShardDoc sd1 = (ShardDoc) o1;
         ShardDoc sd2 = (ShardDoc) o2;
@@ -266,6 +269,7 @@ class ShardFieldSortedHitQueue extends P
 
   Comparator comparatorMissingStringLast(final String fieldName) {
      return new ShardComparator(fieldName) {
+      @Override
       public final int compare(final Object o1, final Object o2) {
         ShardDoc sd1 = (ShardDoc) o1;
         ShardDoc sd2 = (ShardDoc) o2;

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/ShardRequest.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/ShardRequest.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/ShardRequest.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/ShardRequest.java Wed Feb  9 01:03:49 2011
@@ -56,6 +56,7 @@ public class ShardRequest {
   // this would work well if we ever transitioned to using internal ids and
   // didn't require a uniqueId
 
+  @Override
   public String toString() {
     return "ShardRequest:{params=" + params
             + ", purpose=" + Integer.toHexString(purpose)

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/ShardResponse.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/ShardResponse.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/ShardResponse.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/ShardResponse.java Wed Feb  9 01:03:49 2011
@@ -27,6 +27,7 @@ public final class ShardResponse {
   private Throwable exception;
   private SolrResponse rsp;
 
+  @Override
   public String toString() {
     return "ShardResponse:{shard="+shard+",shardAddress="+shardAddress
             +"\n\trequest=" + req

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/TermVectorComponent.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/TermVectorComponent.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/TermVectorComponent.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/TermVectorComponent.java Wed Feb  9 01:03:49 2011
@@ -61,6 +61,20 @@ import java.util.Map;
  * term, frequency, position, offset, IDF.
  * <p/>
  * <b>Note</b> Returning IDF can be expensive.
+ * 
+ * <pre class="prettyprint">
+ * &lt;searchComponent name="tvComponent" class="solr.TermVectorComponent"/&gt;
+ * 
+ * &lt;requestHandler name="/terms" class="solr.SearchHandler"&gt;
+ *   &lt;lst name="defaults"&gt;
+ *     &lt;bool name="tv"&gt;true&lt;/bool&gt;
+ *   &lt;/lst&gt;
+ *   &lt;arr name="last-component"&gt;
+ *     &lt;str&gt;tvComponent&lt;/str&gt;
+ *   &lt;/arr&gt;
+ * &lt;/requestHandler&gt;</pre>
+ *
+ * @version $Id$
  */
 public class TermVectorComponent extends SearchComponent implements SolrCoreAware {
 
@@ -71,6 +85,7 @@ public class TermVectorComponent extends
   public static final String TERM_VECTORS = "termVectors";
 
 
+  @Override
   public void process(ResponseBuilder rb) throws IOException {
     SolrParams params = rb.req.getParams();
     if (!params.getBool(COMPONENT_NAME, false)) {
@@ -288,6 +303,7 @@ public class TermVectorComponent extends
       this.reader = reader;
     }
 
+    @Override
     public void map(BytesRef term, int frequency, TermVectorOffsetInfo[] offsets, int[] positions) {
       NamedList<Object> termInfo = new NamedList<Object>();
       fieldNL.add(term.utf8ToString(), termInfo);
@@ -336,6 +352,7 @@ public class TermVectorComponent extends
       return result;
     }
 
+    @Override
     public void setExpectations(String field, int numTerms, boolean storeOffsets, boolean storePositions) {
 
       if (fieldOptions.docFreq == true && reader != null) {
@@ -358,6 +375,7 @@ public class TermVectorComponent extends
     }
   }
 
+  @Override
   public void prepare(ResponseBuilder rb) throws IOException {
 
   }
@@ -374,18 +392,22 @@ public class TermVectorComponent extends
 
   }
 
+  @Override
   public String getVersion() {
     return "$Revision$";
   }
 
+  @Override
   public String getSourceId() {
     return "$Id$";
   }
 
+  @Override
   public String getSource() {
     return "$URL$";
   }
 
+  @Override
   public String getDescription() {
     return "A Component for working with Term Vectors";
   }

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/TermsComponent.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/TermsComponent.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/TermsComponent.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/handler/component/TermsComponent.java Wed Feb  9 01:03:49 2011
@@ -41,9 +41,22 @@ import java.util.regex.Pattern;
 
 /**
  * Return TermEnum information, useful for things like auto suggest.
+ * 
+ * <pre class="prettyprint">
+ * &lt;searchComponent name="termsComponent" class="solr.TermsComponent"/&gt;
+ * 
+ * &lt;requestHandler name="/terms" class="solr.SearchHandler"&gt;
+ *   &lt;lst name="defaults"&gt;
+ *     &lt;bool name="terms"&gt;true&lt;/bool&gt;
+ *   &lt;/lst&gt;
+ *   &lt;arr name="components"&gt;
+ *     &lt;str&gt;termsComponent&lt;/str&gt;
+ *   &lt;/arr&gt;
+ * &lt;/requestHandler&gt;</pre>
  *
  * @see org.apache.solr.common.params.TermsParams
  *      See Lucene's TermEnum class
+ * @version $Id$
  */
 public class TermsComponent extends SearchComponent {
   public static final int UNLIMITED_MAX_COUNT = -1;
@@ -68,6 +81,7 @@ public class TermsComponent extends Sear
     }
   }
 
+  @Override
   public void process(ResponseBuilder rb) throws IOException {
     SolrParams params = rb.req.getParams();
     if (!params.getBool(TermsParams.TERMS, false)) return;
@@ -463,18 +477,22 @@ public class TermsComponent extends Sear
     }
   }
 
+  @Override
   public String getVersion() {
     return "$Revision$";
   }
 
+  @Override
   public String getSourceId() {
     return "$Id$";
   }
 
+  @Override
   public String getSource() {
     return "$URL$";
   }
 
+  @Override
   public String getDescription() {
     return "A Component for working with Term Enumerators";
   }

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/highlight/DefaultSolrHighlighter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/highlight/DefaultSolrHighlighter.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/highlight/DefaultSolrHighlighter.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/highlight/DefaultSolrHighlighter.java Wed Feb  9 01:03:49 2011
@@ -120,6 +120,7 @@ public class DefaultSolrHighlighter exte
   }
   //just for back-compat with the deprecated method
   private boolean initialized = false;
+  @Override
   @Deprecated
   public void initalize( SolrConfig config) {
     if (initialized) return;
@@ -333,6 +334,7 @@ public class DefaultSolrHighlighter exte
    * @return NamedList containing a NamedList for each document, which in 
    * turns contains sets (field, summary) pairs.
    */
+  @Override
   @SuppressWarnings("unchecked")
   public NamedList<Object> doHighlighting(DocList docs, Query query, SolrQueryRequest req, String[] defaultFields) throws IOException {
     SolrParams params = req.getParams(); 
@@ -639,6 +641,7 @@ class TermOffsetsTokenStream {
         this.length = length;
       }
       
+      @Override
       public boolean incrementToken() throws IOException {
         while( true ){
           if( bufferedToken == null ) {

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/highlight/GapFragmenter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/highlight/GapFragmenter.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/highlight/GapFragmenter.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/highlight/GapFragmenter.java Wed Feb  9 01:03:49 2011
@@ -92,6 +92,7 @@ class LuceneGapFragmenter extends Simple
   /* (non-Javadoc)
    * @see org.apache.lucene.search.highlight.TextFragmenter#start(java.lang.String)
    */
+  @Override
   public void start(String originalText, TokenStream tokenStream) {
     offsetAtt = tokenStream.getAttribute(OffsetAttribute.class);
     posIncAtt = tokenStream.getAttribute(PositionIncrementAttribute.class);
@@ -101,6 +102,7 @@ class LuceneGapFragmenter extends Simple
   /* (non-Javadoc)
    * @see org.apache.lucene.search.highlight.TextFragmenter#isNewFragment(org.apache.lucene.analysis.Token)
    */
+  @Override
   public boolean isNewFragment() {
     int endOffset = offsetAtt.endOffset();
     boolean isNewFrag = 

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/highlight/RegexFragmenter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/highlight/RegexFragmenter.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/highlight/RegexFragmenter.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/highlight/RegexFragmenter.java Wed Feb  9 01:03:49 2011
@@ -54,6 +54,7 @@ public class RegexFragmenter extends Hig
   protected String defaultPatternRaw;
   protected Pattern defaultPattern;
 
+  @Override
   public void init(NamedList args) {
     super.init(args);
     defaultPatternRaw = LuceneRegexFragmenter.DEFAULT_PATTERN_RAW;

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/request/PerSegmentSingleValuedFaceting.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/request/PerSegmentSingleValuedFaceting.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/request/PerSegmentSingleValuedFaceting.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/request/PerSegmentSingleValuedFaceting.java Wed Feb  9 01:03:49 2011
@@ -1,3 +1,20 @@
+/**
+ * Licensed to the Apache Software Foundation (ASF) under one or more
+ * contributor license agreements.  See the NOTICE file distributed with
+ * this work for additional information regarding copyright ownership.
+ * The ASF licenses this file to You under the Apache License, Version 2.0
+ * (the "License"); you may not use this file except in compliance with
+ * the License.  You may obtain a copy of the License at
+ *
+ *     http://www.apache.org/licenses/LICENSE-2.0
+ *
+ * Unless required by applicable law or agreed to in writing, software
+ * distributed under the License is distributed on an "AS IS" BASIS,
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
+ * See the License for the specific language governing permissions and
+ * limitations under the License.
+ */
+
 package org.apache.solr.request;
 
 import org.apache.lucene.index.IndexReader.AtomicReaderContext;

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/request/ServletSolrParams.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/request/ServletSolrParams.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/request/ServletSolrParams.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/request/ServletSolrParams.java Wed Feb  9 01:03:49 2011
@@ -29,6 +29,7 @@ public class ServletSolrParams extends M
     super(req.getParameterMap());
   }
 
+  @Override
   public String get(String name) {
     String[] arr = map.get(name);
     if (arr==null) return null;

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/request/SimpleFacets.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/request/SimpleFacets.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/request/SimpleFacets.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/request/SimpleFacets.java Wed Feb  9 01:03:49 2011
@@ -1159,9 +1159,11 @@ public class SimpleFacets {
     }
     public K key;
     public V val;
+    @Override
     public int hashCode() {
       return key.hashCode() ^ val.hashCode();
     }
+    @Override
     public boolean equals(Object o) {
       if (! (o instanceof CountPair)) return false;
       CountPair<?,?> that = (CountPair<?,?>) o;
@@ -1272,9 +1274,11 @@ public class SimpleFacets {
     extends RangeEndpointCalculator<Float> {
 
     public FloatRangeEndpointCalculator(final SchemaField f) { super(f); }
+    @Override
     protected Float parseVal(String rawval) {
       return Float.valueOf(rawval);
     }
+    @Override
     public Float parseAndAddGap(Float value, String gap) {
       return new Float(value.floatValue() + Float.valueOf(gap).floatValue());
     }
@@ -1283,9 +1287,11 @@ public class SimpleFacets {
     extends RangeEndpointCalculator<Double> {
 
     public DoubleRangeEndpointCalculator(final SchemaField f) { super(f); }
+    @Override
     protected Double parseVal(String rawval) {
       return Double.valueOf(rawval);
     }
+    @Override
     public Double parseAndAddGap(Double value, String gap) {
       return new Double(value.floatValue() + Double.valueOf(gap).floatValue());
     }
@@ -1294,9 +1300,11 @@ public class SimpleFacets {
     extends RangeEndpointCalculator<Integer> {
 
     public IntegerRangeEndpointCalculator(final SchemaField f) { super(f); }
+    @Override
     protected Integer parseVal(String rawval) {
       return Integer.valueOf(rawval);
     }
+    @Override
     public Integer parseAndAddGap(Integer value, String gap) {
       return new Integer(value.intValue() + Integer.valueOf(gap).intValue());
     }
@@ -1305,9 +1313,11 @@ public class SimpleFacets {
     extends RangeEndpointCalculator<Long> {
 
     public LongRangeEndpointCalculator(final SchemaField f) { super(f); }
+    @Override
     protected Long parseVal(String rawval) {
       return Long.valueOf(rawval);
     }
+    @Override
     public Long parseAndAddGap(Long value, String gap) {
       return new Long(value.intValue() + Long.valueOf(gap).intValue());
     }
@@ -1324,15 +1334,19 @@ public class SimpleFacets {
           ("SchemaField must use filed type extending DateField");
       }
     }
+    @Override
     public String formatValue(Date val) {
       return ((DateField)field.getType()).toExternal(val);
     }
+    @Override
     protected Date parseVal(String rawval) {
       return ((DateField)field.getType()).parseMath(now, rawval);
     }
+    @Override
     protected Object parseGap(final String rawval) {
       return rawval;
     }
+    @Override
     public Date parseAndAddGap(Date value, String gap) throws java.text.ParseException {
       final DateMathParser dmp = new DateMathParser(DateField.UTC, Locale.US);
       dmp.setNow(value);

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/request/SolrQueryRequestBase.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/request/SolrQueryRequestBase.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/request/SolrQueryRequestBase.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/request/SolrQueryRequestBase.java Wed Feb  9 01:03:49 2011
@@ -127,6 +127,7 @@ public abstract class SolrQueryRequestBa
     return origParams.toString();
   }
 
+  @Override
   public String toString() {
     return this.getClass().getSimpleName() + '{' + params + '}';
   }

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/request/UnInvertedField.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/request/UnInvertedField.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/request/UnInvertedField.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/request/UnInvertedField.java Wed Feb  9 01:03:49 2011
@@ -895,6 +895,7 @@ public class UnInvertedField {
     return te.skipTo(termNum);
   }
 
+  @Override
   public String toString() {
     return "{field=" + field
             + ",memSize="+memSize()
@@ -1163,6 +1164,7 @@ class TermIndex {
       ArrayList<BytesRef> lst;
       PagedBytes bytes;
 
+      @Override
       protected BytesRef setTerm() throws IOException {
         BytesRef br = super.setTerm();
         if (br != null && (pos & intervalMask)==0) {
@@ -1178,10 +1180,12 @@ class TermIndex {
         return br;
       }
 
+      @Override
       public BytesRef skipTo(int termNumber) throws IOException {
         throw new UnsupportedOperationException();
       }
 
+      @Override
       public void close() throws IOException {
         nTerms=pos;
         super.close();

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/response/BaseResponseWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/response/BaseResponseWriter.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/response/BaseResponseWriter.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/response/BaseResponseWriter.java Wed Feb  9 01:03:49 2011
@@ -302,12 +302,12 @@ public abstract class BaseResponseWriter
      * {@link SolrInputDocument}s to be spit out as a {@link SolrDocumentList}
      * so they can be processed as a whole, rather than on a doc-by-doc basis.
      * If set to false, this method calls
-     * {@link #writeAllDocs(DocListInfo, List)}, else if set to true, then this
+     * {@link #writeAllDocs(BaseResponseWriter.DocListInfo, List)}, else if set to true, then this
      * method forces calling {@link #writeDoc(SolrDocument)} on a doc-by-doc
      * basis. one
      * 
      * @return True to force {@link #writeDoc(SolrDocument)} to be called, False
-     *         to force {@link #writeAllDocs(DocListInfo, List)} to be called.
+     *         to force {@link #writeAllDocs(BaseResponseWriter.DocListInfo, List)} to be called.
      */
     public boolean isStreamingDocs() { return true; }
 

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/response/JSONResponseWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/response/JSONResponseWriter.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/response/JSONResponseWriter.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/response/JSONResponseWriter.java Wed Feb  9 01:03:49 2011
@@ -286,6 +286,7 @@ class JSONWriter extends TextResponseWri
   }
 
 
+  @Override
   public void writeNamedList(String name, NamedList val) throws IOException {
     if (val instanceof SimpleOrderedMap) {
       writeNamedListAsMapWithDups(name,val);
@@ -391,6 +392,7 @@ class JSONWriter extends TextResponseWri
     writeMapCloser();
   }
 
+  @Override
   public void writeSolrDocument(String name, SolrDocument doc, Set<String> returnFields, Map pseudoFields) throws IOException {
     writeMapOpener(-1); // no trivial way to determine map size
     // TODO: could easily figure out size for SolrDocument if needed...
@@ -437,6 +439,7 @@ class JSONWriter extends TextResponseWri
   // if a Doc can ever contain another doc, this optimization would have to go.
   private final HashMap scoreMap = new HashMap(1);
 
+  @Override
   public void writeDoc(String name, Document doc, Set<String> returnFields, float score, boolean includeScore) throws IOException {
     Map other = null;
     if (includeScore) {
@@ -446,6 +449,7 @@ class JSONWriter extends TextResponseWri
     writeDoc(name, doc.getFields(), returnFields, other);
   }
 
+  @Override
   public void writeDocList(String name, DocList ids, Set<String> fields, Map otherFields) throws IOException {
     boolean includeScore=false;
     if (fields!=null) {
@@ -595,6 +599,7 @@ class JSONWriter extends TextResponseWri
     writer.write(']');
   }
 
+  @Override
   public void writeStr(String name, String val, boolean needsEscaping) throws IOException {
     // it might be more efficient to use a stringbuilder or write substrings
     // if writing chars to the stream is slow.
@@ -647,6 +652,7 @@ class JSONWriter extends TextResponseWri
   }
 
 
+  @Override
   public void writeMap(String name, Map val, boolean excludeOuter, boolean isFirstVal) throws IOException {
     if (!excludeOuter) {
       writeMapOpener(val.size());
@@ -678,6 +684,7 @@ class JSONWriter extends TextResponseWri
     }
   }
 
+  @Override
   public void writeArray(String name, Iterator val) throws IOException {
     writeArrayOpener(-1); // no trivial way to determine array size
     incLevel();
@@ -697,30 +704,37 @@ class JSONWriter extends TextResponseWri
   //
   // Primitive types
   //
+  @Override
   public void writeNull(String name) throws IOException {
     writer.write("null");
   }
 
+  @Override
   public void writeInt(String name, String val) throws IOException {
     writer.write(val);
   }
 
+  @Override
   public void writeLong(String name, String val) throws IOException {
     writer.write(val);
   }
 
+  @Override
   public void writeBool(String name, String val) throws IOException {
     writer.write(val);
   }
 
+  @Override
   public void writeFloat(String name, String val) throws IOException {
     writer.write(val);
   }
 
+  @Override
   public void writeDouble(String name, String val) throws IOException {
     writer.write(val);
   }
 
+  @Override
   public void writeDate(String name, String val) throws IOException {
     writeStr(name, val, false);
   }

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/response/PHPSerializedResponseWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/response/PHPSerializedResponseWriter.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/response/PHPSerializedResponseWriter.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/response/PHPSerializedResponseWriter.java Wed Feb  9 01:03:49 2011
@@ -92,6 +92,7 @@ class PHPSerializedWriter extends JSONWr
     doIndent = false;
   }
 
+  @Override
   public void writeResponse() throws IOException {
     Boolean omitHeader = req.getParams().getBool(CommonParams.OMIT_HEADER);
     if(omitHeader != null && omitHeader) rsp.getValues().remove("responseHeader");

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/response/PageTool.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/response/PageTool.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/response/PageTool.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/response/PageTool.java Wed Feb  9 01:03:49 2011
@@ -73,6 +73,7 @@ public class PageTool {
     return current_page_number;
   }
 
+  @Override
   public String toString() {
     return "Found " + results_found +
            " Page " + current_page_number + " of " + page_count +

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/response/RawResponseWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/response/RawResponseWriter.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/response/RawResponseWriter.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/response/RawResponseWriter.java Wed Feb  9 01:03:49 2011
@@ -18,6 +18,7 @@
 package org.apache.solr.response;
 
 import java.io.IOException;
+import java.io.OutputStream;
 import java.io.Reader;
 import java.io.Writer;
 
@@ -44,7 +45,7 @@ import org.apache.solr.request.SolrQuery
  * @version $Id$
  * @since solr 1.3
  */
-public class RawResponseWriter implements QueryResponseWriter 
+public class RawResponseWriter implements BinaryQueryResponseWriter 
 {
   /** 
    * The key that should be used to add a ContentStream to the 
@@ -93,4 +94,24 @@ public class RawResponseWriter implement
       getBaseWriter( request ).write( writer, request, response );
     }
   }
+
+public void write(OutputStream out, SolrQueryRequest request,
+		SolrQueryResponse response) throws IOException {
+    Object obj = response.getValues().get( CONTENT );
+    if( obj != null && (obj instanceof ContentStream ) ) {
+      // copy the contents to the writer...
+      ContentStream content = (ContentStream)obj;
+      java.io.InputStream in = content.getStream();
+      try {
+        IOUtils.copy( in, out );
+      } finally {
+        in.close();
+      }
+    }
+    else {
+      //getBaseWriter( request ).write( writer, request, response );
+    	throw new IOException("did not find a CONTENT object");
+    }
+	
+}
 }

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/response/RubyResponseWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/response/RubyResponseWriter.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/response/RubyResponseWriter.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/response/RubyResponseWriter.java Wed Feb  9 01:03:49 2011
@@ -45,7 +45,9 @@ public class RubyResponseWriter implemen
 
 class RubyWriter extends NaNFloatWriter {
 
+  @Override
   protected String getNaN() { return "(0.0/0.0)"; }
+  @Override
   protected String getInf() { return "(1.0/0.0)"; }
 
   public RubyWriter(Writer writer, SolrQueryRequest req, SolrQueryResponse rsp) {

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/response/SolrParamResourceLoader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/response/SolrParamResourceLoader.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/response/SolrParamResourceLoader.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/response/SolrParamResourceLoader.java Wed Feb  9 01:03:49 2011
@@ -25,6 +25,7 @@ import org.apache.commons.collections.Ex
 
 import java.io.ByteArrayInputStream;
 import java.io.InputStream;
+import java.io.UnsupportedEncodingException;
 import java.util.HashMap;
 import java.util.Iterator;
 import java.util.Map;
@@ -49,18 +50,26 @@ public class SolrParamResourceLoader ext
     }
   }
 
+  @Override
   public void init(ExtendedProperties extendedProperties) {
   }
 
+  @Override
   public InputStream getResourceStream(String s) throws ResourceNotFoundException {
     String template = templates.get(s);
-    return template == null ? null : new ByteArrayInputStream(template.getBytes());
+    try {
+      return template == null ? null : new ByteArrayInputStream(template.getBytes("UTF-8"));
+    } catch (UnsupportedEncodingException e) {
+      throw new RuntimeException(e); // may not happen
+    }
   }
 
+  @Override
   public boolean isSourceModified(Resource resource) {
     return false;
   }
 
+  @Override
   public long getLastModified(Resource resource) {
     return 0;
   }

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/response/SolrVelocityResourceLoader.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/response/SolrVelocityResourceLoader.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/response/SolrVelocityResourceLoader.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/response/SolrVelocityResourceLoader.java Wed Feb  9 01:03:49 2011
@@ -33,17 +33,21 @@ public class SolrVelocityResourceLoader 
     this.loader = loader;
   }
 
+  @Override
   public void init(ExtendedProperties extendedProperties) {
   }
 
+  @Override
   public InputStream getResourceStream(String template_name) throws ResourceNotFoundException {
     return loader.openResource(template_name);
   }
 
+  @Override
   public boolean isSourceModified(Resource resource) {
     return false;
   }
 
+  @Override
   public long getLastModified(Resource resource) {
     return 0;
   }

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/response/XMLWriter.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/response/XMLWriter.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/response/XMLWriter.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/response/XMLWriter.java Wed Feb  9 01:03:49 2011
@@ -436,6 +436,7 @@ public final class XMLWriter extends Tex
   }
 
 
+  @Override
   public void writeVal(String name, Object val) throws IOException {
 
     // if there get to be enough types, perhaps hashing on the type
@@ -494,6 +495,7 @@ public final class XMLWriter extends Tex
   // Generic compound types
   //
 
+  @Override
   public void writeNamedList(String name, NamedList val) throws IOException {
     int sz = val.size();
     startTag("lst", name, sz<=0);

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/schema/AbstractSubTypeFieldType.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/schema/AbstractSubTypeFieldType.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/schema/AbstractSubTypeFieldType.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/schema/AbstractSubTypeFieldType.java Wed Feb  9 01:03:49 2011
@@ -103,6 +103,7 @@ public abstract class AbstractSubTypeFie
   /**
    * Throws UnsupportedOperationException()
    */
+  @Override
   public Query getFieldQuery(QParser parser, SchemaField field, String externalVal) {
     throw new UnsupportedOperationException();
   }

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/schema/BCDIntField.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/schema/BCDIntField.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/schema/BCDIntField.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/schema/BCDIntField.java Wed Feb  9 01:03:49 2011
@@ -30,9 +30,11 @@ import java.io.IOException;
  * @version $Id$
  */
 public class BCDIntField extends FieldType {
+  @Override
   protected void init(IndexSchema schema, Map<String,String> args) {
   }
 
+  @Override
   public SortField getSortField(SchemaField field,boolean reverse) {
     return getStringSort(field,reverse);
   }
@@ -42,11 +44,13 @@ public class BCDIntField extends FieldTy
     throw new UnsupportedOperationException("ValueSource not implemented");
   }
 
+  @Override
   public String toInternal(String val) {
     // TODO? make sure each character is a digit?
     return BCDUtils.base10toBase10kSortableInt(val);
   }
 
+  @Override
   public String toExternal(Fieldable f) {
     return indexedToReadable(f.stringValue());
   }
@@ -57,10 +61,12 @@ public class BCDIntField extends FieldTy
     return Integer.valueOf( toExternal(f) );
   }
 
+  @Override
   public String indexedToReadable(String indexedForm) {
     return BCDUtils.base10kSortableIntToBase10(indexedForm);
   }
 
+  @Override
   public void write(TextResponseWriter writer, String name, Fieldable f) throws IOException {
     writer.writeInt(name,toExternal(f));
   }

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/schema/BinaryField.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/schema/BinaryField.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/schema/BinaryField.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/schema/BinaryField.java Wed Feb  9 01:03:49 2011
@@ -33,19 +33,23 @@ public class BinaryField extends FieldTy
     return Base64.byteArrayToBase64(buf.array(), buf.position(), buf.limit()-buf.position());
   }
 
+  @Override
   public void write(TextResponseWriter writer, String name, Fieldable f) throws IOException {
     writer.writeStr(name, toBase64String(toObject(f)), false);
   }
 
+  @Override
   public SortField getSortField(SchemaField field, boolean top) {
     throw new RuntimeException("Cannot sort on a Binary field");
   }
 
 
+  @Override
   public String toExternal(Fieldable f) {
     return toBase64String(toObject(f));
   }
   
+  @Override
   public ByteBuffer toObject(Fieldable f) {
     return  ByteBuffer.wrap(f.getBinaryValue(), f.getBinaryOffset(), f.getBinaryLength() ) ;
   }

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/schema/BoolField.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/schema/BoolField.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/schema/BoolField.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/schema/BoolField.java Wed Feb  9 01:03:49 2011
@@ -37,10 +37,13 @@ import java.io.IOException;
  * @version $Id$
  */
 public class BoolField extends FieldType {
+  @Override
   protected void init(IndexSchema schema, Map<String,String> args) {
   }
 
+  @Override
   public SortField getSortField(SchemaField field,boolean reverse) {
+    field.checkSortability();
     return getStringSort(field,reverse);
   }
 
@@ -58,6 +61,7 @@ public class BoolField extends FieldType
   // handle single valued non-text fields (int,bool,etc) if needed.
 
   protected final static Analyzer boolAnalyzer = new SolrAnalyzer() {
+    @Override
     public TokenStreamInfo getStream(String fieldName, Reader reader) {
       Tokenizer tokenizer = new Tokenizer(reader) {
         final CharTermAttribute termAtt = addAttribute(CharTermAttribute.class);
@@ -88,19 +92,23 @@ public class BoolField extends FieldType
   };
 
 
+  @Override
   public Analyzer getAnalyzer() {
     return boolAnalyzer;
   }
 
+  @Override
   public Analyzer getQueryAnalyzer() {
     return boolAnalyzer;
   }
 
+  @Override
   public String toInternal(String val) {
     char ch = (val!=null && val.length()>0) ? val.charAt(0) : 0;
     return (ch=='1' || ch=='t' || ch=='T') ? "T" : "F";
   }
 
+  @Override
   public String toExternal(Fieldable f) {
     return indexedToReadable(f.stringValue());
   }
@@ -115,6 +123,7 @@ public class BoolField extends FieldType
     return term.bytes[0] == 'T';
   }
 
+  @Override
   public String indexedToReadable(String indexedForm) {
     char ch = indexedForm.charAt(0);
     return ch=='T' ? "true" : "false";
@@ -129,6 +138,7 @@ public class BoolField extends FieldType
     }
   }
 
+  @Override
   public void write(TextResponseWriter writer, String name, Fieldable f) throws IOException {
     writer.writeBool(name, f.stringValue().charAt(0) =='T');
   }

Modified: lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/schema/ByteField.java
URL: http://svn.apache.org/viewvc/lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/schema/ByteField.java?rev=1068718&r1=1068717&r2=1068718&view=diff
==============================================================================
--- lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/schema/ByteField.java (original)
+++ lucene/dev/branches/bulkpostings/solr/src/java/org/apache/solr/schema/ByteField.java Wed Feb  9 01:03:49 2011
@@ -33,12 +33,15 @@ import java.util.Map;
  * @version $Id$
  */
 public class ByteField extends FieldType {
+  @Override
   protected void init(IndexSchema schema, Map<String, String> args) {
     restrictProps(SORT_MISSING_FIRST | SORT_MISSING_LAST);
   }
 
   /////////////////////////////////////////////////////////////
+  @Override
   public SortField getSortField(SchemaField field, boolean reverse) {
+    field.checkSortability();
     return new SortField(field.name, SortField.BYTE, reverse);
   }
 
@@ -47,6 +50,7 @@ public class ByteField extends FieldType
     return new ByteFieldSource( new ByteValuesCreator( field.name, null, CachedArrayCreator.CACHE_VALUES_AND_BITS ) );
   }
 
+  @Override
   public void write(TextResponseWriter writer, String name, Fieldable f) throws IOException {
     String s = f.stringValue();
 
@@ -75,4 +79,4 @@ public class ByteField extends FieldType
   public Byte toObject(Fieldable f) {
     return Byte.valueOf(toExternal(f));
   }
-}
\ No newline at end of file
+}



Mime
View raw message