You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Mark Schoy <he...@gmx.de> on 2011/07/11 16:46:09 UTC
How to create a solr core if no solr cores were created before?
Hi,
I tried to create a solr core but I always get "No such solr core:"-Exception.
-----
File home = new File( pathToSolrHome );
File f = new File( home, "solr.xml" );
CoreContainer coreContainer = new CoreContainer();
coreContainer.load( pathToSolrHome, f );
EmbeddedSolrServer server = new EmbeddedSolrServer(coreContainer, "");
CoreAdminRequest.createCore("coreName", "coreDir", server);
-----
I think the problem is the "" in new EmbeddedSolrServer(coreContainer, "");
Thanks.
Re: How to create a solr core if no solr cores were created
before?
Posted by Chris Hostetter <ho...@fucit.org>.
you need to give us some more info in order to give you meaningful
assistance..
1) what does your solr.xml look like?
2) what files/directories are in pathToSolrHome?
3) what is the full stack trace?
: Hi,
:
: I tried to create a solr core but I always get "No such solr core:"-Exception.
:
: -----
: File home = new File( pathToSolrHome );
: File f = new File( home, "solr.xml" );
:
: CoreContainer coreContainer = new CoreContainer();
: coreContainer.load( pathToSolrHome, f );
:
: EmbeddedSolrServer server = new EmbeddedSolrServer(coreContainer, "");
: CoreAdminRequest.createCore("coreName", "coreDir", server);
: -----
:
: I think the problem is the "" in new EmbeddedSolrServer(coreContainer, "");
:
: Thanks.
:
-Hoss
Re: How to create a solr core if no solr cores were created before?
Posted by Gabriele Kahlout <ga...@mysimpatico.com>.
if you need the core just for testing then use Solr test framework as in the
link.
On Tue, Jul 12, 2011 at 10:29 AM, Mark Schoy <he...@gmx.de> wrote:
> Thanks for your answer, but your answer is a little bit useless for
> me. Could you please add more information in addition to this link?
>
> Do I have to create a "root" core to create other cores?
> How can I create a "root" core? Manually adding in the solr.xml config?
>
Should all be answered here See http://wiki.apache.org/solr/SolrTomcat
for multiple cores use solr.xml:
<?xml version="1.0" encoding="UTF-8"?>
<solr persistent="true" sharedLib="lib">
<cores adminPath="/admin/cores" defaultCoreName="live" shareSchema="true">
<core name="live" instanceDir="." dataDir="live" />
<core name="test" instanceDir="." dataDir="test" />
</cores>
</solr>
>
> 2011/7/11 Gabriele Kahlout <ga...@mysimpatico.com>:
> > have a look here [1].
> >
> > [1]
> >
> https://issues.apache.org/jira/browse/SOLR-2645?focusedCommentId=13062748&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13062748
> >
> > On Mon, Jul 11, 2011 at 4:46 PM, Mark Schoy <he...@gmx.de> wrote:
> >
> >> Hi,
> >>
> >> I tried to create a solr core but I always get "No such solr
> >> core:"-Exception.
> >>
> >> -----
> >> File home = new File( pathToSolrHome );
> >> File f = new File( home, "solr.xml" );
> >>
> >> CoreContainer coreContainer = new CoreContainer();
> >> coreContainer.load( pathToSolrHome, f );
> >>
> >> EmbeddedSolrServer server = new EmbeddedSolrServer(coreContainer, "");
> >> CoreAdminRequest.createCore("coreName", "coreDir", server);
> >> -----
> >>
> >> I think the problem is the "" in new EmbeddedSolrServer(coreContainer,
> "");
> >>
> >> Thanks.
> >>
> >
> >
> >
> > --
> > Regards,
> > K. Gabriele
> >
> > --- unchanged since 20/9/10 ---
> > P.S. If the subject contains "[LON]" or the addressee acknowledges the
> > receipt within 48 hours then I don't resend the email.
> > subject(this) ∈ L(LON*) ∨ ∃x. (x ∈ MyInbox ∧ Acknowledges(x, this) ∧
> time(x)
> > < Now + 48h) ⇒ ¬resend(I, this).
> >
> > If an email is sent by a sender that is not a trusted contact or the
> email
> > does not contain a valid code then the email is not received. A valid
> code
> > starts with a hyphen and ends with "X".
> > ∀x. x ∈ MyInbox ⇒ from(x) ∈ MySafeSenderList ∨ (∃y. y ∈ subject(x) ∧ y ∈
> > L(-[a-z]+[0-9]X)).
> >
>
--
Regards,
K. Gabriele
--- unchanged since 20/9/10 ---
P.S. If the subject contains "[LON]" or the addressee acknowledges the
receipt within 48 hours then I don't resend the email.
subject(this) ∈ L(LON*) ∨ ∃x. (x ∈ MyInbox ∧ Acknowledges(x, this) ∧ time(x)
< Now + 48h) ⇒ ¬resend(I, this).
If an email is sent by a sender that is not a trusted contact or the email
does not contain a valid code then the email is not received. A valid code
starts with a hyphen and ends with "X".
∀x. x ∈ MyInbox ⇒ from(x) ∈ MySafeSenderList ∨ (∃y. y ∈ subject(x) ∧ y ∈
L(-[a-z]+[0-9]X)).
Re: How to create a solr core if no solr cores were created before?
Posted by Mark Schoy <he...@gmx.de>.
Thanks for your answer, but your answer is a little bit useless for
me. Could you please add more information in addition to this link?
Do I have to create a "root" core to create other cores?
How can I create a "root" core? Manually adding in the solr.xml config?
2011/7/11 Gabriele Kahlout <ga...@mysimpatico.com>:
> have a look here [1].
>
> [1]
> https://issues.apache.org/jira/browse/SOLR-2645?focusedCommentId=13062748&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13062748
>
> On Mon, Jul 11, 2011 at 4:46 PM, Mark Schoy <he...@gmx.de> wrote:
>
>> Hi,
>>
>> I tried to create a solr core but I always get "No such solr
>> core:"-Exception.
>>
>> -----
>> File home = new File( pathToSolrHome );
>> File f = new File( home, "solr.xml" );
>>
>> CoreContainer coreContainer = new CoreContainer();
>> coreContainer.load( pathToSolrHome, f );
>>
>> EmbeddedSolrServer server = new EmbeddedSolrServer(coreContainer, "");
>> CoreAdminRequest.createCore("coreName", "coreDir", server);
>> -----
>>
>> I think the problem is the "" in new EmbeddedSolrServer(coreContainer, "");
>>
>> Thanks.
>>
>
>
>
> --
> Regards,
> K. Gabriele
>
> --- unchanged since 20/9/10 ---
> P.S. If the subject contains "[LON]" or the addressee acknowledges the
> receipt within 48 hours then I don't resend the email.
> subject(this) ∈ L(LON*) ∨ ∃x. (x ∈ MyInbox ∧ Acknowledges(x, this) ∧ time(x)
> < Now + 48h) ⇒ ¬resend(I, this).
>
> If an email is sent by a sender that is not a trusted contact or the email
> does not contain a valid code then the email is not received. A valid code
> starts with a hyphen and ends with "X".
> ∀x. x ∈ MyInbox ⇒ from(x) ∈ MySafeSenderList ∨ (∃y. y ∈ subject(x) ∧ y ∈
> L(-[a-z]+[0-9]X)).
>
Re: How to create a solr core if no solr cores were created before?
Posted by Gabriele Kahlout <ga...@mysimpatico.com>.
have a look here [1].
[1]
https://issues.apache.org/jira/browse/SOLR-2645?focusedCommentId=13062748&page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel#comment-13062748
On Mon, Jul 11, 2011 at 4:46 PM, Mark Schoy <he...@gmx.de> wrote:
> Hi,
>
> I tried to create a solr core but I always get "No such solr
> core:"-Exception.
>
> -----
> File home = new File( pathToSolrHome );
> File f = new File( home, "solr.xml" );
>
> CoreContainer coreContainer = new CoreContainer();
> coreContainer.load( pathToSolrHome, f );
>
> EmbeddedSolrServer server = new EmbeddedSolrServer(coreContainer, "");
> CoreAdminRequest.createCore("coreName", "coreDir", server);
> -----
>
> I think the problem is the "" in new EmbeddedSolrServer(coreContainer, "");
>
> Thanks.
>
--
Regards,
K. Gabriele
--- unchanged since 20/9/10 ---
P.S. If the subject contains "[LON]" or the addressee acknowledges the
receipt within 48 hours then I don't resend the email.
subject(this) ∈ L(LON*) ∨ ∃x. (x ∈ MyInbox ∧ Acknowledges(x, this) ∧ time(x)
< Now + 48h) ⇒ ¬resend(I, this).
If an email is sent by a sender that is not a trusted contact or the email
does not contain a valid code then the email is not received. A valid code
starts with a hyphen and ends with "X".
∀x. x ∈ MyInbox ⇒ from(x) ∈ MySafeSenderList ∨ (∃y. y ∈ subject(x) ∧ y ∈
L(-[a-z]+[0-9]X)).