I start the SOLR example with 

java -Dsolr.solr.home=example-DIH/solr -jar start.jar

and run

public static void main(String[] args) {

        String url = "http://localhost:8983/solr/rss";;
        SolrServer server;
        SolrQuery query;
        try {
            server = new HttpSolrServer(url);
            query = new SolrQuery();
            query.setParam(CommonParams.QT,"/dataimport");
            QueryRequest request = new QueryRequest(query);
            QueryResponse response = request.process(server);
            server.commit();
            System.out.println(response.toString());

        } catch (Exception ex) {
            ex.printStackTrace();
        }
    }

without exception and the response string as

{responseHeader={status=0,QTime=0},initArgs={defaults={config=rss-data-config.xml}},status=idle,importResponse=,statusMessages={},WARNING=This
 response format is experimental.  It is likely to change in the future.}

The Lucene index is "touched" but not really updated: there are only 
segments.gen and segments_a files of size 1Kb. If I execute /dataimport 
(full-import with option "commit" checked) from 
http://localhost:8983/solr/#/rss/dataimport//dataimport I get

{ "responseHeader": { "status": 0, "QTime": 1 }, "initArgs": [ "defaults", [ 
"config", "rss-data-config.xml" ] ], "command": "status", "status": "idle", 
"importResponse": "", "statusMessages": { "Total Requests made to DataSource": 
"1", "Total Rows Fetched": "10", "Total Documents Skipped": "0", "Full Dump 
Started": "2013-05-27 17:57:07", "": "Indexing completed. Added/Updated: 10 
documents. Deleted 0 documents.", "Committed": "2013-05-27 17:57:07", "Total 
Documents Processed": "10", "Time taken": "0:0:0.603" }, "WARNING": "This 
response format is experimental. It is likely to change in the future." }

What am I doing wrong?

Reply via email to