lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Erick Erickson <>
Subject Re: /suggest through SolrJ?
Date Thu, 25 Sep 2014 14:43:05 GMT
You can call anything from SolrJ that you can call from a URL.
SolrJ has lots of convenience stuff to set particular parameters,
parse the response, etc... But in the end it's communicating
with Solr via a URL.

Take a look at something like SolrQuery for instance. It has a nice
command setFacetPrefix. Here's the entire method:

public SolrQuery setFacetPrefix( String field, String prefix )
    this.set( FacetParams.FACET_PREFIX, prefix );
    return this;

which is really
    this.set( "facet.prefix", prefix );
All it's really doing is setting a SolrParams key/value
pair which is equivalent to
on a URL.

As I remember, there's a "setPath" method that you
can use to set the destination for the request to
"suggest" (or maybe "/suggest"). It's something like


On Thu, Sep 25, 2014 at 3:47 AM, Clemens Wyss DEV <>

> Am I right that I cannot call /suggest (i.e. the corresponding
> RequestHandler) through SolrJ?
> What is the preferreded way to "call" Solr handlers/operations not
> supported by SolrJ from Java? Through new SolrJ Request-classes?

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message