right -- which one you pick will depend more on your runtime
environment then anything else.
If you need to hit a server (on a different machine)
CommonsHttpSolrServer is your only option.
If you are running an embedded application -- where your custom code
lives in the same JVM as solr -- you can use EmbeddedSolrServer. The
nice thing is that since they are the same interface, you can change
later.
The performance comments on the wiki can be a bit misleading -- yes,
in some cases embedded could be faster, but that may depend on how you
are sending things -- are you sending 1000s of single document
requests really fast? If so, try sending a bunch of documents
together in one request.
Also consider using the StreamingHttpSolrServer (https://issues.apache.org/jira/browse/SOLR-906
) -- it has a few quirks, but can be much faster.
In any case, as long as you program against the SolrServer interface,
then you could swap the implementation as needed.
ryan
On May 14, 2009, at 3:35 PM, Eric Pugh wrote:
CommonsHttpSolrServer is how you access Solr from a Java client via
HTTP. You can connect to a Solr running anywhere....
EmbeddedSolrServer starts up Solr internally, and connects directly,
all in a single JVM... Embedded may be faster, the jury is out, but
you have to have your Solr server and your Solr client on the same
box... Unless you really need it, I would start with
CommonsHttpSolrServer, it's easier to configure and get going with
and more flexible.
Eric
On May 14, 2009, at 1:30 PM, sachin78 wrote:
What is the difference between EmbeddedSolrServer and
CommonsHttpSolrServer.
Which is the preferred server to use?
In some blog i read that EmbeddedSolrServer is 50% faster than
CommonsHttpSolrServer,then why do we need to use
CommonsHttpSolrServer.
Can anyone please guide me the right path/way.So that i pick the
right
implementation.
Thanks in advance.
--Sachin
--
View this message in context:
http://www.nabble.com/CommonsHttpSolrServer-vs-EmbeddedSolrServer-tp23545281p23545281.html
Sent from the Solr - User mailing list archive at Nabble.com.
-----------------------------------------------------
Eric Pugh | Principal | OpenSource Connections, LLC | 434.466.1467 |
http://www.opensourceconnections.com
Free/Busy: http://tinyurl.com/eric-cal