Re: SolrJ/EmbeddedSolrServer

2010-06-27 Thread Ken Krugler


On May 22, 2010, at 11:25am, Ryan McKinley wrote:


accidentally hit send...

Eache core can have the dataDir set explicitly.

 core name=core0 instanceDir=core0
   property name=dataDir value=/data/core0 /
 /core
 core name=core1 instanceDir=core1
   property name=dataDir value=/data/core1 /
 /core

If you want to do this with solrj, you would need to manipulate the
CoreDescriptor objects.


I'm hoping somebody can clarify what's up with the CoreDescriptor  
class, since there's not much documentation.


As far as I can tell, when you create a new SolrCore, it saves off the  
CoreDescriptor you pass in, and does nothing with it.


The constructor for SolrCore also takes a datadir param, so I don't  
see how the CoreDescriptor's dataDir gets used during construction.


And changing the CoreDescriptor's dataDir has no effect, since it's  
essentially a POJO.


So how would one go about changing the dataDir for a core, in a multi- 
core setup?


Thanks,

-- Ken

On Sat, May 22, 2010 at 2:24 PM, Ryan McKinley ryan...@gmail.com  
wrote:

Check:
http://wiki.apache.org/solr/CoreAdmin

Unless I'm missing something, I think you should be able to sort  
what you need



On Fri, May 21, 2010 at 7:55 PM, Ken Krugler
kkrugler_li...@transpac.com wrote:
I've got a situation where my data directory (a) needs to live  
elsewhere
besides inside of Solr home, (b) moves to a different location  
when updating
indexes, and (c) setting up a symlink from solr_home/data isn't  
a great

option.

So what's the best approach to making this work with SolrJ? The  
low-level

solution seems to be

- create my own SolrCore instance, where I specify the data  
directory

- use that to update the CoreContainer
- create a new EmbeddedSolrServer

But recreating the EmbeddedSolrServer with each index update feels  
wrong,
and I'd like to avoid mucking around with low-level SolrCore  
instantiation.


Any other approaches?

Thanks,

-- Ken


Ken Krugler
+1 530-210-6378
http://bixolabs.com
e l a s t i c   w e b   m i n i n g










Ken Krugler
+1 530-210-6378
http://bixolabs.com
e l a s t i c   w e b   m i n i n g






Re: SolrJ/EmbeddedSolrServer

2010-06-27 Thread Ken Krugler


On May 22, 2010, at 11:24am, Ryan McKinley wrote:


Check:
http://wiki.apache.org/solr/CoreAdmin

Unless I'm missing something, I think you should be able to sort  
what you need


If I'm using SolrJ, is there a programmatic way to force a reload of a  
core?


This, of course, assumes that I'm able to programmatically change the  
location of the dataDir, which is another issue.


Thanks,

-- Ken


On Fri, May 21, 2010 at 7:55 PM, Ken Krugler
kkrugler_li...@transpac.com wrote:
I've got a situation where my data directory (a) needs to live  
elsewhere
besides inside of Solr home, (b) moves to a different location when  
updating
indexes, and (c) setting up a symlink from solr_home/data isn't a  
great

option.

So what's the best approach to making this work with SolrJ? The low- 
level

solution seems to be

- create my own SolrCore instance, where I specify the data directory
- use that to update the CoreContainer
- create a new EmbeddedSolrServer

But recreating the EmbeddedSolrServer with each index update feels  
wrong,
and I'd like to avoid mucking around with low-level SolrCore  
instantiation.


Any other approaches?

Thanks,

-- Ken


Ken Krugler
+1 530-210-6378
http://bixolabs.com
e l a s t i c   w e b   m i n i n g








Ken Krugler
+1 530-210-6378
http://bixolabs.com
e l a s t i c   w e b   m i n i n g






Re: SolrJ/EmbeddedSolrServer

2010-06-27 Thread Ken Krugler

Answering my own question...

I can use CoreContainer.reload(core name) to force a reload.

I assume that if I've got an EmbeddedSolrServer running at the time I  
do this reload, everything will happen correctly under the covers.


So now I just need to find out how to programmatically change settings  
for a core.


-- Ken

On May 22, 2010, at 11:24am, Ryan McKinley wrote:


