Hi, I am trying to use SolrJ java client to do search and the basic search works fine with the code given below.
SolrServer server = new CommonsHttpSolrServer( " http://localhost:8983/solr"); SolrQuery query = new SolrQuery(). setQuery(searchKey). addHighlightField("TITLE_EN_US"). setRows(new Integer(10)). setStart(new Integer(startPosition)). setHighlight(true); QueryResponse rsp = server.query( query ); However I would like to do spell check for the query string and would like alternate suggestions. I looked at the documentation for spellcheck component and saw examples for queries using http url request. for eg: http://localhost:8983/solr/spellCheckCompRH?q=pizzza&spellcheck.q=pizzza&spellcheck=true&spellcheck.build=true I would like to acheive the same using the Java client api. Could anyone provide sample code for the same? Thanks&Rgds, Sunil