Index: test/edu/ucsb/nceas/metacattest/MetaCatServletTest.java
===================================================================
--- test/edu/ucsb/nceas/metacattest/MetaCatServletTest.java	(revision 7842)
+++ test/edu/ucsb/nceas/metacattest/MetaCatServletTest.java	(revision 7843)
@@ -27,6 +27,7 @@
 package edu.ucsb.nceas.metacattest;
 
 import edu.ucsb.nceas.MCTestCase;
+import edu.ucsb.nceas.metacat.IdentifierManager;
 import edu.ucsb.nceas.metacat.properties.PropertyService;
 import edu.ucsb.nceas.utilities.HttpMessage;
 import edu.ucsb.nceas.utilities.PropertyNotFoundException;
@@ -133,6 +134,8 @@
 						serial));
 
 		suite.addTest(new MetaCatServletTest("testLogOut"));
+		
+		suite.addTest(new MetaCatServletTest("testReindexFail"));
 
 		return suite;
 	}
@@ -419,7 +422,30 @@
 		assertTrue(handleLogOut());
 
 	}
+	
+	public void testReindexFail() {
 
+		// find a pid to reindex
+		String identifier = null;
+		List<String> ids = IdentifierManager.getInstance().getAllSystemMetadataGUIDs();
+		if (ids != null && !ids.isEmpty()) {
+			identifier = ids.get(0);
+		}
+		Properties prop = new Properties();
+		prop.put("action", "reindex");
+		prop.put("pid", identifier);
+
+		String message = getMetacatString(prop);
+		debug("Reindex Message: " + message);
+		if (message.indexOf("<error>") != -1) {// there was an error
+			assertTrue(true);
+		} else if (message.indexOf("<success>") != -1) {
+			fail("Unauthenticated user should not be able to invoke this action: " + message);
+		} else {// something weird happened.
+			fail("There was an unexpected error reindexing pid: " + message);
+		}
+	}
+
 	/**
 	 * Method to hanld login action
 	 * 
Index: src/edu/ucsb/nceas/metacat/MetaCatServlet.java
===================================================================
--- src/edu/ucsb/nceas/metacat/MetaCatServlet.java	(revision 7842)
+++ src/edu/ucsb/nceas/metacat/MetaCatServlet.java	(revision 7843)
@@ -989,6 +989,8 @@
 				out.close();
 			} else if (action.equals("buildindex")) {
 				handler.handleBuildIndexAction(params, request, response, userName, groupNames);
+			} else if (action.equals("reindex")) {
+				handler.handleReindexAction(params, request, response, userName, groupNames);
 			} else if (action.equals("login") || action.equals("logout")) {
 				/*
 				 * } else if (action.equals("protocoltest")) { String testURL =
Index: src/edu/ucsb/nceas/metacat/MetacatHandler.java
===================================================================
--- src/edu/ucsb/nceas/metacat/MetacatHandler.java	(revision 7842)
+++ src/edu/ucsb/nceas/metacat/MetacatHandler.java	(revision 7843)
@@ -52,6 +52,7 @@
 import java.util.HashMap;
 import java.util.Hashtable;
 import java.util.Iterator;
+import java.util.List;
 import java.util.Map;
 import java.util.Timer;
 import java.util.Vector;
@@ -66,6 +67,7 @@
 
 import org.apache.commons.io.input.XmlStreamReader;
 import org.apache.log4j.Logger;
+import org.dataone.service.types.v1.Identifier;
 import org.dataone.service.types.v1.SystemMetadata;
 import org.ecoinformatics.eml.EMLParser;
 
@@ -2587,6 +2589,100 @@
     }
     
     /**
+     * Rebuild the index for one or more documents. If the "pid" parameter is
+     * provided, rebuild for just that one document (or list of documents). If
+     * not, then rebuild the index for all documents in the systemMetadata table.
+     * 
+     * @param params
+     *            the parameters from the web request
+     * @param request
+     *            the http request object for getting request details
+     * @param response
+     *            the http response object for writing output
+     * @param username
+     *            the username of the authenticated user
+     */
+    protected void handleReindexAction(Hashtable<String, String[]> params,
+            HttpServletRequest request, HttpServletResponse response,
+            String username, String[] groups) {
+        Logger logMetacat = Logger.getLogger(MetacatHandler.class);
+        
+        // Get all of the parameters in the correct formats
+        String[] pid = params.get("pid");
+        
+        // Rebuild the indices for appropriate documents
+        try {
+            response.setContentType("text/xml");
+            PrintWriter out = response.getWriter();
+            
+            // Check that the user is authenticated as an administrator account
+            if (!AuthUtil.isAdministrator(username, groups)) {
+                out.print("<error>");
+                out.print("The user \"" + username +
+                        "\" is not authorized for this action.");
+                out.print("</error>");
+                return;
+            }
+            
+            // Process the documents
+            StringBuffer results = new StringBuffer();
+            if (pid == null || pid.length == 0) {
+                // Process all of the documents
+                logMetacat.info("queueing doc index for all documents");
+                try {
+                    List<String> allIdentifiers = IdentifierManager.getInstance().getAllSystemMetadataGUIDs();
+                    Iterator<String> it = allIdentifiers.iterator();
+                    results.append("<success>");
+                    while (it.hasNext()) {
+                        String id = it.next();
+                        Identifier identifier = new Identifier();
+                        identifier.setValue(id);
+						SystemMetadata sysMeta = HazelcastService.getInstance().getSystemMetadataMap().get(identifier);
+						HazelcastService.getInstance().getIndexQueue().add(sysMeta);
+						results.append("<pid>" + id + "</pid>\n");
+                        logMetacat.debug("queued SystemMetadata for index on pid: " + id);
+                    }
+                    results.append("</success>");
+
+                    logMetacat.info("done queueing index for all documents");
+                } catch (Exception e) {
+                	// report the error
+                	results = new StringBuffer();
+                	results.append("<error>");
+                	results.append(e.getMessage());
+                	results.append("</error>");
+                }
+            } else {
+                results.append("<success>\n");
+                // Only process the requested documents
+                for (int i = 0; i < pid.length; i++) {
+                    String id = pid[i];
+                    logMetacat.info("queueing doc index for pid " + id);
+                    Identifier identifier = new Identifier();
+                    identifier.setValue(id);
+					SystemMetadata sysMeta = HazelcastService.getInstance().getSystemMetadataMap().get(identifier);
+					HazelcastService.getInstance().getIndexQueue().add(sysMeta);
+					results.append("<pid>" + id + "</pid>\n");
+					logMetacat.info("done queueing doc index for pid " + id);
+                }
+                results.append("</success>");
+            }
+            out.print(results.toString());
+            out.close();
+        } catch (IOException e) {
+            logMetacat.error("MetacatHandler.handleBuildIndexAction - " +
+            		         "Could not open http response for writing: " + 
+            		         e.getMessage());
+            e.printStackTrace();
+        } catch (MetacatUtilException ue) {
+            logMetacat.error("MetacatHandler.handleBuildIndexAction - " +
+            		         "Could not determine if user is administrator: " + 
+            		         ue.getMessage());
+            ue.printStackTrace();
+        }
+    }
+    
+    /**
      * Build the index for one document by reading the document and
      * calling its buildIndex() method.
      *