Check:
http://wiki.apache.org/solr/CoreAdmin

Unless I'm missing something, I think you should be able to sort  
what you need


If I'm using SolrJ, is there a programmatic way to force a reload of a  
core?


This, of course, assumes that I'm able to programmatically change the  
location of the dataDir, which is another issue.


Thanks,

-- Ken


On Fri, May 21, 2010 at 7:55 PM, Ken Krugler
kkrugler_li...@transpac.com wrote:
I've got a situation where my data directory (a) needs to live  
elsewhere
besides inside of Solr home, (b) moves to a different location when  
updating
indexes, and (c) setting up a symlink from solr_home/data isn't a  
great

option.

So what's the best approach to making this work with SolrJ? The low- 
level

solution seems to be

- create my own SolrCore instance, where I specify the data directory
- use that to update the CoreContainer
- create a new EmbeddedSolrServer

But recreating the EmbeddedSolrServer with each index update feels  
wrong,
and I'd like to avoid mucking around with low-level SolrCore  
instantiation.


Any other approaches?

Thanks,

-- Ken


Ken Krugler
+1 530-210-6378
http://bixolabs.com
e l a s t i c   w e b   m i n i n g








Ken Krugler
+1 530-210-6378
http://bixolabs.com
e l a s t i c   w e b   m i n i n g






Re: SolrJ/EmbeddedSolrServer

2010-06-27 Thread Ken Krugler

Sort of answering my own question here too...

It seems like I need to get the current core, and use that to  
instantiate a new SolrCore with the same exact config, other than the  
dataDir.


The documentation for SolrCore()'s constructor says:

If a core with the same name already exists, it will be stopped and  
replaced by this one


But it's unclear to me whether this will do a graceful swap (like what  
I want) or a hard shutdown of the old core.


Thanks,

-- Ken

On May 22, 2010, at 11:25am, Ryan McKinley wrote:


accidentally hit send...

Eache core can have the dataDir set explicitly.

core name=core0 instanceDir=core0
  property name=dataDir value=/data/core0 /
/core
core name=core1 instanceDir=core1
  property name=dataDir value=/data/core1 /
/core

If you want to do this with solrj, you would need to manipulate the
CoreDescriptor objects.


I'm hoping somebody can clarify what's up with the CoreDescriptor  
class, since there's not much documentation.


As far as I can tell, when you create a new SolrCore, it saves off the  
CoreDescriptor you pass in, and does nothing with it.


The constructor for SolrCore also takes a datadir param, so I don't  
see how the CoreDescriptor's dataDir gets used during construction.


And changing the CoreDescriptor's dataDir has no effect, since it's  
essentially a POJO.


So how would one go about changing the dataDir for a core, in a multi- 
core setup?


Thanks,

-- Ken

On Sat, May 22, 2010 at 2:24 PM, Ryan McKinley ryan...@gmail.com  
wrote:

Check:
http://wiki.apache.org/solr/CoreAdmin

Unless I'm missing something, I think you should be able to sort  
what you need



On Fri, May 21, 2010 at 7:55 PM, Ken Krugler
kkrugler_li...@transpac.com wrote:
I've got a situation where my data directory (a) needs to live  
elsewhere
besides inside of Solr home, (b) moves to a different location  
when updating
indexes, and (c) setting up a symlink from solr_home/data isn't  
a great

option.

So what's the best approach to making this work with SolrJ? The  
low-level

solution seems to be

- create my own SolrCore instance, where I specify the data  
directory

- use that to update the CoreContainer
- create a new EmbeddedSolrServer

But recreating the EmbeddedSolrServer with each index update feels  
wrong,
and I'd like to avoid mucking around with low-level SolrCore  
instantiation.


Any other approaches?

Thanks,

-- Ken


Ken Krugler
+1 530-210-6378
http://bixolabs.com
e l a s t i c   w e b   m i n i n g










Ken Krugler
+1 530-210-6378
http://bixolabs.com
e l a s t i c   w e b   m i n i n g






Re: SolrJ/EmbeddedSolrServer

2010-05-22 Thread Ryan McKinley
Check:
http://wiki.apache.org/solr/CoreAdmin

