索尔不工作

时间:2013-12-21 11:36:39

标签: ruby-on-rails solr sunspot

我尝试手动运行solr的作品

但是当我尝试通过sunspot rails gem运行它时

它给出了这个错误

Solr无法进行全新安装

HTTP ERROR 500

访问/ solr /时遇到问题。原因是:

Severe errors in solr configuration.

检查日志文件以获取有关可能出错的更多详细信息。

如果您希望solr在配置错误后继续,请更改:

在solr.xml中


java.lang.RuntimeException: Can't find resource 'lang/stopwords_en.txt' in classpath or '/home/mirraw-dev/projects/mirraw-dev/solr/./conf/', cwd=/home/mirraw-dev/.rvm/gems/ruby-1.9.3-p484@mirraw-dev/gems/sunspot_solr-1.3.3/solr
    at org.apache.solr.core.SolrResourceLoader.openResource(SolrResourceLoader.java:273)
    at org.apache.solr.core.SolrResourceLoader.getLines(SolrResourceLoader.java:318)
    at org.apache.solr.core.SolrResourceLoader.getLines(SolrResourceLoader.java:292)
    at org.apache.solr.analysis.BaseTokenStreamFactory.getWordSet(BaseTokenStreamFactory.java:132)
    at org.apache.solr.analysis.StopFilterFactory.inform(StopFilterFactory.java:61)
    at org.apache.solr.core.SolrResourceLoader.inform(SolrResourceLoader.java:551)
    at org.apache.solr.schema.IndexSchema.<init>(IndexSchema.java:124)
    at org.apache.solr.core.CoreContainer.create(CoreContainer.java:478)
    at org.apache.solr.core.CoreContainer.load(CoreContainer.java:332)
    at org.apache.solr.core.CoreContainer$Initializer.initialize(CoreContainer.java:165)
    at org.apache.solr.servlet.SolrDispatchFilter.init(SolrDispatchFilter.java:96)
    at org.mortbay.jetty.servlet.FilterHolder.doStart(FilterHolder.java:97)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.jetty.servlet.ServletHandler.initialize(ServletHandler.java:713)
    at org.mortbay.jetty.servlet.Context.startContext(Context.java:140)
    at org.mortbay.jetty.webapp.WebAppContext.startContext(WebAppContext.java:1282)
    at org.mortbay.jetty.handler.ContextHandler.doStart(ContextHandler.java:518)
    at org.mortbay.jetty.webapp.WebAppContext.doStart(WebAppContext.java:499)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
    at org.mortbay.jetty.handler.ContextHandlerCollection.doStart(ContextHandlerCollection.java:156)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.jetty.handler.HandlerCollection.doStart(HandlerCollection.java:152)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.jetty.handler.HandlerWrapper.doStart(HandlerWrapper.java:130)
    at org.mortbay.jetty.Server.doStart(Server.java:224)
    at org.mortbay.component.AbstractLifeCycle.start(AbstractLifeCycle.java:50)
    at org.mortbay.xml.XmlConfiguration.main(XmlConfiguration.java:985)
    at sun.reflect.NativeMethodAccessorImpl.invoke0(Native Method)
    at sun.reflect.NativeMethodAccessorImpl.invoke(NativeMethodAccessorImpl.java:57)
    at sun.reflect.DelegatingMethodAccessorImpl.invoke(DelegatingMethodAccessorImpl.java:43)
    at java.lang.reflect.Method.invoke(Method.java:601)
    at org.mortbay.start.Main.invokeMain(Main.java:194)
    at org.mortbay.start.Main.start(Main.java:534)
    at org.mortbay.start.Main.start(Main.java:441)
    at org.mortbay.start.Main.main(Main.java:119)

Powered by Jetty://

停用词的内容

# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

1 个答案:

答案 0 :(得分:0)

你需要一个lang / stopwords_en.txt文件。它是solr代码库的一部分。并且您的错误具有应该位于的路径。在我的本地,如果看到如下所示:

# Licensed to the Apache Software Foundation (ASF) under one or more
# contributor license agreements.  See the NOTICE file distributed with
# this work for additional information regarding copyright ownership.
# The ASF licenses this file to You under the Apache License, Version 2.0
# (the "License"); you may not use this file except in compliance with
# the License.  You may obtain a copy of the License at
#
#     http://www.apache.org/licenses/LICENSE-2.0
#
# Unless required by applicable law or agreed to in writing, software
# distributed under the License is distributed on an "AS IS" BASIS,
# WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
# See the License for the specific language governing permissions and
# limitations under the License.

# a couple of test stopwords to test that the words are really being
# configured from this file:
stopworda
stopwordb

# Standard english stop words taken from Lucene's StopAnalyzer
a
an
and
are
as
at
be
but
by
for
if
in
into
is
it
no
not
of
on
or
such
that
the
their
then
there
these
they
this
to
was
will
with