Re: Solr server configuration

2018-01-15 Thread Emir Arnautović
Hi Deepak,
Here is another blog post containing some thought how it can be estimated.

http://www.od-bits.com/2018/01/solrelasticsearch-capacity-planning.html 


HTH,
Emir
--
Monitoring - Log Management - Alerting - Anomaly Detection
Solr & Elasticsearch Consulting Support Training - http://sematext.com/



> On 12 Jan 2018, at 17:08, Erick Erickson  wrote:
> 
> First, it's totally impossible to answer in the abstract, see:
> https://lucidworks.com/2012/07/23/sizing-hardware-in-the-abstract-why-we-dont-have-a-definitive-answer/
> 
> Second, indexing DB tables directly into Solr is usually the wrong
> approach. Solr is not a replacement for a relational DB, it does not
> function as a DB, is not optimized for joins etc. It's  a _search
> engine_ and does that superlatively.
> 
> At the very least, the most common recommendation if you have the
> space is to de-normalize the data. My point is you need to think about
> this problem in terms of _search_, not "move some tables to Solr and
> use Solr like a DB". Which means that even if someone can answer your
> questions, it won't help much.
> 
> Best,
> Erick
> 
> On Thu, Jan 11, 2018 at 9:53 PM, Deepak Nair  wrote:
>> Hello,
>> 
>> We want to implement Solr 7.x for one of our client with below requirement.
>> 
>> 
>> 1.   The data to be index will be from 2 Oracle databases with 2 tables 
>> each and around 10 columns.
>> 
>> 2.   The data volume is expected to be reach around 10 million in each 
>> table.
>> 
>> 3.   4000+ users will query the indexed data from a UI. The peak load is 
>> expected to be around 2000 queries/sec.
>> 
>> 4.   The implementation will be on a standalone or clustered Unix 
>> environment.
>> 
>> I want to know what should be the best server configuration for this kind of 
>> requirement. Eg: how many VMs, what should be the RAM, Heap size etc.
>> 
>> Thanks,
>> Deepak



Re: Solr server configuration

2018-01-12 Thread Erick Erickson
First, it's totally impossible to answer in the abstract, see:
https://lucidworks.com/2012/07/23/sizing-hardware-in-the-abstract-why-we-dont-have-a-definitive-answer/

Second, indexing DB tables directly into Solr is usually the wrong
approach. Solr is not a replacement for a relational DB, it does not
function as a DB, is not optimized for joins etc. It's  a _search
engine_ and does that superlatively.

At the very least, the most common recommendation if you have the
space is to de-normalize the data. My point is you need to think about
this problem in terms of _search_, not "move some tables to Solr and
use Solr like a DB". Which means that even if someone can answer your
questions, it won't help much.

Best,
Erick

On Thu, Jan 11, 2018 at 9:53 PM, Deepak Nair  wrote:
> Hello,
>
> We want to implement Solr 7.x for one of our client with below requirement.
>
>
> 1.   The data to be index will be from 2 Oracle databases with 2 tables 
> each and around 10 columns.
>
> 2.   The data volume is expected to be reach around 10 million in each 
> table.
>
> 3.   4000+ users will query the indexed data from a UI. The peak load is 
> expected to be around 2000 queries/sec.
>
> 4.   The implementation will be on a standalone or clustered Unix 
> environment.
>
> I want to know what should be the best server configuration for this kind of 
> requirement. Eg: how many VMs, what should be the RAM, Heap size etc.
>
> Thanks,
> Deepak


RE: Solr Server Configuration

2007-07-10 Thread nithyavembu

Hi Kijiji Xu,

   Thanks a lot for your clear guidance. I tried as you said. But i was
unclear with the environment varible values in solr.xml  So atlast i didnt
touch the configuration parts.
These are the steps i followed for the solr server working..

1. Used tomcat 5 with windows.
2. Deployed the war apache-solr-1.2.0 in to the webapp directory and rename
it as solr.war
3. Then i created one folder named solr in tomcat -  bin.
4. Copy the conf folder in example folder and placed that conf in the solr
folder in tomcat bin.
5. Then start the server and and tried the url http://localhost:8080/solr/
in browser.

Is there anything wrong i did? If so please tell me..

with Regards,
V.Nithya.


