Varun Thacker created SOLR-8079:
-----------------------------------

             Summary: Config API requesthandler command should support 
"last-components" and "first-components" keys
                 Key: SOLR-8079
                 URL: https://issues.apache.org/jira/browse/SOLR-8079
             Project: Solr
          Issue Type: Bug
            Reporter: Varun Thacker


There is an example on the reference guide here: 
https://cwiki.apache.org/confluence/display/solr/Config+API

{code}
curl http://localhost:8983/solr/techproducts/config -H 
'Content-type:application/json' -d '{
  "add-requesthandler": {
    "name": "/myterms",
    "class":"solr.SearchHandler",
    "defaults": { "terms":true, "distrib":false },
    "components": [ "terms" ]
  }
}'
{code}

I tried extending that and seeing if I could add a spell check component. 

So this is the command I used:

{code}
curl http://localhost:8983/solr/gettingstarted/config -H 
'Content-type:application/json' -d '{
  "create-requesthandler": {
    "name": "/myspellcheck",
    "class":"solr.SearchHandler",
    "last-components": [ "spellcheck" ]
  }
}'
{code}

This seemed to save the information correctly to the configoverlay.json file

{code}
{
  "props":{"updateHandler":{"autoSoftCommit":{"maxTime":3000}}},
  "requestHandler":{"/myspellcheck":{
      "name":"/myspellcheck",
      "class":"solr.SearchHandler",
      "last-components":["spellcheck"]}}
{code}

But I don't think it got loaded as requests didn't have spellcheck responses in 
them.

Example {{http://localhost:8983/solr/gettingstarted/myspellcheck?q=*&df=text}}

Response 

{noformat}
<response>
<lst name="responseHeader">
<int name="status">0</int>
<int name="QTime">8</int>
</lst>
<result name="response" numFound="0" start="0" maxScore="0.0"/>
</response>
{noformat}

So if we are supporting {[components}} we should also support 
{{last-components}} and {{first-components}} as well.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to