Unless I'm missing something, I think you should be able to sort what you need


On Fri, May 21, 2010 at 7:55 PM, Ken Krugler
kkrugler_li...@transpac.com wrote:
 I've got a situation where my data directory (a) needs to live elsewhere
 besides inside of Solr home, (b) moves to a different location when updating
 indexes, and (c) setting up a symlink from solr_home/data isn't a great
 option.

 So what's the best approach to making this work with SolrJ? The low-level
 solution seems to be

 - create my own SolrCore instance, where I specify the data directory
 - use that to update the CoreContainer
 - create a new EmbeddedSolrServer

 But recreating the EmbeddedSolrServer with each index update feels wrong,
 and I'd like to avoid mucking around with low-level SolrCore instantiation.

 Any other approaches?

 Thanks,

 -- Ken

 
 Ken Krugler
 +1 530-210-6378
 http://bixolabs.com
 e l a s t i c   w e b   m i n i n g







SolrJ/EmbeddedSolrServer

2010-05-21 Thread Ken Krugler
I've got a situation where my data directory (a) needs to live  
elsewhere besides inside of Solr home, (b) moves to a different  
location when updating indexes, and (c) setting up a symlink from  
solr_home/data isn't a great option.


So what's the best approach to making this work with SolrJ? The low- 
level solution seems to be


- create my own SolrCore instance, where I specify the data directory
- use that to update the CoreContainer
- create a new EmbeddedSolrServer

But recreating the EmbeddedSolrServer with each index update feels  
wrong, and I'd like to avoid mucking around with low-level SolrCore  
instantiation.


Any other approaches?

Thanks,

-- Ken


Ken Krugler
+1 530-210-6378
http://bixolabs.com
e l a s t i c   w e b   m i n i n g






Re: SolrJ : EmbeddedSolrServer and database data indexing

2009-03-13 Thread Noble Paul നോബിള്‍ नोब्ळ्
nope ..
But you can still use SolrJ to invoke DIH.
cretae a ModifiableSolrParams with the required request parameters
create a QueryRequest with the params and then set the path as /dataimport

and invoke the command with the CommonsHttpSolrServer#request()



On Fri, Mar 13, 2009 at 8:40 AM, Ashish P ashish.ping...@gmail.com wrote:

 Is there any api in SolrJ that calls the dataImportHandler to execute
 commands like full-import and delta-import.
 Please help..


 Ashish P wrote:

 Is it possible to index DB data directly to solr using EmbeddedSolrServer.
 I tried using data-Config File and Full-import commad, it works. So
 assuming using CommonsHttpServer will also work. But can I do it with
 EmbeddedSolrServer??

 Thanks in advance...
 Ashish


 --
 View this message in context: 
 http://www.nabble.com/SolrJ-%3A-EmbeddedSolrServer-and-database-data-indexing-tp22488697p22489420.html
 Sent from the Solr - User mailing list archive at Nabble.com.





-- 
--Noble Paul


SolrJ : EmbeddedSolrServer and database data indexing

2009-03-12 Thread Ashish P

Is it possible to index DB data directly to solr using EmbeddedSolrServer. I
tried using data-Config File and Full-import commad, it works. So assuming
using CommonsHttpServer will also work. But can I do it with
EmbeddedSolrServer??

Thanks in advance...
Ashish
-- 
View this message in context: 
http://www.nabble.com/SolrJ-%3A-EmbeddedSolrServer-and-database-data-indexing-tp22488697p22488697.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: SolrJ : EmbeddedSolrServer and database data indexing

2009-03-12 Thread Ashish P

Is there any api in SolrJ that calls the dataImportHandler to execute
commands like full-import and delta-import.
Please help..


Ashish P wrote:
 
 Is it possible to index DB data directly to solr using EmbeddedSolrServer.
 I tried using data-Config File and Full-import commad, it works. So
 assuming using CommonsHttpServer will also work. But can I do it with
 EmbeddedSolrServer??
 
 Thanks in advance...
 Ashish
 

-- 
View this message in context: 
http://www.nabble.com/SolrJ-%3A-EmbeddedSolrServer-and-database-data-indexing-tp22488697p22489420.html
Sent from the Solr - User mailing list archive at Nabble.com.