Kijiji Xu, Ping wrote:
 
 i) In lucene we add document  by using java. But here they given in xml
 format and posting them using  POST.jar. How can i add document in java?
 In java ,there have a class named org.apache.solr.util.SimplePostTool ,you
 can look at the source code of it,and you'll know how it worked for
 posting xml data to solr
 
 ii) How can i send the http request n get response in a standalone java
 program?
 In my opinion, you can use the java HttpURLConnection class to request and
 get response from the solr server
 
 iii) Whether i have to add any xml or i have to modify the xml
 (server.xml,web.xml) files for solr server configuration?
 NO, but there have two type of configuration for solr .
 First of all, the solr configuration file locate in the solr/conf,there
 are solrconfig.xml and schema.xml ,you would change them for your
 application .
 Second, you have to deploy solr application itself to Tomcat, and you
 would put a configuration file like this in the tomcat ,the path is 
 /home/tomcat/conf/Catalina/localhost/:
 Context docBase=/home/tomcat/webapps/solr.war debug=0
 crossContext=true 
Environment name=solr/home type=java.lang.String
 value=/home/tomcat/solr override=true /
 /Context
  
 That's all,if you have any question,feel free to ask me:)
 -Original Message-
 From: nithyavembu [mailto:[EMAIL PROTECTED] 
 Sent: 2007年7月6日 13:27
 To: solr-user@lucene.apache.org
 Subject: Solr Server Configuration
 
 
 Hi All,
 
   I am new to Solr. But i am familiar with lucene.
  I am stuggling in solr server configuation.I am using Tomcat 5. I have
 worked with the example   standalone given with solr while i download.
  But my doubt is 
   i) In lucene we add document  by using java. But here they given in xml
 format and posting them using  POST.jar. How can i add document in java?
  ii) How can i send the http request n get response in a standalone java
 program?
  iii) Whether i have to add any xml or i have to modify the xml
 (server.xml,web.xml) files for solr server configuration?
 
 
 Best,
 Nithya.V.
 -- 
 View this message in context:
 http://www.nabble.com/Solr-Server-Configuration-tf4033748.html#a11458997
 Sent from the Solr - User mailing list archive at Nabble.com.
 
 

-- 
View this message in context: 
http://www.nabble.com/Solr-Server-Configuration-tf4033748.html#a11517331
Sent from the Solr - User mailing list archive at Nabble.com.



RE: Solr Server Configuration

2007-07-10 Thread Kijiji Xu, Ping
I'm sorry I don't quite understand why you create a folder named solr in 
tomcat/bin in your step 3
The first of all ,you should understand this solr.xml file which I put in 
tomcat/conf/Catalina/localhost/,its contents follows like this:
Context docBase=/home/tomcat/webapps/solr.war debug=0 crossContext=true 
   Environment name=solr/home type=java.lang.String value=/home/solr 
override=true /
/Context

When tomcat was start,tomcat will read this file,and then,tomcat know that he 
should unzip the /home/tomcat/webapps/solr.war,deploy it ,you'll see a folder 
named solr in the tomcat webapps folder when tomcat be started at last.
And Environment name=solr/home type=java.lang.String value=/home/solr 
override=true / means solr's home path is /home/solr, in the folder 
'/home/solr',it contains folder 'conf' with solr's configuration 
file:schema.xml and solrconfig.xml ,so at last file structure will be like this:

/home/tomcat/conf/Catalina/localhost/solr.xml
/home/tomcat/webapps/solr.war
/home/solr/conf/schema.xml
/home/solr/conf/solrconfig.xml

I attacked a home.rar file in this mail,it is solr's files in the tomcat 
directory structure,FYI

My msn: [EMAIL PROTECTED] if there is problem,pls contact with me.

