You need to enable the sql module.  I suspect you won’t be the first person 
with this email now that we have added modules.  It would be nice if the UI 
told you that you need to restart Solr with that setting!

https://solr.apache.org/guide/solr/latest/query-guide/sql-query.html#module

bin/solr start -e techproducts -Dsolr.modules=sql




> On Aug 10, 2023, at 8:36 AM, Kojo <rbsnk...@gmail.com> wrote:
> 
> Hi,
> I'm trying to get the SQL query requestHandler up and running using this
> config: <requestHandler name="/sql" class="solr.SQLHandler">.
> 
> My setup involves solr-9.0.0 in cloud mode with ZooKeeper.
> 
> I went through the Solr documentation, but I'm hitting a roadblock with
> just that. Do you know any other sources that might help? I've already
> checked out the official Solr documentation here:
> https://solr.apache.org/guide/solr/latest/query-guide/sql-query.html#configuration
> 
> Here's what I've tried so far, but sadly, no luck:
> 
> - Tried a query on the admin page.
> - Attempted to connect via sqlalchemy-solr.
> - Gave a shot at sending a request to the _sql/ endpoint.
> 
> On the config side of things:
> 
> - Initially, I thought I could get away with no extra config, as per Solr's
> docs. Supposedly, the /sql request handler should already be good to go in
> a regular Solr installation.
> 
> - Then I got a bit fancy and added the request handler config directly into
> the solrconfig.xml file like this:
> 
> <requestHandler name="/sql" class="solr.SQLHandler">
>    <lst name="defaults">
>        <str name="config">solrconfig.xml</str>
>    </lst>
> </requestHandler>
> 
> 
> To solve this puzzle, I tried these moves:
> 
> Grabbed the solr-core-9.0.0.jar library from
> /server/solr-webapp/webapp/WEB-INF/lib/ and threw it into
> <solr_home>/server/lib/.
> I doubled down and copied the solr-sql-9.0.0.jar from
> <solr_home>/modules/sql/lib/ to both <solr_home>/server/lib/ and
> <solr_home>/server/lib/ext/.
> Oh, and I also tweaked the solrconfig.xml file by sticking in a line to
> point to the outside library directory:
> 
> <lib dir="${solr.install.dir:../../../..}/lib/ext/" regex=".*\.jar" />
> 
> 
> I'm reaching out to see if I'm on the right track here. If I am, I'm
> planning to keep poking around and maybe get some error logs to show you
> later. But if I'm off the mark, your tips or suggestions for other places
> to look would be awesome.
> 
> Thanks a bunch for your help!
> 
> Cheers,
> Koji

_______________________
Eric Pugh | Founder & CEO | OpenSource Connections, LLC | 434.466.1467 | 
http://www.opensourceconnections.com <http://www.opensourceconnections.com/> | 
My Free/Busy <http://tinyurl.com/eric-cal>  
Co-Author: Apache Solr Enterprise Search Server, 3rd Ed 
<https://www.packtpub.com/big-data-and-business-intelligence/apache-solr-enterprise-search-server-third-edition-raw>
    
This e-mail and all contents, including attachments, is considered to be 
Company Confidential unless explicitly stated otherwise, regardless of whether 
attachments are marked as such.

Reply via email to