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/04/24 01:11:15 UTC
[jira] Created: (SOLR-212) Embeddable class to call solr directly
Embeddable class to call solr directly
--------------------------------------
Key: SOLR-212
URL: https://issues.apache.org/jira/browse/SOLR-212
Project: Solr
Issue Type: Improvement
Reporter: Ryan McKinley
Priority: Minor
For some embedded applications, it is useful to call solr without running an HTTP server. This class mimics the behavior you would get if you sent the request through an HTTP connection. It is designed to work nicely (ie simple) with JNI
the main function is:
public class DirectSolrConnection
{
String request( String pathAndParams, String body ) throws Exception
{
...
}
}
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-212) Embeddable class to call solr directly
Posted by "damu liu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12517011 ]
damu liu commented on SOLR-212:
-------------------------------
The DirectSolrConnection class should have an additional method added:
public void clearup() {
core.close();
}
otherwise, the program cannot stop, there are searcher and listeners running in other thread. Use this method to clear the resources.
> Embeddable class to call solr directly
> --------------------------------------
>
> Key: SOLR-212
> URL: https://issues.apache.org/jira/browse/SOLR-212
> Project: Solr
> Issue Type: Improvement
> Reporter: Ryan McKinley
> Assignee: Ryan McKinley
> Priority: Minor
> Fix For: 1.2
>
> Attachments: embeddedSolr.zip, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch
>
>
> For some embedded applications, it is useful to call solr without running an HTTP server. This class mimics the behavior you would get if you sent the request through an HTTP connection. It is designed to work nicely (ie simple) with JNI
> the main function is:
> public class DirectSolrConnection
> {
> String request( String pathAndParams, String body ) throws Exception
> {
> ...
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-212) Embeddable class to call solr directly
Posted by "Brian Whitman (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12492522 ]
Brian Whitman commented on SOLR-212:
------------------------------------
Since the main use case of SOLR-212 is to embed it in client applications, we should be careful about logging. As of now SOLR-212 will spit stuff all over stderr.
I suggest putting this
System.setProperty("java.util.logging.config.file", instanceDir+"/conf/logging.properties");
near line 79 of DirectSolrConnection.java. That way, if a developer/user chooses, they can put a logging.prop file in conf and set direct logging of Solr requests either to their own application logs or a file. If the conf/logging.properties file does not exist, I believe the default logging.properties will be used (which is what happens now.)
> Embeddable class to call solr directly
> --------------------------------------
>
> Key: SOLR-212
> URL: https://issues.apache.org/jira/browse/SOLR-212
> Project: Solr
> Issue Type: Improvement
> Reporter: Ryan McKinley
> Priority: Minor
> Attachments: SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch
>
>
> For some embedded applications, it is useful to call solr without running an HTTP server. This class mimics the behavior you would get if you sent the request through an HTTP connection. It is designed to work nicely (ie simple) with JNI
> the main function is:
> public class DirectSolrConnection
> {
> String request( String pathAndParams, String body ) throws Exception
> {
> ...
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (SOLR-212) Embeddable class to call solr directly
Posted by "Ryan McKinley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-212?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ryan McKinley updated SOLR-212:
-------------------------------
Attachment: SOLR-212-DirectSolrConnection.patch
Updated to take an (optional) logging path
> Embeddable class to call solr directly
> --------------------------------------
>
> Key: SOLR-212
> URL: https://issues.apache.org/jira/browse/SOLR-212
> Project: Solr
> Issue Type: Improvement
> Reporter: Ryan McKinley
> Priority: Minor
> Attachments: SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch
>
>
> For some embedded applications, it is useful to call solr without running an HTTP server. This class mimics the behavior you would get if you sent the request through an HTTP connection. It is designed to work nicely (ie simple) with JNI
> the main function is:
> public class DirectSolrConnection
> {
> String request( String pathAndParams, String body ) throws Exception
> {
> ...
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (SOLR-212) Embeddable class to call solr directly
Posted by "damu liu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-212?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
damu liu updated SOLR-212:
--------------------------
Attachment: (was: DirectSolrConnection.java)
> Embeddable class to call solr directly
> --------------------------------------
>
> Key: SOLR-212
> URL: https://issues.apache.org/jira/browse/SOLR-212
> Project: Solr
> Issue Type: Improvement
> Reporter: Ryan McKinley
> Assignee: Ryan McKinley
> Priority: Minor
> Fix For: 1.2
>
> Attachments: DirectSolrConnection.java, embeddedSolr.zip, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch
>
>
> For some embedded applications, it is useful to call solr without running an HTTP server. This class mimics the behavior you would get if you sent the request through an HTTP connection. It is designed to work nicely (ie simple) with JNI
> the main function is:
> public class DirectSolrConnection
> {
> String request( String pathAndParams, String body ) throws Exception
> {
> ...
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-212) Embeddable class to call solr directly
Posted by "damu liu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12517346 ]
damu liu commented on SOLR-212:
-------------------------------
That is great!
> Embeddable class to call solr directly
> --------------------------------------
>
> Key: SOLR-212
> URL: https://issues.apache.org/jira/browse/SOLR-212
> Project: Solr
> Issue Type: Improvement
> Reporter: Ryan McKinley
> Assignee: Ryan McKinley
> Priority: Minor
> Fix For: 1.2
>
> Attachments: DirectSolrConnection.java, embeddedSolr.zip, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch
>
>
> For some embedded applications, it is useful to call solr without running an HTTP server. This class mimics the behavior you would get if you sent the request through an HTTP connection. It is designed to work nicely (ie simple) with JNI
> the main function is:
> public class DirectSolrConnection
> {
> String request( String pathAndParams, String body ) throws Exception
> {
> ...
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Assigned: (SOLR-212) Embeddable class to call solr directly
Posted by "Ryan McKinley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-212?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ryan McKinley reassigned SOLR-212:
----------------------------------
Assignee: Ryan McKinley
> Embeddable class to call solr directly
> --------------------------------------
>
> Key: SOLR-212
> URL: https://issues.apache.org/jira/browse/SOLR-212
> Project: Solr
> Issue Type: Improvement
> Reporter: Ryan McKinley
> Assigned To: Ryan McKinley
> Priority: Minor
> Attachments: SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch
>
>
> For some embedded applications, it is useful to call solr without running an HTTP server. This class mimics the behavior you would get if you sent the request through an HTTP connection. It is designed to work nicely (ie simple) with JNI
> the main function is:
> public class DirectSolrConnection
> {
> String request( String pathAndParams, String body ) throws Exception
> {
> ...
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (SOLR-212) Embeddable class to call solr directly
Posted by "Brian Whitman (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-212?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Brian Whitman updated SOLR-212:
-------------------------------
Attachment: embeddedSolr.zip
I didn't have time to extract it from Cocoa/ObjC. Here is the xcode project with everything anyway -- so right now you'll need OSX to try this out. This is a very simple test of Ryan's SOLR-212 patch, it queries, adds a document and commits, all without a web server! Let me know if you have any questions. --brian
> Embeddable class to call solr directly
> --------------------------------------
>
> Key: SOLR-212
> URL: https://issues.apache.org/jira/browse/SOLR-212
> Project: Solr
> Issue Type: Improvement
> Reporter: Ryan McKinley
> Assigned To: Ryan McKinley
> Priority: Minor
> Fix For: 1.2
>
> Attachments: embeddedSolr.zip, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch
>
>
> For some embedded applications, it is useful to call solr without running an HTTP server. This class mimics the behavior you would get if you sent the request through an HTTP connection. It is designed to work nicely (ie simple) with JNI
> the main function is:
> public class DirectSolrConnection
> {
> String request( String pathAndParams, String body ) throws Exception
> {
> ...
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (SOLR-212) Embeddable class to call solr directly
Posted by "Ryan McKinley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-212?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ryan McKinley updated SOLR-212:
-------------------------------
Attachment: SOLR-212-DirectSolrConnection.patch
Adding dataDir to an optional constructor.
> Embeddable class to call solr directly
> --------------------------------------
>
> Key: SOLR-212
> URL: https://issues.apache.org/jira/browse/SOLR-212
> Project: Solr
> Issue Type: Improvement
> Reporter: Ryan McKinley
> Priority: Minor
> Attachments: SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch
>
>
> For some embedded applications, it is useful to call solr without running an HTTP server. This class mimics the behavior you would get if you sent the request through an HTTP connection. It is designed to work nicely (ie simple) with JNI
> the main function is:
> public class DirectSolrConnection
> {
> String request( String pathAndParams, String body ) throws Exception
> {
> ...
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-212) Embeddable class to call solr directly
Posted by "Ryan McKinley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12517049 ]
Ryan McKinley commented on SOLR-212:
------------------------------------
I added a "close()" method in rev 561922
> Embeddable class to call solr directly
> --------------------------------------
>
> Key: SOLR-212
> URL: https://issues.apache.org/jira/browse/SOLR-212
> Project: Solr
> Issue Type: Improvement
> Reporter: Ryan McKinley
> Assignee: Ryan McKinley
> Priority: Minor
> Fix For: 1.2
>
> Attachments: DirectSolrConnection.java, embeddedSolr.zip, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch
>
>
> For some embedded applications, it is useful to call solr without running an HTTP server. This class mimics the behavior you would get if you sent the request through an HTTP connection. It is designed to work nicely (ie simple) with JNI
> the main function is:
> public class DirectSolrConnection
> {
> String request( String pathAndParams, String body ) throws Exception
> {
> ...
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (SOLR-212) Embeddable class to call solr directly
Posted by "damu liu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-212?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
damu liu updated SOLR-212:
--------------------------
Attachment: DirectSolrConnection.java
My version of DirectSolrConnection with clearup method added.
> Embeddable class to call solr directly
> --------------------------------------
>
> Key: SOLR-212
> URL: https://issues.apache.org/jira/browse/SOLR-212
> Project: Solr
> Issue Type: Improvement
> Reporter: Ryan McKinley
> Assignee: Ryan McKinley
> Priority: Minor
> Fix For: 1.2
>
> Attachments: DirectSolrConnection.java, embeddedSolr.zip, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch
>
>
> For some embedded applications, it is useful to call solr without running an HTTP server. This class mimics the behavior you would get if you sent the request through an HTTP connection. It is designed to work nicely (ie simple) with JNI
> the main function is:
> public class DirectSolrConnection
> {
> String request( String pathAndParams, String body ) throws Exception
> {
> ...
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (SOLR-212) Embeddable class to call solr directly
Posted by "damu liu (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-212?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
damu liu updated SOLR-212:
--------------------------
Attachment: DirectSolrConnection.java
With clear up method added to clear up used resources
> Embeddable class to call solr directly
> --------------------------------------
>
> Key: SOLR-212
> URL: https://issues.apache.org/jira/browse/SOLR-212
> Project: Solr
> Issue Type: Improvement
> Reporter: Ryan McKinley
> Assignee: Ryan McKinley
> Priority: Minor
> Fix For: 1.2
>
> Attachments: DirectSolrConnection.java, embeddedSolr.zip, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch
>
>
> For some embedded applications, it is useful to call solr without running an HTTP server. This class mimics the behavior you would get if you sent the request through an HTTP connection. It is designed to work nicely (ie simple) with JNI
> the main function is:
> public class DirectSolrConnection
> {
> String request( String pathAndParams, String body ) throws Exception
> {
> ...
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-212) Embeddable class to call solr directly
Posted by "zhang.zuxin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12523177 ]
zhang.zuxin commented on SOLR-212:
----------------------------------
Expect standard C/C++ versions with a solr plgu-in!
Thanks Brian!
> Embeddable class to call solr directly
> --------------------------------------
>
> Key: SOLR-212
> URL: https://issues.apache.org/jira/browse/SOLR-212
> Project: Solr
> Issue Type: Improvement
> Reporter: Ryan McKinley
> Assignee: Ryan McKinley
> Priority: Minor
> Fix For: 1.2
>
> Attachments: DirectSolrConnection.java, embeddedSolr.zip, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch
>
>
> For some embedded applications, it is useful to call solr without running an HTTP server. This class mimics the behavior you would get if you sent the request through an HTTP connection. It is designed to work nicely (ie simple) with JNI
> the main function is:
> public class DirectSolrConnection
> {
> String request( String pathAndParams, String body ) throws Exception
> {
> ...
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-212) Embeddable class to call solr directly
Posted by "Brian Whitman (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12492591 ]
Brian Whitman commented on SOLR-212:
------------------------------------
Am working on extracting it from Cocoa as we speak... watch this space!
> Embeddable class to call solr directly
> --------------------------------------
>
> Key: SOLR-212
> URL: https://issues.apache.org/jira/browse/SOLR-212
> Project: Solr
> Issue Type: Improvement
> Reporter: Ryan McKinley
> Assigned To: Ryan McKinley
> Priority: Minor
> Fix For: 1.2
>
> Attachments: SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch
>
>
> For some embedded applications, it is useful to call solr without running an HTTP server. This class mimics the behavior you would get if you sent the request through an HTTP connection. It is designed to work nicely (ie simple) with JNI
> the main function is:
> public class DirectSolrConnection
> {
> String request( String pathAndParams, String body ) throws Exception
> {
> ...
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (SOLR-212) Embeddable class to call solr directly
Posted by "Ryan McKinley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-212?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ryan McKinley updated SOLR-212:
-------------------------------
Attachment: SOLR-212-DirectSolrConnection.patch
Added some real tests (it adds/delete/searches for documents) and fixed the things that broke :)
> Embeddable class to call solr directly
> --------------------------------------
>
> Key: SOLR-212
> URL: https://issues.apache.org/jira/browse/SOLR-212
> Project: Solr
> Issue Type: Improvement
> Reporter: Ryan McKinley
> Assigned To: Ryan McKinley
> Priority: Minor
> Attachments: SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch
>
>
> For some embedded applications, it is useful to call solr without running an HTTP server. This class mimics the behavior you would get if you sent the request through an HTTP connection. It is designed to work nicely (ie simple) with JNI
> the main function is:
> public class DirectSolrConnection
> {
> String request( String pathAndParams, String body ) throws Exception
> {
> ...
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-212) Embeddable class to call solr directly
Posted by "J.J. Larrea (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12493466 ]
J.J. Larrea commented on SOLR-212:
----------------------------------
One issue which comes up both DirectSolrConnection.java and the http://wiki.apache.org/solr/EmbeddedSolr technique (which I have started using for a custom indexer) is that the SolrCore constructor will always create an initial searcher, and doing so will execute any warming SolrEventListeners defined in the config, whether or not the application needs it. Besides delaying startup and wasting cycles, it can cause the allocation of significant amounts of memory for sort FieldCaches, Solr caches, and the like, none of which will be used for a non-search application. And
Other than maintaining 2 sets of config files differening only in whether warmup queries are defined, does anyone have any ideas for how warmup can be selectively enabled based on the calling context?
> Embeddable class to call solr directly
> --------------------------------------
>
> Key: SOLR-212
> URL: https://issues.apache.org/jira/browse/SOLR-212
> Project: Solr
> Issue Type: Improvement
> Reporter: Ryan McKinley
> Assigned To: Ryan McKinley
> Priority: Minor
> Fix For: 1.2
>
> Attachments: embeddedSolr.zip, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch
>
>
> For some embedded applications, it is useful to call solr without running an HTTP server. This class mimics the behavior you would get if you sent the request through an HTTP connection. It is designed to work nicely (ie simple) with JNI
> the main function is:
> public class DirectSolrConnection
> {
> String request( String pathAndParams, String body ) throws Exception
> {
> ...
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Resolved: (SOLR-212) Embeddable class to call solr directly
Posted by "Ryan McKinley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-212?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ryan McKinley resolved SOLR-212.
--------------------------------
Resolution: Fixed
Fix Version/s: 1.2
added in rev 533538
Yes Brian, we'd love to see the JNI code!
> Embeddable class to call solr directly
> --------------------------------------
>
> Key: SOLR-212
> URL: https://issues.apache.org/jira/browse/SOLR-212
> Project: Solr
> Issue Type: Improvement
> Reporter: Ryan McKinley
> Assigned To: Ryan McKinley
> Priority: Minor
> Fix For: 1.2
>
> Attachments: SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch
>
>
> For some embedded applications, it is useful to call solr without running an HTTP server. This class mimics the behavior you would get if you sent the request through an HTTP connection. It is designed to work nicely (ie simple) with JNI
> the main function is:
> public class DirectSolrConnection
> {
> String request( String pathAndParams, String body ) throws Exception
> {
> ...
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-212) Embeddable class to call solr directly
Posted by "Otis Gospodnetic (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12492534 ]
Otis Gospodnetic commented on SOLR-212:
---------------------------------------
Brian: interested!
> Embeddable class to call solr directly
> --------------------------------------
>
> Key: SOLR-212
> URL: https://issues.apache.org/jira/browse/SOLR-212
> Project: Solr
> Issue Type: Improvement
> Reporter: Ryan McKinley
> Assigned To: Ryan McKinley
> Priority: Minor
> Attachments: SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch
>
>
> For some embedded applications, it is useful to call solr without running an HTTP server. This class mimics the behavior you would get if you sent the request through an HTTP connection. It is designed to work nicely (ie simple) with JNI
> the main function is:
> public class DirectSolrConnection
> {
> String request( String pathAndParams, String body ) throws Exception
> {
> ...
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-212) Embeddable class to call solr directly
Posted by "Brian Whitman (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12492518 ]
Brian Whitman commented on SOLR-212:
------------------------------------
Much love from user land on this one. I just successfully put solr in a C app without any webserver running using JNI.
After I clean up my JNI calling code I can post an example app here to show how it's done on the client side if anyone is interested?
> Embeddable class to call solr directly
> --------------------------------------
>
> Key: SOLR-212
> URL: https://issues.apache.org/jira/browse/SOLR-212
> Project: Solr
> Issue Type: Improvement
> Reporter: Ryan McKinley
> Priority: Minor
> Attachments: SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch
>
>
> For some embedded applications, it is useful to call solr without running an HTTP server. This class mimics the behavior you would get if you sent the request through an HTTP connection. It is designed to work nicely (ie simple) with JNI
> the main function is:
> public class DirectSolrConnection
> {
> String request( String pathAndParams, String body ) throws Exception
> {
> ...
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Commented: (SOLR-212) Embeddable class to call solr directly
Posted by "Otis Gospodnetic (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12492372 ]
Otis Gospodnetic commented on SOLR-212:
---------------------------------------
Mucho cool. I see the DirectSolrConnection.coffee doesn't have ASL v2 in it.
How does this relate to the code I see on http://wiki.apache.org/solr/EmbeddedSolr ?
Typo: initalized -> initialized (in javadoc + code)
> Embeddable class to call solr directly
> --------------------------------------
>
> Key: SOLR-212
> URL: https://issues.apache.org/jira/browse/SOLR-212
> Project: Solr
> Issue Type: Improvement
> Reporter: Ryan McKinley
> Priority: Minor
> Attachments: SOLR-212-DirectSolrConnection.patch
>
>
> For some embedded applications, it is useful to call solr without running an HTTP server. This class mimics the behavior you would get if you sent the request through an HTTP connection. It is designed to work nicely (ie simple) with JNI
> the main function is:
> public class DirectSolrConnection
> {
> String request( String pathAndParams, String body ) throws Exception
> {
> ...
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (SOLR-212) Embeddable class to call solr directly
Posted by "Ryan McKinley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-212?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ryan McKinley updated SOLR-212:
-------------------------------
Attachment: SOLR-212-DirectSolrConnection.patch
This class now sits in: o.a.s.servlet because it uses package protected request parsing functions.
It has a *really* simple test that should be extended.
Example usage:
DirectSolrConnection solr = new DirectSolrConnection();
String json = solr.request( "/select?qt=dismax&wt=json&q=...", null );
String xml = solr.request( "/update", "<add><doc><field ..." );
> Embeddable class to call solr directly
> --------------------------------------
>
> Key: SOLR-212
> URL: https://issues.apache.org/jira/browse/SOLR-212
> Project: Solr
> Issue Type: Improvement
> Reporter: Ryan McKinley
> Priority: Minor
> Attachments: SOLR-212-DirectSolrConnection.patch
>
>
> For some embedded applications, it is useful to call solr without running an HTTP server. This class mimics the behavior you would get if you sent the request through an HTTP connection. It is designed to work nicely (ie simple) with JNI
> the main function is:
> public class DirectSolrConnection
> {
> String request( String pathAndParams, String body ) throws Exception
> {
> ...
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Issue Comment Edited: (SOLR-212) Embeddable class to call
solr directly
Posted by "zhang.zuxin (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-212?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#action_12523177 ]
sunrise1984 edited comment on SOLR-212 at 8/28/07 12:26 AM:
------------------------------------------------------------
Expect standard C/C++ versions with a solr plgu-in!
was (Author: sunrise1984):
Expect standard C/C++ versions with a solr plgu-in!
Thanks Brian!
> Embeddable class to call solr directly
> --------------------------------------
>
> Key: SOLR-212
> URL: https://issues.apache.org/jira/browse/SOLR-212
> Project: Solr
> Issue Type: Improvement
> Reporter: Ryan McKinley
> Assignee: Ryan McKinley
> Priority: Minor
> Fix For: 1.2
>
> Attachments: DirectSolrConnection.java, embeddedSolr.zip, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch
>
>
> For some embedded applications, it is useful to call solr without running an HTTP server. This class mimics the behavior you would get if you sent the request through an HTTP connection. It is designed to work nicely (ie simple) with JNI
> the main function is:
> public class DirectSolrConnection
> {
> String request( String pathAndParams, String body ) throws Exception
> {
> ...
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.
[jira] Updated: (SOLR-212) Embeddable class to call solr directly
Posted by "Ryan McKinley (JIRA)" <ji...@apache.org>.
[ https://issues.apache.org/jira/browse/SOLR-212?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]
Ryan McKinley updated SOLR-212:
-------------------------------
Attachment: SOLR-212-DirectSolrConnection.patch
Added header and fixed "Initialized" typo
(fixed the typo in Config r533207)
This approach differs from the one outlined in http://wiki.apache.org/solr/EmbeddedSolr in that it is strictly a text interface that mimics the request and response stream. The other approach gives you direct access to the lucene Document class. The text approach is nice because it means the same code would work if it needed to run across a network.
> Embeddable class to call solr directly
> --------------------------------------
>
> Key: SOLR-212
> URL: https://issues.apache.org/jira/browse/SOLR-212
> Project: Solr
> Issue Type: Improvement
> Reporter: Ryan McKinley
> Priority: Minor
> Attachments: SOLR-212-DirectSolrConnection.patch, SOLR-212-DirectSolrConnection.patch
>
>
> For some embedded applications, it is useful to call solr without running an HTTP server. This class mimics the behavior you would get if you sent the request through an HTTP connection. It is designed to work nicely (ie simple) with JNI
> the main function is:
> public class DirectSolrConnection
> {
> String request( String pathAndParams, String body ) throws Exception
> {
> ...
> }
> }
--
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.