-Original Message-
From: nithyavembu [mailto:[EMAIL PROTECTED] 
Sent: 2007年7月10日 17:14
To: solr-user@lucene.apache.org
Subject: RE: Solr Server Configuration


Hi Kijiji Xu,

   Thanks a lot for your clear guidance. I tried as you said. But i was
unclear with the environment varible values in solr.xml  So atlast i didnt
touch the configuration parts.
These are the steps i followed for the solr server working..

1. Used tomcat 5 with windows.
2. Deployed the war apache-solr-1.2.0 in to the webapp directory and rename
it as solr.war
3. Then i created one folder named solr in tomcat -  bin.
4. Copy the conf folder in example folder and placed that conf in the solr
folder in tomcat bin.
5. Then start the server and and tried the url http://localhost:8080/solr/
in browser.

Is there anything wrong i did? If so please tell me..

with Regards,
V.Nithya.


Kijiji Xu, Ping wrote:
 
 i) In lucene we add document  by using java. But here they given in xml
 format and posting them using  POST.jar. How can i add document in java?
 In java ,there have a class named org.apache.solr.util.SimplePostTool ,you
 can look at the source code of it,and you'll know how it worked for
 posting xml data to solr
 
 ii) How can i send the http request n get response in a standalone java
 program?
 In my opinion, you can use the java HttpURLConnection class to request and
 get response from the solr server
 
 iii) Whether i have to add any xml or i have to modify the xml
 (server.xml,web.xml) files for solr server configuration?
 NO, but there have two type of configuration for solr .
 First of all, the solr configuration file locate in the solr/conf,there
 are solrconfig.xml and schema.xml ,you would change them for your
 application .
 Second, you have to deploy solr application itself to Tomcat, and you
 would put a configuration file like this in the tomcat ,the path is 
 /home/tomcat/conf/Catalina/localhost/:
 Context docBase=/home/tomcat/webapps/solr.war debug=0
 crossContext=true 
Environment name=solr/home type=java.lang.String
 value=/home/tomcat/solr override=true /
 /Context
  
 That's all,if you have any question,feel free to ask me:)
 -Original Message-
 From: nithyavembu [mailto:[EMAIL PROTECTED] 
 Sent: 2007年7月6日 13:27
 To: solr-user@lucene.apache.org
 Subject: Solr Server Configuration
 
 
 Hi All,
 
   I am new to Solr. But i am familiar with lucene.
  I am stuggling in solr server configuation.I am using Tomcat 5. I have
 worked with the example   standalone given with solr while i download.
  But my doubt is 
   i) In lucene we add document  by using java. But here they given in xml
 format and posting them using  POST.jar. How can i add document in java?
  ii) How can i send the http request n get response in a standalone java
 program?
  iii) Whether i have to add any xml or i have to modify the xml
 (server.xml,web.xml) files for solr server configuration?
 
 
 Best,
 Nithya.V.
 -- 
 View this message in context:
 http://www.nabble.com/Solr-Server-Configuration-tf4033748.html#a11458997
 Sent from the Solr - User mailing list archive at Nabble.com.
 
 

-- 
View this message in context: 
http://www.nabble.com/Solr-Server-Configuration-tf4033748.html#a11517331
Sent from the Solr - User mailing list archive at Nabble.com.


RE: Solr Server Configuration

2007-07-10 Thread nithyavembu

Hi,

 I tried as you said and got the result without any error. So we can make
the solr home anywhere. But we have to give the path correctly in solr.xml.
Am i correct?

 Now i am one step further.. :)

Best,
V.Nithya.



Kijiji Xu, Ping wrote:
 
 I'm sorry I don't quite understand why you create a folder named solr in
 tomcat/bin in your step 3
 The first of all ,you should understand this solr.xml file which I put in
 tomcat/conf/Catalina/localhost/,its contents follows like this:
 Context docBase=/home/tomcat/webapps/solr.war debug=0
 crossContext=true 
