Details about the DataImportHandler are on the wiki: http://wiki.apache.org/solr/DataImportHandler
In general, the SolrJ client just makes HTTP requests to the corresponding Solr APIs so you need to learn about the http parameters for the corresponding solr component. The solr wiki is your best bet. http://wiki.apache.org/solr/FrontPage On Mon, May 27, 2013 at 9:50 PM, Hans-Peter Stricker <stric...@epublius.de>wrote: > Marvelous!! > > Once again: where could/should I have read this? What kinds of > concepts/keywords are "command" and "full-import"? (Couldn't find them in > any config file. Where are they explained?) > > Anyway: Now it works like a charm! > > Thanks > > Hans > > > > ------------------------------**-------------------- > From: "Shalin Shekhar Mangar" <shalinman...@gmail.com> > Sent: Monday, May 27, 2013 6:09 PM > To: <solr-user@lucene.apache.org> > Subject: Re: Problems with DIH in Solrj > > > Your program is not specifying a command. You need to add: >> >> query.setParam("command", "full-import"); >> >> >> On Mon, May 27, 2013 at 9:31 PM, Hans-Peter Stricker >> <stric...@epublius.de>wrote: >> >> 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<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<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? >>> >> >> >> >> >> -- >> Regards, >> Shalin Shekhar Mangar. >> >> > -- Regards, Shalin Shekhar Mangar.