Re: How to get SolrServer within my own servlet

2011-12-14 Thread Joey
Hi Chris, There won't be deadlock I think because there is only one place(from my own servlet) can trigger a index. Yes, I am trying to embed Solr application - I could separate my servlet to another app and talk to Sorl via HTTP, but there will be two pieces(Solr and my own app) of software I h

Re: How to get SolrServer within my own servlet

2011-12-14 Thread Chris Hostetter
: So what I want to do is to modify Solr a bit - add one servlet so I can : trigger a full index of a folder in the file system. ... : I guess there are two SolrServer instances(one is EmbeddedSolrServer, : created by myself and the other is come with Solr itself and they are : holding di

Re: How to get SolrServer

2011-12-14 Thread Tomás Fernández Löbbe
Hi Joey, if what you want is to customize Solr so that you do the indexing code on the server side, you could implement your own RequestHandler, then the only thing you need to do is to add it to the solrconfig.xml and you can call it through http GET method. On Tue, Dec 13, 2011 at 4:42 PM, Schmi

Re: How to get SolrServer within my own servlet

2011-12-13 Thread yunfei wu
Just curious, sounds like you try to deploy your servlet with Solr support, why don't you just deploy you app as separate Sevlet with the Solr war in the server, then let your servlet send requests to Solr? This will bring much benefit in maintaining your app with Solr support. Yunfei On Tuesday

Re: How to get SolrServer within my own servlet

2011-12-13 Thread Joey
Thank you guys for the reply. So what I want to do is to modify Solr a bit - add one servlet so I can trigger a full index of a folder in the file system. What I did: un-jar solr.war; Create a web app and copy the un-jar the solr files to this app; Create my servlet; R

Re: How to get SolrServer

2011-12-13 Thread Schmidt Jeff
Joey: I'm not sure what you mean by wapping solr to your own web application. There is a way to embed Solr into your application (same JVM), but I've never used that. If you're talking about your servlet running in one JVM and Solr in another, then use the SolrJ client library to interact wit

Re: How to get SolrServer within my own servlet

2011-12-13 Thread Mikhail Khludnev
The first drawback of SolrJ is using xml serialization for in-process communication. I guess you can start from SolrDispatchFilter source, and get something for your servlet from there. Regards On Tue, Dec 13, 2011 at 11:45 PM, Patrick Plaatje wrote: > Have à look here first and you're will prob

Re: How to get SolrServer within my own servlet

2011-12-13 Thread Patrick Plaatje
Hey Joey, You should first configure your deployed Solr instance by adding/changing the schema.xml and solrconfig.xml. After that you can use SolrJ to connect to that Solr instance and add documents to it. On the link i posted earlier, you'll find à couple of examples on how to do that. - Patr

Re: How to get SolrServer within my own servlet

2011-12-13 Thread Joey
Thanks Patrick for the reply. What I did was un-jar solr.war and created my own web application. Now I want to write my own servlet to index all files inside a folder. I suppose there is already solrserver instance initialized when my web app started. How can I access that solr server instan

Re: How to get SolrServer within my own servlet

2011-12-13 Thread Patrick Plaatje
Have à look here first and you're will probably be using SolrEmbeddedServer. http://wiki.apache.org/solr/Solrj Patrick Op 13 dec. 2011 om 20:38 heeft Joey het volgende geschreven: > Anybody could help? > > -- > View this message in context: > http://lucene.472066.n3.nabble.com/How-to-get-S

Re: How to get SolrServer within my own servlet

2011-12-13 Thread Joey
Anybody could help? -- View this message in context: http://lucene.472066.n3.nabble.com/How-to-get-SolrServer-within-my-own-servlet-tp3583304p3583368.html Sent from the Solr - User mailing list archive at Nabble.com.