Environment name=solr/home type=java.lang.String
 value=/home/solr override=true /
 /Context
 
 When tomcat was start,tomcat will read this file,and then,tomcat know that
 he should unzip the /home/tomcat/webapps/solr.war,deploy it ,you'll see a
 folder named solr in the tomcat webapps folder when tomcat be started at
 last.
 And Environment name=solr/home type=java.lang.String
 value=/home/solr override=true / means solr's home path is
 /home/solr, in the folder '/home/solr',it contains folder 'conf' with
 solr's configuration file:schema.xml and solrconfig.xml ,so at last file
 structure will be like this:
 
 /home/tomcat/conf/Catalina/localhost/solr.xml
 /home/tomcat/webapps/solr.war
 /home/solr/conf/schema.xml
 /home/solr/conf/solrconfig.xml
 
 I attacked a home.rar file in this mail,it is solr's files in the tomcat
 directory structure,FYI
 
 My msn: [EMAIL PROTECTED] if there is problem,pls contact with me.
 
 -Original Message-
 From: nithyavembu [mailto:[EMAIL PROTECTED] 
 Sent: 2007年7月10日 17:14
 To: solr-user@lucene.apache.org
 Subject: RE: Solr Server Configuration
 
 
 Hi Kijiji Xu,
 
Thanks a lot for your clear guidance. I tried as you said. But i was
 unclear with the environment varible values in solr.xml  So atlast i didnt
 touch the configuration parts.
 These are the steps i followed for the solr server working..
 
 1. Used tomcat 5 with windows.
 2. Deployed the war apache-solr-1.2.0 in to the webapp directory and
 rename
 it as solr.war
 3. Then i created one folder named solr in tomcat -  bin.
 4. Copy the conf folder in example folder and placed that conf in the solr
 folder in tomcat bin.
 5. Then start the server and and tried the url http://localhost:8080/solr/
 in browser.
 
 Is there anything wrong i did? If so please tell me..
 
 with Regards,
 V.Nithya.
 
 
 Kijiji Xu, Ping wrote:
 
 i) In lucene we add document  by using java. But here they given in xml
 format and posting them using  POST.jar. How can i add document in java?
 In java ,there have a class named org.apache.solr.util.SimplePostTool
 ,you
 can look at the source code of it,and you'll know how it worked for
 posting xml data to solr
 
 ii) How can i send the http request n get response in a standalone java
 program?
 In my opinion, you can use the java HttpURLConnection class to request
 and
 get response from the solr server
 
 iii) Whether i have to add any xml or i have to modify the xml
 (server.xml,web.xml) files for solr server configuration?
 NO, but there have two type of configuration for solr .
 First of all, the solr configuration file locate in the solr/conf,there
 are solrconfig.xml and schema.xml ,you would change them for your
 application .
 Second, you have to deploy solr application itself to Tomcat, and you
 would put a configuration file like this in the tomcat ,the path is 
 /home/tomcat/conf/Catalina/localhost/:
 Context docBase=/home/tomcat/webapps/solr.war debug=0
 crossContext=true 
Environment name=solr/home type=java.lang.String
 value=/home/tomcat/solr override=true /
 /Context
  
 That's all,if you have any question,feel free to ask me:)
 -Original Message-
 From: nithyavembu [mailto:[EMAIL PROTECTED] 
 Sent: 2007年7月6日 13:27
 To: solr-user@lucene.apache.org
 Subject: Solr Server Configuration
 
 
 Hi All,
 
   I am new to Solr. But i am familiar with lucene.
  I am stuggling in solr server configuation.I am using Tomcat 5. I have
 worked with the example   standalone given with solr while i download.
  But my doubt is 
   i) In lucene we add document  by using java. But here they given in xml
 format and posting them using  POST.jar. How can i add document in java?
  ii) How can i send the http request n get response in a standalone java
 program?
  iii) Whether i have to add any xml or i have to modify the xml
 (server.xml,web.xml) files for solr server configuration?
 
 
 Best,
 Nithya.V.
 -- 
 View this message in context:
 http://www.nabble.com/Solr-Server-Configuration-tf4033748.html#a11458997
 Sent from the Solr - User mailing list archive at Nabble.com.
 
 
 
 -- 
 View this message in context:
 http://www.nabble.com/Solr-Server-Configuration-tf4033748.html#a11517331
 Sent from the Solr - User mailing list archive at Nabble.com.
 
 

-- 
View this message in context: 
http://www.nabble.com/Solr-Server-Configuration-tf4033748.html#a11518289
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Solr Server Configuration

2007-07-10 Thread James liu

u can find configuration datadir in solrconfig.xml(solr 1.2)

2007/7/10, nithyavembu [EMAIL PROTECTED]:



Hi,

I tried as you said and got the result without any error. So we can make
the solr home anywhere. But we have to give the path correctly in solr.xml
.
Am i correct?

Now i am one step further.. :)

Best,
V.Nithya.



Kijiji Xu, Ping wrote:

 I'm sorry I don't quite understand why you create a folder named solr in
 tomcat/bin in your step 3
 The first of all ,you should understand this solr.xml file which I put
in
 tomcat/conf/Catalina/localhost/,its contents follows like this:
 Context docBase=/home/tomcat/webapps/solr.war debug=0
 crossContext=true 
Environment name=solr/home type=java.lang.String
 value=/home/solr override=true /
 /Context

 When tomcat was start,tomcat will read this file,and then,tomcat know
that
 he should unzip the /home/tomcat/webapps/solr.war,deploy it ,you'll see
