public void install()

in src/main/java/org/apache/sling/testing/clients/indexing/IndexingClient.java [286:306]


    public void install() throws ClientException {
        if (exists(WAIT_FOR_ASYNC_INDEXING_ROOT)) {
            LOG.debug("Skipping install since {} already exists", WAIT_FOR_ASYNC_INDEXING_ROOT);
            return;
        }

        createNodeRecursive(WAIT_FOR_ASYNC_INDEXING_ROOT, "sling:Folder");
        createNode(INDEX_PATH, "nt:unstructured");
        createNode(CONTENT_PATH, "sling:Folder");

        final List<String> lanes = getLaneNames();
        for (String lane : lanes) {
            String indexName = getIndexName(lane);
            String indexDefinition = replacePlaceholders(INDEX_DEFINITION, lane, null);
            LOG.info("Creating index {} in {}", indexName, INDEX_PATH);
            LOG.debug("Index definition: {}", indexDefinition);
            importContent(INDEX_PATH, "json", indexDefinition);
            // Trigger reindex to make sure the complete index definition is used
            setPropertyString(INDEX_PATH + "/" + indexName, "reindex", "true");
        }
    }