mirror of https://github.com/apache/lucene.git
SOLR-1230: Enhance data import developer console to work with all DataImportHandler request handlers
git-svn-id: https://svn.apache.org/repos/asf/lucene/solr/trunk@786516 13f79535-47bb-0310-9956-ffa450edef68
This commit is contained in:
parent
d48c9f39e8
commit
59a877489d
|
@ -142,7 +142,11 @@ New Features
|
|||
32.SOLR-1092: Added a new command named 'import' which does not automatically clean the index. This is useful and
|
||||
more appropriate when one needs to import only some of the entities.
|
||||
(Noble Paul via shalin)
|
||||
33.SOLR-11153: 'deltaImportQuery' is honored on child entities as well (noble)
|
||||
|
||||
33.SOLR-1153: 'deltaImportQuery' is honored on child entities as well (noble)
|
||||
|
||||
34.SOLR-1230: Enhanced dataimport.jsp to work with all DataImportHandler request handler configurations,
|
||||
rather than just a hardcoded /dataimport handler. (ehatcher)
|
||||
|
||||
Optimizations
|
||||
----------------------
|
||||
|
|
|
@ -1,3 +1,6 @@
|
|||
<%@ page import="org.apache.solr.request.SolrRequestHandler" %>
|
||||
<%@ page import="java.util.Map" %>
|
||||
<%@ page import="org.apache.solr.handler.dataimport.DataImportHandler" %>
|
||||
<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
|
||||
<%--
|
||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||
|
@ -16,9 +19,36 @@
|
|||
limitations under the License.
|
||||
--%>
|
||||
<%-- do a verbatim include so we can use the local vars --%>
|
||||
<%@include file="_info.jsp"%>
|
||||
<html>
|
||||
<%
|
||||
String handler = request.getParameter("handler");
|
||||
|
||||
if (handler == null) {
|
||||
Map<String, SolrRequestHandler> handlers = core.getRequestHandlers();
|
||||
%>
|
||||
<head>
|
||||
<title>DataImportHandler Interactive Development</title>
|
||||
<link rel="stylesheet" type="text/css" href="solr-admin.css">
|
||||
</head>
|
||||
<body>
|
||||
Select handler:
|
||||
<ul>
|
||||
<%
|
||||
for (String key : handlers.keySet()) {
|
||||
if (handlers.get(key) instanceof DataImportHandler) { %>
|
||||
<li><a href="dataimport.jsp?handler=<%=key%>"><%=key%></a></li>
|
||||
<%
|
||||
}
|
||||
}
|
||||
%>
|
||||
</ul>
|
||||
</body>
|
||||
<% } else { %>
|
||||
|
||||
<frameset cols = "50%, 50%">
|
||||
<frame src ="debug.jsp" />
|
||||
<frame src ="../dataimport?command=full-import&debug=on&verbose=true" name="result"/>
|
||||
<frame src ="debug.jsp?handler=<%=handler%>" />
|
||||
<frame src ="../select?qt=<%=handler%>&command=status" name="result"/>
|
||||
</frameset>
|
||||
<% } %>
|
||||
</html>
|
||||
|
|
|
@ -27,10 +27,17 @@
|
|||
</head>
|
||||
<body>
|
||||
<h1>DataImportHandler Development Console</h1>
|
||||
<br />
|
||||
<form action="../dataimport" target="result" method="post">
|
||||
<input type="hidden" name="debug" value="on">
|
||||
<%
|
||||
String handler = request.getParameter("handler"); // must be specified
|
||||
%>
|
||||
<form action="../select" target="result" method="get">
|
||||
<input type="hidden" name="debug" value="on"/>
|
||||
<input type="hidden" name="qt" value="<%=handler%>"/>
|
||||
<table>
|
||||
<tr>
|
||||
<th>Handler: </th>
|
||||
<td><%=handler%> <a href="dataimport.jsp" target="_top">change handler</a></td>
|
||||
</tr>
|
||||
<tr>
|
||||
<td colspan="2">
|
||||
<table width="100%">
|
||||
|
@ -49,7 +56,7 @@
|
|||
name="clean" type="checkbox"></td>
|
||||
<td><strong>Start Row</strong> <input
|
||||
name="start" size="4" type="text" value="0"></td>
|
||||
<td><strong>No:of Rows</strong> <input name="rows"
|
||||
<td><strong>No. of Rows</strong> <input name="rows"
|
||||
type="text" size="4" value="10"></td>
|
||||
</tr>
|
||||
</table>
|
||||
|
@ -61,17 +68,18 @@
|
|||
</tr>
|
||||
<tr>
|
||||
<td colspan="2"><textarea id="txtDataConfig" rows="30" cols="80" name="dataConfig"></textarea></td>
|
||||
<script type="text/javascript" language="Javascript">
|
||||
$.get('../dataimport?command=show-config', function(data){
|
||||
$('#txtDataConfig').attr('value', data);
|
||||
});
|
||||
</script>
|
||||
<script type="text/javascript" language="javascript">
|
||||
$.get("../select?qt=<%=handler%>&command=show-config", function(data){
|
||||
$('#txtDataConfig').attr('value', data);
|
||||
});
|
||||
</script>
|
||||
</tr>
|
||||
</table>
|
||||
</form>
|
||||
<form action="../dataimport" target="result" method="get">
|
||||
<form action="../select" target="result" method="get">
|
||||
<input type="hidden" name="clean" value="false">
|
||||
<input type="hidden" name="commit" value="true">
|
||||
<input type="hidden" name="qt" value="<%=handler%>"/>
|
||||
<input class="stdbutton" type="submit" name="command" value="full-import">
|
||||
<input class="stdbutton" type="submit" name="command" value="delta-import">
|
||||
<input class="stdbutton" type="submit" name="command" value="status">
|
||||
|
@ -84,13 +92,15 @@
|
|||
<input type="hidden" name="rows" value="0">
|
||||
<input class="stdbutton" type="submit" value="Documents Count">
|
||||
</form>
|
||||
<form action="../dataimport" target="result" method="get">
|
||||
<form action="../select" target="result" method="get">
|
||||
<input type="hidden" name="qt" value="<%=handler%>"/>
|
||||
<input type="hidden" name="verbose" value="true">
|
||||
<input type="hidden" name="clean" value="true">
|
||||
<input type="hidden" name="commit" value="true">
|
||||
<input type="hidden" name="command" value="full-import">
|
||||
<input class="stdbutton" type="submit" value="Full Import with Cleaning">
|
||||
</form>
|
||||
|
||||
<a href="index.jsp" target="_parent">Return to Admin Page</a>
|
||||
</body>
|
||||
</html>
|
||||
|
|
Loading…
Reference in New Issue