a
 folder named solr in the tomcat webapps folder when tomcat be started at
 last.
 And Environment name=solr/home type=java.lang.String
 value=/home/solr override=true / means solr's home path is
 /home/solr, in the folder '/home/solr',it contains folder 'conf' with
 solr's configuration file:schema.xml and solrconfig.xml ,so at last file
 structure will be like this:

 /home/tomcat/conf/Catalina/localhost/solr.xml
 /home/tomcat/webapps/solr.war
 /home/solr/conf/schema.xml
 /home/solr/conf/solrconfig.xml

 I attacked a home.rar file in this mail,it is solr's files in the tomcat
 directory structure,FYI

 My msn: [EMAIL PROTECTED] if there is problem,pls contact with me.

 -Original Message-
 From: nithyavembu [mailto:[EMAIL PROTECTED]
 Sent: 2007年7月10日 17:14
 To: solr-user@lucene.apache.org
 Subject: RE: Solr Server Configuration


 Hi Kijiji Xu,

Thanks a lot for your clear guidance. I tried as you said. But i was
 unclear with the environment varible values in solr.xml  So atlast i
didnt
 touch the configuration parts.
 These are the steps i followed for the solr server working..

 1. Used tomcat 5 with windows.
 2. Deployed the war apache-solr-1.2.0 in to the webapp directory and
 rename
 it as solr.war
 3. Then i created one folder named solr in tomcat -  bin.
 4. Copy the conf folder in example folder and placed that conf in the
solr
 folder in tomcat bin.
 5. Then start the server and and tried the url
http://localhost:8080/solr/
 in browser.

 Is there anything wrong i did? If so please tell me..

 with Regards,
 V.Nithya.


 Kijiji Xu, Ping wrote:

 i) In lucene we add document  by using java. But here they given in xml
 format and posting them using  POST.jar. How can i add document in
java?
 In java ,there have a class named org.apache.solr.util.SimplePostTool
 ,you
 can look at the source code of it,and you'll know how it worked for
 posting xml data to solr

 ii) How can i send the http request n get response in a standalone java
 program?
 In my opinion, you can use the java HttpURLConnection class to request
 and
 get response from the solr server

 iii) Whether i have to add any xml or i have to modify the xml
 (server.xml,web.xml) files for solr server configuration?
 NO, but there have two type of configuration for solr .
 First of all, the solr configuration file locate in the solr/conf,there
 are solrconfig.xml and schema.xml ,you would change them for your
 application .
 Second, you have to deploy solr application itself to Tomcat, and you
 would put a configuration file like this in the tomcat ,the path is
 /home/tomcat/conf/Catalina/localhost/:
 Context docBase=/home/tomcat/webapps/solr.war debug=0
 crossContext=true 
Environment name=solr/home type=java.lang.String
 value=/home/tomcat/solr override=true /
 /Context

 That's all,if you have any question,feel free to ask me:)
 -Original Message-
 From: nithyavembu [mailto:[EMAIL PROTECTED]
 Sent: 2007年7月6日 13:27
 To: solr-user@lucene.apache.org
 Subject: Solr Server Configuration


 Hi All,

   I am new to Solr. But i am familiar with lucene.
  I am stuggling in solr server configuation.I am using Tomcat 5. I have
 worked with the example   standalone given with solr while i
download.
  But my doubt is
   i) In lucene we add document  by using java. But here they given in
xml
 format and posting them using  POST.jar. How can i add document in
java?
  ii) How can i send the http request n get response in a standalone
java
 program?
  iii) Whether i have to add any xml or i have to modify the xml
 (server.xml,web.xml) files for solr server configuration?


 Best,
 Nithya.V.
 --
 View this message in context:

http://www.nabble.com/Solr-Server-Configuration-tf4033748.html#a11458997
 Sent from the Solr - User mailing list archive at Nabble.com.



 --
 View this message in context:
 http://www.nabble.com/Solr-Server-Configuration-tf4033748.html#a11517331
 Sent from the Solr - User mailing list archive at Nabble.com.



--
View this message in context:
http://www.nabble.com/Solr-Server-Configuration-tf4033748.html

RE: Solr Server Configuration

2007-07-10 Thread Kijiji Xu, Ping
Yes, that's right, just make the path in the solr.xml is right, everything will 
be ok!

