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 Noora <no...@gmail.com> on 2015/01/01 08:18:36 UTC

Create core problem in tomcat

Hi
I'm using apache solr 4.7.2 ant apache tomcat ?
I can't create core with query in my solr while I cat do it with jetty with
the same config.
The first problem was "you can pass the system property
-Dsolr.allow.unsafe.resourceloading=true to your JVM" that I solve it in my
Catalina.sh
Now my error is :
Unable to create core: uut8 Caused by: Can't find resource 'stopwords.txt'
in classpath or conf

My query is :
http://10.1.221.210:8983/solr/admin/cores?action=CREATE&name=my_core&instanceDir=my_core&dataDir=data&configSet=myConfig

Can any one help me?

Re: Create core problem in tomcat

Posted by Mahmoud Almokadem <pr...@gmail.com>.
You may have a field types in your schema that using stopwords.txt file
like this:

<fieldType name="text_general" class="solr.TextField"
positionIncrementGap="100">

 <analyzer type="index">
        <tokenizer class="solr.StandardTokenizerFactory"/>
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.ArabicNormalizationFilterFactory"/>
        <filter class="solr.StopFilterFactory" ignoreCase="true" words="
*lang/stopwords_ar.txt*" />
        <filter class="solr.StopFilterFactory" ignoreCase="true" words="
*lang/stopwords_en.txt*" />
        <filter class="solr.StopFilterFactory" ignoreCase="true" words="
*stopwords.txt*" />
      </analyzer>

      <analyzer type="query">
        <tokenizer class="solr.StandardTokenizerFactory"/>
        <filter class="solr.LowerCaseFilterFactory"/>
        <filter class="solr.ArabicNormalizationFilterFactory"/>
        <filter class="solr.StopFilterFactory" ignoreCase="true" words="
*lang/stopwords_ar.txt*" />
        <filter class="solr.StopFilterFactory" ignoreCase="true" words="
*lang/stopwords_en.txt*" />
        <filter class="solr.StopFilterFactory" ignoreCase="true" words="
*stopwords.txt*" />
      </analyzer>

    </fieldType>

so, you must have files *stopwords_ar.txt* and* stopwords_en.txt* in
INSTANCE_DIR/conf/lang/ and *stopwords.txt* in INSTANCE_DIR/conf/

sincerly,
Mahmoud

On Thu, Jan 1, 2015 at 9:18 AM, Noora <no...@gmail.com> wrote:

> Hi
> I'm using apache solr 4.7.2 ant apache tomcat ?
> I can't create core with query in my solr while I cat do it with jetty with
> the same config.
> The first problem was "you can pass the system property
> -Dsolr.allow.unsafe.resourceloading=true to your JVM" that I solve it in my
> Catalina.sh
> Now my error is :
> Unable to create core: uut8 Caused by: Can't find resource 'stopwords.txt'
> in classpath or conf
>
> My query is :
>
> http://10.1.221.210:8983/solr/admin/cores?action=CREATE&name=my_core&instanceDir=my_core&dataDir=data&configSet=myConfig
>
> Can any one help me?
>