[ 
https://issues.apache.org/jira/browse/SOLR-104?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12464557
 ] 

Ryan McKinley commented on SOLR-104:
------------------------------------

I tried my hand at refactoring solr to have a more flexible plugin framework.  

To apply this patch, you will need to:
1) apply: HandlerRefactoring.DRAFT.patch
2) download HandlerRefactoring.DRAFT.zip and extract the contents to:
    \solr\src\java\org\apache\solr\handler

(svn patches don' t let you add new directories!)

All tests pass, and http://localhost:8983/solr/select/ & 
http://localhost:8983/solr/update point to the same servlets as before and 
*should* behave exactly as they did before.

* I changed the RequestHandlers framework to map "action" > "name" > handler, 
rather then just "name" > handler 

* I added a filter (SolrRequestFilter.java) that gets applied to every request 
and checks if the path is a registered "action".  If it is, it will be handled 
by the RequestHander otherwise it is passed down the filter chain.

* I refactored 'SolrParams' to handles the general case, not only query params. 
 I moved the specific params to o.a.s.handler.search.QueryParams.  I deleted a 
few deprecated parameter options: it just got too messy to refactor depricated 
things.

* I moved the 'query' handlers into org.apache.solr.handler.search.*  In 
general, handlers are in a package with the name of their action.

TODO:
* The generic SolrRequest must somehow encapsulate the posted stream
* Add cookies, remote host, remote user to the SolrRequest?  (standard requests 
won't use them, but custom handlers may have a good use for them)
* and much much more!

- - - - - - - -

Usage: 
http://localhost:8983/solr/${action}/${handler}?args

If no handler is specified, it will use the default handler for that action.


Current: (still works)
http://localhost:8983/solr/select/?q=solr  (current style)

New: (should be exact same output)
http://localhost:8983/solr/search/?q=solr
http://localhost:8983/solr/search/standard/?q=solr
http://localhost:8983/solr/search/dismax/?q=solr

http://localhost:8983/solr/update2/commit
http://localhost:8983/solr/update2/optimize

note: I am using 'search' and 'update2' so that the old URL still works and 
points to what people are used to.

Document adding stubs:
http://localhost:8983/solr/add/xml/
http://localhost:8983/solr/add/csv/
http://localhost:8983/solr/add/sql/


Let me know what you think!



> SQL Upload Plugin
> -----------------
>
>                 Key: SOLR-104
>                 URL: https://issues.apache.org/jira/browse/SOLR-104
>             Project: Solr
>          Issue Type: Improvement
>          Components: update
>    Affects Versions: 1.2
>            Reporter: Ryan McKinley
>             Fix For: 1.2
>
>         Attachments: HandlerRefactoring.DRAFT.patch, 
> HandlerRefactoring.DRAFT.zip
>
>
> Solr needs an easy way to upload lots of files directly from SQL.
> See also: SOLR-66 (CSV uploader)

-- 
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: 
https://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira

        

Reply via email to