You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-dev@lucene.apache.org by "Ryan McKinley (JIRA)" <ji...@apache.org> on 2007/02/08 21:30:05 UTC
[jira] Created: (SOLR-149) Make solr more embeddable
Make solr more embeddable
-------------------------
Key: SOLR-149
URL: https://issues.apache.org/jira/browse/SOLR-149
Project: Solr
Issue Type: Improvement
Reporter: Ryan McKinley
Priority: Minor
With a few simple changes, solr can be an easily embedded in a custom jetty app.
With this patch, one can run solr from the jar file using:
server = new Server( port );
// Initalize home (without JNDI)
Config.setInstanceDir(home);
// Initalize the servlets
Context root = new Context( server, "/", Context.SESSIONS );
root.addServlet( SolrServlet.class, "/select" );
root.addServlet( SolrUpdateServlet.class, "/update" );
root.addFilter( SolrDispatchFilter.class, "*", Handler.REQUEST );
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (SOLR-149) Make solr more embeddable
Posted by "Ryan McKinley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-149?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ryan McKinley updated SOLR-149:
-------------------------------
Attachment: SOLR-149-embeddable.patch
adding the path to the request context so handlers can use it and we can make a nice debug string
> Make solr more embeddable
> -------------------------
>
> Key: SOLR-149
> URL: https://issues.apache.org/jira/browse/SOLR-149
> Project: Solr
> Issue Type: Improvement
> Reporter: Ryan McKinley
> Priority: Minor
> Attachments: SOLR-149-embeddable.patch, SOLR-149-embeddable.patch, SOLR-149-embeddable.patch
>
>
> With a few simple changes, solr can be an easily embedded in a custom jetty app.
> With this patch, one can run solr from the jar file using:
> server = new Server( port );
>
> // Initalize home (without JNDI)
> Config.setInstanceDir(home);
>
> // Initalize the servlets
> Context root = new Context( server, "/", Context.SESSIONS );
> root.addServlet( SolrServlet.class, "/select" );
> root.addServlet( SolrUpdateServlet.class, "/update" );
> root.addFilter( SolrDispatchFilter.class, "*", Handler.REQUEST );
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (SOLR-149) Make solr more embeddable
Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-149?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Yonik Seeley resolved SOLR-149.
-------------------------------
Resolution: Fixed
Committed. Thanks Ryan!
> Make solr more embeddable
> -------------------------
>
> Key: SOLR-149
> URL: https://issues.apache.org/jira/browse/SOLR-149
> Project: Solr
> Issue Type: Improvement
> Reporter: Ryan McKinley
> Priority: Minor
> Attachments: SOLR-149-embeddable.patch, SOLR-149-embeddable.patch, SOLR-149-embeddable.patch
>
>
> With a few simple changes, solr can be an easily embedded in a custom jetty app.
> With this patch, one can run solr from the jar file using:
> server = new Server( port );
>
> // Initalize home (without JNDI)
> Config.setInstanceDir(home);
>
> // Initalize the servlets
> Context root = new Context( server, "/", Context.SESSIONS );
> root.addServlet( SolrServlet.class, "/select" );
> root.addServlet( SolrUpdateServlet.class, "/update" );
> root.addFilter( SolrDispatchFilter.class, "*", Handler.REQUEST );
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-149) Make solr more embeddable
Posted by "Yonik Seeley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12471478 ]
Yonik Seeley commented on SOLR-149:
-----------------------------------
Cool!
> Make solr more embeddable
> -------------------------
>
> Key: SOLR-149
> URL: https://issues.apache.org/jira/browse/SOLR-149
> Project: Solr
> Issue Type: Improvement
> Reporter: Ryan McKinley
> Priority: Minor
> Attachments: SOLR-149-embeddable.patch
>
>
> With a few simple changes, solr can be an easily embedded in a custom jetty app.
> With this patch, one can run solr from the jar file using:
> server = new Server( port );
>
> // Initalize home (without JNDI)
> Config.setInstanceDir(home);
>
> // Initalize the servlets
> Context root = new Context( server, "/", Context.SESSIONS );
> root.addServlet( SolrServlet.class, "/select" );
> root.addServlet( SolrUpdateServlet.class, "/update" );
> root.addFilter( SolrDispatchFilter.class, "*", Handler.REQUEST );
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (SOLR-149) Make solr more embeddable
Posted by "Ryan McKinley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-149?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ryan McKinley updated SOLR-149:
-------------------------------
Attachment: SOLR-149-embeddable.patch
Modified SolrDispatchFilter to take two startup arguments
1. "handle-select"
2. "path-prefix"
The "handle-select" parameter lets the DispatchFilter take care of /select?qt=XXX in addition to the path based handlers. This is good because the DispatchFilter returns proper error codes.
"path-prefix" makes it easy to apply the filter to something other then /* in web.xml. For example, you could set this up to run at:
<filter>
<filter-name>SolrRequestFilter</filter-name>
<filter-class>o.a.s.servlet.SolrDispatchFilter</filter-class>
<init-param>
<param-name>path-prefix</param-name>
<param-value>/xxx</param-value>
</init-param>
</filter>
<filter-mapping>
<filter-name>SolrRequestFilter</filter-name>
<url-pattern>/xxx/*</url-pattern>
</filter-mapping>
</filter>
> Make solr more embeddable
> -------------------------
>
> Key: SOLR-149
> URL: https://issues.apache.org/jira/browse/SOLR-149
> Project: Solr
> Issue Type: Improvement
> Reporter: Ryan McKinley
> Priority: Minor
> Attachments: SOLR-149-embeddable.patch, SOLR-149-embeddable.patch
>
>
> With a few simple changes, solr can be an easily embedded in a custom jetty app.
> With this patch, one can run solr from the jar file using:
> server = new Server( port );
>
> // Initalize home (without JNDI)
> Config.setInstanceDir(home);
>
> // Initalize the servlets
> Context root = new Context( server, "/", Context.SESSIONS );
> root.addServlet( SolrServlet.class, "/select" );
> root.addServlet( SolrUpdateServlet.class, "/update" );
> root.addFilter( SolrDispatchFilter.class, "*", Handler.REQUEST );
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (SOLR-149) Make solr more embeddable
Posted by "Ryan McKinley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-149?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ryan McKinley updated SOLR-149:
-------------------------------
Attachment: SOLR-149-embeddable.patch
This patch
1. Adds "isInstanceDirInitalized()" to Config
2. SolrDispatchFilter only initalizes the directory if it is not already set
3. Adds a function to SolrDispatchFilter that can be easily extended to put custom attributes in the SolrQueryRequest context
> Make solr more embeddable
> -------------------------
>
> Key: SOLR-149
> URL: https://issues.apache.org/jira/browse/SOLR-149
> Project: Solr
> Issue Type: Improvement
> Reporter: Ryan McKinley
> Priority: Minor
> Attachments: SOLR-149-embeddable.patch
>
>
> With a few simple changes, solr can be an easily embedded in a custom jetty app.
> With this patch, one can run solr from the jar file using:
> server = new Server( port );
>
> // Initalize home (without JNDI)
> Config.setInstanceDir(home);
>
> // Initalize the servlets
> Context root = new Context( server, "/", Context.SESSIONS );
> root.addServlet( SolrServlet.class, "/select" );
> root.addServlet( SolrUpdateServlet.class, "/update" );
> root.addFilter( SolrDispatchFilter.class, "*", Handler.REQUEST );
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-149) Make solr more embeddable
Posted by "Brian Whitman (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-149?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12472056 ]
Brian Whitman commented on SOLR-149:
------------------------------------
Using this in a Java / Cocoa bridge, it's gorgeous. Thanks Ryan.
> Make solr more embeddable
> -------------------------
>
> Key: SOLR-149
> URL: https://issues.apache.org/jira/browse/SOLR-149
> Project: Solr
> Issue Type: Improvement
> Reporter: Ryan McKinley
> Priority: Minor
> Attachments: SOLR-149-embeddable.patch
>
>
> With a few simple changes, solr can be an easily embedded in a custom jetty app.
> With this patch, one can run solr from the jar file using:
> server = new Server( port );
>
> // Initalize home (without JNDI)
> Config.setInstanceDir(home);
>
> // Initalize the servlets
> Context root = new Context( server, "/", Context.SESSIONS );
> root.addServlet( SolrServlet.class, "/select" );
> root.addServlet( SolrUpdateServlet.class, "/update" );
> root.addFilter( SolrDispatchFilter.class, "*", Handler.REQUEST );
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.