-Original Message-
From: nithyavembu [mailto:[EMAIL PROTECTED] 
Sent: 2007年7月10日 18:28
To: solr-user@lucene.apache.org
Subject: RE: Solr Server Configuration


Hi,

 I tried as you said and got the result without any error. So we can make
the solr home anywhere. But we have to give the path correctly in solr.xml.
Am i correct?

 Now i am one step further.. :)

Best,
V.Nithya.



Kijiji Xu, Ping wrote:
 
 I'm sorry I don't quite understand why you create a folder named solr in
 tomcat/bin in your step 3
 The first of all ,you should understand this solr.xml file which I put in
 tomcat/conf/Catalina/localhost/,its contents follows like this:
 Context docBase=/home/tomcat/webapps/solr.war debug=0
 crossContext=true 
Environment name=solr/home type=java.lang.String
 value=/home/solr override=true /
 /Context
 
 When tomcat was start,tomcat will read this file,and then,tomcat know that
 he should unzip the /home/tomcat/webapps/solr.war,deploy it ,you'll see a
 folder named solr in the tomcat webapps folder when tomcat be started at
 last.
 And Environment name=solr/home type=java.lang.String
 value=/home/solr override=true / means solr's home path is
 /home/solr, in the folder '/home/solr',it contains folder 'conf' with
 solr's configuration file:schema.xml and solrconfig.xml ,so at last file
 structure will be like this:
 
 /home/tomcat/conf/Catalina/localhost/solr.xml
 /home/tomcat/webapps/solr.war
 /home/solr/conf/schema.xml
 /home/solr/conf/solrconfig.xml
 
 I attacked a home.rar file in this mail,it is solr's files in the tomcat
 directory structure,FYI
 
 My msn: [EMAIL PROTECTED] if there is problem,pls contact with me.
 
 -Original Message-
 From: nithyavembu [mailto:[EMAIL PROTECTED] 
 Sent: 2007年7月10日 17:14
 To: solr-user@lucene.apache.org
 Subject: RE: Solr Server Configuration
 
 
 Hi Kijiji Xu,
 
Thanks a lot for your clear guidance. I tried as you said. But i was
 unclear with the environment varible values in solr.xml  So atlast i didnt
 touch the configuration parts.
 These are the steps i followed for the solr server working..
 
 1. Used tomcat 5 with windows.
 2. Deployed the war apache-solr-1.2.0 in to the webapp directory and
 rename
 it as solr.war
 3. Then i created one folder named solr in tomcat -  bin.
 4. Copy the conf folder in example folder and placed that conf in the solr
 folder in tomcat bin.
 5. Then start the server and and tried the url http://localhost:8080/solr/
 in browser.
 
 Is there anything wrong i did? If so please tell me..
 
 with Regards,
 V.Nithya.
 
 
 Kijiji Xu, Ping wrote:
 
 i) In lucene we add document  by using java. But here they given in xml
 format and posting them using  POST.jar. How can i add document in java?
 In java ,there have a class named org.apache.solr.util.SimplePostTool
 ,you
 can look at the source code of it,and you'll know how it worked for
 posting xml data to solr
 
 ii) How can i send the http request n get response in a standalone java
 program?
 In my opinion, you can use the java HttpURLConnection class to request
 and
 get response from the solr server
 
 iii) Whether i have to add any xml or i have to modify the xml
 (server.xml,web.xml) files for solr server configuration?
 NO, but there have two type of configuration for solr .
 First of all, the solr configuration file locate in the solr/conf,there
 are solrconfig.xml and schema.xml ,you would change them for your
 application .
 Second, you have to deploy solr application itself to Tomcat, and you
 would put a configuration file like this in the tomcat ,the path is 
 /home/tomcat/conf/Catalina/localhost/:
 Context docBase=/home/tomcat/webapps/solr.war debug=0
 crossContext=true 
Environment name=solr/home type=java.lang.String
 value=/home/tomcat/solr override=true /
 /Context
  
 That's all,if you have any question,feel free to ask me:)
 -Original Message-
 From: nithyavembu [mailto:[EMAIL PROTECTED] 
 Sent: 2007年7月6日 13:27
 To: solr-user@lucene.apache.org
 Subject: Solr Server Configuration
 
 
 Hi All,
 
   I am new to Solr. But i am familiar with lucene.
  I am stuggling in solr server configuation.I am using Tomcat 5. I have
 worked with the example   standalone given with solr while i download.
  But my doubt is 
   i) In lucene we add document  by using java. But here they given in xml
 format and posting them using  POST.jar. How can i add document in java?
  ii) How can i send the http request n get response in a standalone java
 program?
  iii) Whether i have to add any xml or i have to modify the xml
 (server.xml,web.xml) files for solr server configuration?
 
 
 Best,
 Nithya.V.
 -- 
 View this message in context:
 http://www.nabble.com/Solr-Server-Configuration-tf4033748.html#a11458997
 Sent from the Solr - User mailing list archive at Nabble.com.
 
 
 
 -- 
 View this message in context:
 http://www.nabble.com/Solr-Server-Configuration

