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
|
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.
|
more appropriate when one needs to import only some of the entities.
|
||||||
(Noble Paul via shalin)
|
(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
|
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"%>
|
<%@ page contentType="text/html; charset=utf-8" pageEncoding="UTF-8"%>
|
||||||
<%--
|
<%--
|
||||||
Licensed to the Apache Software Foundation (ASF) under one or more
|
Licensed to the Apache Software Foundation (ASF) under one or more
|
||||||
|
@ -16,9 +19,36 @@
|
||||||
limitations under the License.
|
limitations under the License.
|
||||||
--%>
|
--%>
|
||||||
<%-- do a verbatim include so we can use the local vars --%>
|
<%-- do a verbatim include so we can use the local vars --%>
|
||||||
|
<%@include file="_info.jsp"%>
|
||||||
<html>
|
<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%">
|
<frameset cols = "50%, 50%">
|
||||||
<frame src ="debug.jsp" />
|
<frame src ="debug.jsp?handler=<%=handler%>" />
|
||||||
<frame src ="../dataimport?command=full-import&debug=on&verbose=true" name="result"/>
|
<frame src ="../select?qt=<%=handler%>&command=status" name="result"/>
|
||||||
</frameset>
|
</frameset>
|
||||||
|
<% } %>
|
||||||
</html>
|
</html>
|
||||||
|
|
|
@ -27,10 +27,17 @@
|
||||||
</head>
|
</head>
|
||||||
<body>
|
<body>
|
||||||
<h1>DataImportHandler Development Console</h1>
|
<h1>DataImportHandler Development Console</h1>
|
||||||
<br />
|
<%
|
||||||
<form action="../dataimport" target="result" method="post">
|
String handler = request.getParameter("handler"); // must be specified
|
||||||
<input type="hidden" name="debug" value="on">
|
%>
|
||||||
|
<form action="../select" target="result" method="get">
|
||||||
|
<input type="hidden" name="debug" value="on"/>
|
||||||
|
<input type="hidden" name="qt" value="<%=handler%>"/>
|
||||||
<table>
|
<table>
|
||||||
|
<tr>
|
||||||
|
<th>Handler: </th>
|
||||||
|
<td><%=handler%> <a href="dataimport.jsp" target="_top">change handler</a></td>
|
||||||
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2">
|
<td colspan="2">
|
||||||
<table width="100%">
|
<table width="100%">
|
||||||
|
@ -49,7 +56,7 @@
|
||||||
name="clean" type="checkbox"></td>
|
name="clean" type="checkbox"></td>
|
||||||
<td><strong>Start Row</strong> <input
|
<td><strong>Start Row</strong> <input
|
||||||
name="start" size="4" type="text" value="0"></td>
|
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>
|
type="text" size="4" value="10"></td>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
|
@ -61,17 +68,18 @@
|
||||||
</tr>
|
</tr>
|
||||||
<tr>
|
<tr>
|
||||||
<td colspan="2"><textarea id="txtDataConfig" rows="30" cols="80" name="dataConfig"></textarea></td>
|
<td colspan="2"><textarea id="txtDataConfig" rows="30" cols="80" name="dataConfig"></textarea></td>
|
||||||
<script type="text/javascript" language="Javascript">
|
<script type="text/javascript" language="javascript">
|
||||||
$.get('../dataimport?command=show-config', function(data){
|
$.get("../select?qt=<%=handler%>&command=show-config", function(data){
|
||||||
$('#txtDataConfig').attr('value', data);
|
$('#txtDataConfig').attr('value', data);
|
||||||
});
|
});
|
||||||
</script>
|
</script>
|
||||||
</tr>
|
</tr>
|
||||||
</table>
|
</table>
|
||||||
</form>
|
</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="clean" value="false">
|
||||||
<input type="hidden" name="commit" value="true">
|
<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="full-import">
|
||||||
<input class="stdbutton" type="submit" name="command" value="delta-import">
|
<input class="stdbutton" type="submit" name="command" value="delta-import">
|
||||||
<input class="stdbutton" type="submit" name="command" value="status">
|
<input class="stdbutton" type="submit" name="command" value="status">
|
||||||
|
@ -84,13 +92,15 @@
|
||||||
<input type="hidden" name="rows" value="0">
|
<input type="hidden" name="rows" value="0">
|
||||||
<input class="stdbutton" type="submit" value="Documents Count">
|
<input class="stdbutton" type="submit" value="Documents Count">
|
||||||
</form>
|
</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="verbose" value="true">
|
||||||
<input type="hidden" name="clean" value="true">
|
<input type="hidden" name="clean" value="true">
|
||||||
<input type="hidden" name="commit" value="true">
|
<input type="hidden" name="commit" value="true">
|
||||||
<input type="hidden" name="command" value="full-import">
|
<input type="hidden" name="command" value="full-import">
|
||||||
<input class="stdbutton" type="submit" value="Full Import with Cleaning">
|
<input class="stdbutton" type="submit" value="Full Import with Cleaning">
|
||||||
</form>
|
</form>
|
||||||
|
|
||||||
<a href="index.jsp" target="_parent">Return to Admin Page</a>
|
<a href="index.jsp" target="_parent">Return to Admin Page</a>
|
||||||
</body>
|
</body>
|
||||||
</html>
|
</html>
|
||||||
|
|
Loading…
Reference in New Issue