Example usage for org.apache.solr.common.params CoreAdminParams NAME

List of usage examples for org.apache.solr.common.params CoreAdminParams NAME

Introduction

In this page you can find the example usage for org.apache.solr.common.params CoreAdminParams NAME.

Prototype

String NAME

To view the source code for org.apache.solr.common.params CoreAdminParams NAME.

Click Source Link

Document

If you rename something, what is the new name

Usage

From source file:learning.SolrJTest.java

License:Mozilla Public License

private QueryResponse createCoreWithName(String name) throws Exception {
    SolrQuery solrQuery = new SolrQuery();
    solrQuery.setParam(CommonParams.QT, "/admin/cores");
    solrQuery.setParam(CoreAdminParams.ACTION, CoreAdminParams.CoreAdminAction.CREATE.name());
    solrQuery.setParam(CoreAdminParams.NAME, name);
    solrQuery.setParam(CoreAdminParams.INSTANCE_DIR, "./" + name);
    solrQuery.setParam(CoreAdminParams.CONFIG, solrHomeRelativePath + solrConfigHomeRelativePath);
    solrQuery.setParam(CoreAdminParams.SCHEMA, solrHomeRelativePath + solrSchemaHomeRelativePath);
    solrQuery.setParam(CoreAdminParams.DATA_DIR, ".");
    return solrServer.query(solrQuery);
}

From source file:org.alfresco.solr.AbstractAlfrescoSolrTests.java

License:Open Source License

/**
 * /* ww  w .  ja v  a 2  s .  c  o  m*/
 * @param aclId
 * @throws Exception
 */
public void indexAclId(long aclId) throws Exception {
    CoreAdminHandler admin = getMultiCoreHandler();
    SolrQueryResponse resp = new SolrQueryResponse();
    admin.handleRequestBody(req(CoreAdminParams.ACTION, "INDEX", CoreAdminParams.NAME, getCore().getName(),
            "aclid", Long.toString(aclId)), resp);
}

From source file:org.alfresco.solr.AbstractAlfrescoSolrTests.java

License:Open Source License

/**
 * Maintenance method//w w w . j a  v  a2 s.co  m
 * @param aclId
 * @throws Exception
 */
public void reindexAclId(long aclId) throws Exception {
    CoreAdminHandler admin = getMultiCoreHandler();
    SolrQueryResponse resp = new SolrQueryResponse();
    admin.handleRequestBody(req(CoreAdminParams.ACTION, "REINDEX", CoreAdminParams.NAME, getCore().getName(),
            "aclid", Long.toString(aclId)), resp);
}

From source file:org.alfresco.solr.AbstractAlfrescoSolrTests.java

License:Open Source License

/**
 * Maintenance method/*from ww w . j  a  v a 2  s . c  o  m*/
 * @param txnId
 * @throws Exception
 */
public static void reindexTransactionId(long txnId) throws Exception {
    CoreAdminHandler admin = getMultiCoreHandler();
    SolrQueryResponse resp = new SolrQueryResponse();
    admin.handleRequestBody(req(CoreAdminParams.ACTION, "REINDEX", CoreAdminParams.NAME, getCore().getName(),
            "txid", Long.toString(txnId)), resp);
}

From source file:org.alfresco.solr.AbstractAlfrescoSolrTests.java

License:Open Source License

public void purgeAclId(long aclId) throws Exception {
    CoreAdminHandler admin = getMultiCoreHandler();
    SolrQueryResponse resp = new SolrQueryResponse();
    admin.handleRequestBody(req(CoreAdminParams.ACTION, "PURGE", CoreAdminParams.NAME, getCore().getName(),
            "aclid", Long.toString(aclId)), resp);
}

From source file:org.alfresco.solr.AbstractAlfrescoSolrTests.java

License:Open Source License

public void purgeAclChangeSetId(long aclChangeSetId) throws Exception {
    CoreAdminHandler admin = getMultiCoreHandler();
    SolrQueryResponse resp = new SolrQueryResponse();
    admin.handleRequestBody(req(CoreAdminParams.ACTION, "PURGE", CoreAdminParams.NAME, getCore().getName(),
            "acltxid", Long.toString(aclChangeSetId)), resp);
}

From source file:org.alfresco.solr.AbstractAlfrescoSolrTests.java

License:Open Source License

public void purgeNodeId(long nodeId) throws Exception {
    CoreAdminHandler admin = getMultiCoreHandler();
    SolrQueryResponse resp = new SolrQueryResponse();
    admin.handleRequestBody(req(CoreAdminParams.ACTION, "PURGE", CoreAdminParams.NAME, getCore().getName(),
            "nodeid", Long.toString(nodeId)), resp);
}

From source file:org.alfresco.solr.AbstractAlfrescoSolrTests.java

License:Open Source License

public void purgeTransactionId(long txnId) throws Exception {
    CoreAdminHandler admin = getMultiCoreHandler();
    SolrQueryResponse resp = new SolrQueryResponse();
    admin.handleRequestBody(req(CoreAdminParams.ACTION, "PURGE", CoreAdminParams.NAME, getCore().getName(),
            "txid", Long.toString(txnId)), resp);
}

From source file:org.alfresco.solr.AbstractAlfrescoSolrTests.java

License:Open Source License

public void reindexNodeId(long nodeId) throws Exception {
    CoreAdminHandler admin = getMultiCoreHandler();
    SolrQueryResponse resp = new SolrQueryResponse();
    admin.handleRequestBody(req(CoreAdminParams.ACTION, "REINDEX", CoreAdminParams.NAME, getCore().getName(),
            "nodeid", Long.toString(nodeId)), resp);
}

From source file:org.alfresco.solr.AbstractAlfrescoSolrTests.java

License:Open Source License

public void reindexAclChangeSetId(long aclChangeSetId) throws Exception {
    CoreAdminHandler admin = getMultiCoreHandler();
    SolrQueryResponse resp = new SolrQueryResponse();
    admin.handleRequestBody(req(CoreAdminParams.ACTION, "REINDEX", CoreAdminParams.NAME, getCore().getName(),
            "acltxid", Long.toString(aclChangeSetId)), resp);
}