RE: Solr Server Configuration

2007-07-06 Thread Vince McNamara
Hi Nithya

I'm new to this myself and I'm sure there are other ways to POST to solr but
here's one way. This uses the Apache commons HttpClient - downloaded from
http://jakarta.apache.org/commons/httpclient/
You need to change the first parameter to the StringRequestEntity
constructor to use a string containing your xml document.
I can't help with Tomcat configuration - I haven't used it for solr.


Cheers

Vince


HttpClient client = new HttpClient();
PostMethod method = new PostMethod(http://localhost:8983/solr/update;);
RequestEntity requestBody = new StringRequestEntity(xmlDoc.asXML(),
text/xml;  charset=UTF-8,UTF-8);
method.setRequestEntity(requestBody);
client.executeMethod(method);
String response = null;
if (method.getStatusCode() == 200){
response = method.getResponseBodyAsString();
LOGGER.debug(RESPONSE  + response);
}

requestBody = new StringRequestEntity(commit/,text/xml;
charset=UTF-8,UTF-8);
method.setRequestEntity(requestBody);
client.executeMethod(method);
if (method.getStatusCode() == 200){
response = method.getResponseBodyAsString();
LOGGER.debug(RESPONSE  + response);
}
method.releaseConnection();




-Original Message-
From: nithyavembu [mailto:[EMAIL PROTECTED] 
Sent: 06 July 2007 06:27
To: solr-user@lucene.apache.org
Subject: Solr Server Configuration


Hi All,

  I am new to Solr. But i am familiar with lucene.
 I am stuggling in solr server configuation.I am using Tomcat 5. I have
worked with the example   standalone given with solr while i download.
 But my doubt is 
  i) In lucene we add document  by using java. But here they given in xml
format and posting them using  POST.jar. How can i add document in java?
 ii) How can i send the http request n get response in a standalone java
program?
 iii) Whether i have to add any xml or i have to modify the xml
(server.xml,web.xml) files for solr server configuration?


Best,
Nithya.V.
-- 
View this message in context:
http://www.nabble.com/Solr-Server-Configuration-tf4033748.html#a11458997
Sent from the Solr - User mailing list archive at Nabble.com.



RE: Solr Server Configuration

2007-07-06 Thread Kijiji Xu, Ping
i) In lucene we add document  by using java. But here they given in xml
format and posting them using  POST.jar. How can i add document in java?
In java ,there have a class named org.apache.solr.util.SimplePostTool ,you can 
look at the source code of it,and you'll know how it worked for posting xml 
data to solr

ii) How can i send the http request n get response in a standalone java
program?
In my opinion, you can use the java HttpURLConnection class to request and get 
response from the solr server

iii) Whether i have to add any xml or i have to modify the xml
(server.xml,web.xml) files for solr server configuration?
NO, but there have two type of configuration for solr .
First of all, the solr configuration file locate in the solr/conf,there are 
solrconfig.xml and schema.xml ,you would change them for your application .
Second, you have to deploy solr application itself to Tomcat, and you would put 
a configuration file like this in the tomcat ,the path is  
/home/tomcat/conf/Catalina/localhost/:
Context docBase=/home/tomcat/webapps/solr.war debug=0 crossContext=true 
   Environment name=solr/home type=java.lang.String 
value=/home/tomcat/solr override=true /
/Context
 
That's all,if you have any question,feel free to ask me:)
-Original Message-
From: nithyavembu [mailto:[EMAIL PROTECTED] 
Sent: 2007年7月6日 13:27
To: solr-user@lucene.apache.org
Subject: Solr Server Configuration


Hi All,

  I am new to Solr. But i am familiar with lucene.
 I am stuggling in solr server configuation.I am using Tomcat 5. I have
worked with the example   standalone given with solr while i download.
 But my doubt is 
  i) In lucene we add document  by using java. But here they given in xml
