Search code examples
solrsolrcloud

Can I query a new handler not in solr config?


I am using solr 5.4.0.

I want to create a new handler in solr say "X". This handler is not defined in solr config, but can I define this on run time and include it in query using the qt field?

The same way how we can replace the bq, qf etc fields for an already existing handler in solr config, is there a support for creating a new handler while issuing the solr query as well


Solution

  • I do not remember being able to create additional request handlers via API in Solr 5.4. You may be able to modify or XInclude a file on a filesystem and reload core. But that's a bit hacky.

    In the latest versions of Solr, you do have

    • configuration API to override solrconfig.xml
    • request parameters API, that allow you to define parameter sets, which you can apply with useParams configuration or as a query parameter in the URL.