Grant, This works:
String url = "http://localhost:8983/solr"; SolrServer server = new CommonsHttpSolrServer(url); SolrQuery query = new SolrQuery(); query.setQueryType("/autoSuggest"); query.setParam("terms", "true"); query.setParam("terms.fl", "CONTENTS"); query.setParam("terms.lower", "london"); query.setParam("terms.upper", "london"); query.setParam("terms.upper.incl", "true"); For the query: http://localhost:8983/solr/autoSuggest?terms=true&terms.fl=CONTENTS&terms.lower=london&terms.upper=london&terms.upper.incl=true It turned out that I was missing the leading "/" in "/autoSuggest". This needs to be explicit in the documentation. Thanks! Clay -----Original Message----- From: Grant Ingersoll [mailto:gsing...@apache.org] Sent: Monday, April 13, 2009 3:15 PM To: solr-user@lucene.apache.org Subject: Re: Term Counts/Term Frequency Vector Info Sorry, should have add that you should set the qt param: http://wiki.apache.org/solr/CoreQueryParameters#head-2c940d42ec4f2a74c5d251f12f4077e53f2f00f4 -Grant On Apr 13, 2009, at 1:35 PM, Fink, Clayton R. wrote: > The query method seems to only support "solr/select" requests. I > subclassed SolrRequest and created a request class that supports > "solr/autoSuggest" - following the pattern in LukeRequest. It seems to > work fine for me. > > Clay > > -----Original Message----- > From: Grant Ingersoll [mailto:gsing...@apache.org] > Sent: Tuesday, April 07, 2009 10:41 PM > To: solr-user@lucene.apache.org > Subject: Re: Term Counts/Term Frequency Vector Info > > You can send arbitrary requests via SolrJ, just use the parameter map > via the query method: > http://lucene.apache.org/solr/api/solrj/org/apache/solr/client/solrj/S > olrServer.html > . > > -Grant > > On Apr 7, 2009, at 1:52 PM, Fink, Clayton R. wrote: > >> These URLs give me what I want - word completion and term counts. >> What I don't see is a way to call these via SolrJ. I could call the >> server directly using java.net classes and process the XML myself, I >> guess. There needs to be an auto suggest request class. >> >> http://localhost:8983/solr/autoSuggest? >> terms=true&terms.fl=CONTENTS&te >> rms.lower=Lond&terms.prefix=Lon&indent=true >> >> <response> >> − >> <lst name="responseHeader"> >> <int name="status">0</int> >> <int name="QTime">0</int> >> </lst> >> − >> <lst name="terms"> >> − >> <lst name="CONTENTS"> >> <int name="London">11</int> >> <int name="Londoners">2</int> >> </lst> >> </lst> >> </response> >> >> http://localhost:8983/solr/autoSuggest? >> terms=true&terms.fl=CONTENTS&te >> rms.lower=London&terms.upper=London&terms.upper.incl=true&indent=true >> >> <response> >> − >> <lst name="responseHeader"> >> <int name="status">0</int> >> <int name="QTime">0</int> >> </lst> >> − >> <lst name="terms"> >> − >> <lst name="CONTENTS"> >> <int name="London">11</int> >> </lst> >> </lst> >> </response> >> >> -----Original Message----- >> From: Grant Ingersoll [mailto:gsing...@apache.org] >> Sent: Monday, April 06, 2009 5:43 PM >> To: solr-user@lucene.apache.org >> Subject: Re: Term Counts/Term Frequency Vector Info >> >> See also http://wiki.apache.org/solr/TermsComponent >> >> You might be able to apply these patches to 1.3 and have them work, >> but there is no guarantee. You also can get some termDocs like >> capabilities through Solr's faceting capabilities, but I am not aware >> of any way to get at the term vector capabilities. >> >> HTH, >> Grant >> >> On Apr 6, 2009, at 1:49 PM, Fink, Clayton R. wrote: >> >>> I want the functionality that Lucene IndexReader.termDocs gives me. >>> That or access on the document level to the term vector. This >>> (http://wiki.apache.org/solr/TermVectorComponent?highlight=(term >>> )|(vector) seems to suggest that this will be available in 1.4. Is >>> there any way to do this in 1.3? >>> >>> Thanks, >>> >>> Clay >>> >> >> -------------------------- >> Grant Ingersoll >> http://www.lucidimagination.com/ >> >> Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids) >> using Solr/Lucene: >> http://www.lucidimagination.com/search > > -------------------------- > Grant Ingersoll > http://www.lucidimagination.com/ > > Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids) > using Solr/Lucene: > http://www.lucidimagination.com/search -------------------------- Grant Ingersoll http://www.lucidimagination.com/ Search the Lucene ecosystem (Lucene/Solr/Nutch/Mahout/Tika/Droids) using Solr/Lucene: http://www.lucidimagination.com/search