format and posting them using  POST.jar. How can i add document in java?
 ii) How can i send the http request n get response in a standalone java
program?
 iii) Whether i have to add any xml or i have to modify the xml
(server.xml,web.xml) files for solr server configuration?


Best,
Nithya.V.
-- 
View this message in context: 
http://www.nabble.com/Solr-Server-Configuration-tf4033748.html#a11458997
Sent from the Solr - User mailing list archive at Nabble.com.


Re: Solr Server Configuration

2007-07-06 Thread Tristan Vittorio

If you are used to working with Lucene and want to interface Solr directly
from within a java application, you can take a look at DirectSolrConnection
from EmbeddedSolr, check the wiki page
http://wiki.apache.org/solr/EmbeddedSolr for more info.

cheers,
Tristan


On 7/6/07, Kijiji Xu, Ping [EMAIL PROTECTED] wrote:


i) In lucene we add document  by using java. But here they given in xml
format and posting them using  POST.jar. How can i add document in java?
In java ,there have a class named org.apache.solr.util.SimplePostTool ,you
can look at the source code of it,and you'll know how it worked for posting
xml data to solr

ii) How can i send the http request n get response in a standalone java
program?
In my opinion, you can use the java HttpURLConnection class to request and
get response from the solr server

iii) Whether i have to add any xml or i have to modify the xml
(server.xml,web.xml) files for solr server configuration?
NO, but there have two type of configuration for solr .
First of all, the solr configuration file locate in the solr/conf,there
are solrconfig.xml and schema.xml ,you would change them for your
application .
Second, you have to deploy solr application itself to Tomcat, and you
would put a configuration file like this in the tomcat ,the path
is  /home/tomcat/conf/Catalina/localhost/:
Context docBase=/home/tomcat/webapps/solr.war debug=0
crossContext=true 
   Environment name=solr/home type=java.lang.String
value=/home/tomcat/solr override=true /
/Context

That's all,if you have any question,feel free to ask me:)
-Original Message-
From: nithyavembu [mailto:[EMAIL PROTECTED]
Sent: 2007年7月6日 13:27
To: solr-user@lucene.apache.org
Subject: Solr Server Configuration


Hi All,

  I am new to Solr. But i am familiar with lucene.
I am stuggling in solr server configuation.I am using Tomcat 5. I have
worked with the example   standalone given with solr while i download.
But my doubt is
  i) In lucene we add document  by using java. But here they given in xml
format and posting them using  POST.jar. How can i add document in java?
ii) How can i send the http request n get response in a standalone java
program?
iii) Whether i have to add any xml or i have to modify the xml
(server.xml,web.xml) files for solr server configuration?


Best,
Nithya.V.
--
View this message in context:
http://www.nabble.com/Solr-Server-Configuration-tf4033748.html#a11458997
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Solr Server Configuration

2007-07-06 Thread Karen Loughran

I use solr with tomcat 5.5.23.  I have successfully used Darren Erik 
Vengroff's java client for adding and deleting found on this page.

http://wiki.apache.org/solr/SolJava

I also successfully use EmbeddedSolr for direct API usage (found at the end of 
this link)

Karen



On Friday 06 July 2007 06:26:52 nithyavembu wrote:
 Hi All,

   I am new to Solr. But i am familiar with lucene.
  I am stuggling in solr server configuation.I am using Tomcat 5. I have
 worked with the example   standalone given with solr while i download.
  But my doubt is
   i) In lucene we add document  by using java. But here they given in xml
 format and posting them using  POST.jar. How can i add document in java?
  ii) How can i send the http request n get response in a standalone java
 program?
  iii) Whether i have to add any xml or i have to modify the xml
 (server.xml,web.xml) files for solr server configuration?


 Best,
 Nithya.V.




Re: Solr Server Configuration

2007-07-06 Thread Yonik Seeley

On 7/6/07, Karen Loughran [EMAIL PROTECTED] wrote:

I use solr with tomcat 5.5.23.  I have successfully used Darren Erik
Vengroff's java client for adding and deleting found on this page.

http://wiki.apache.org/solr/SolJava

I also successfully use EmbeddedSolr for direct API usage (found at the end of
this link)


The solr java client has actually been committed in the latest
development version, but is still subject to change.

When possible, prefer an external (HTTP) interface over an embedded
one, as it will likely remain more stable over time.

-Yonik