[ https://issues.apache.org/jira/browse/SOLR-20?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12462800 ]
Ryan McKinley commented on SOLR-20: ----------------------------------- I just posted a new version of a java client. This moves things to proper org.apache... packages and adds the waitFlush, waitSearcher suggested by Fuad. If people are interested, i think this should sit next to /client/ruby in: /client/java/solrj/ there is a build.xml file that will generate a solr-client.jar file. As a taste, this is how you perform a search: <code> SolrClient client = new SolrClientImpl( new URL("http://localhost:8983/solr/") ); SolrQuery query = new SolrQuery(); query.setQuery( "video" ); QueryResults results = client.query( query ); for( ResultDoc doc : results.getDocs() ) { System.out.println( "["+doc.getId()+"] "+ doc.getField( "name" ) ); } </code> Also, if there is interest, i can post an example webapp using this client library to search and explore a solr repository. > A simple Java client with Java APIs for add(), delete(), commit() and > optimize(). > --------------------------------------------------------------------------------- > > Key: SOLR-20 > URL: https://issues.apache.org/jira/browse/SOLR-20 > Project: Solr > Issue Type: New Feature > Components: update > Environment: all > Reporter: Darren Erik Vengroff > Priority: Minor > Attachments: DocumentManagerClient.java, DocumentManagerClient.java, > solr-client-java-2.zip.zip, solr-client-java.zip, solr-client-sources.jar, > solr-client.zip, solr-client.zip, SolrClientException.java, > SolrServerException.java > > > I wrote a simple little client class that can connect to a Solr server and > issue add, delete, commit and optimize commands using Java methods. I'm > posting here for review and comments as suggested by Yonik. -- This message is automatically generated by JIRA. - If you think it was sent incorrectly contact one of the administrators: https://issues.apache.org/jira/secure/Administrators.jspa - For more information on JIRA, see: http://www.atlassian.com/software/jira