热门标签 | HotTags
当前位置:  开发笔记 > 编程语言 > 正文

Solr无法找到资源stopwords_en.txt-Solrcan'tfindresourcestopwords_en.txt

ImtryingtosetupSolr3.6.0withDjango-haystackBeta2.0.0.我正在尝试用Django-haystackBeta2.0.0来设置S

I'm trying to setup Solr 3.6.0 with Django-haystack Beta 2.0.0.

我正在尝试用Django-haystack Beta 2.0.0来设置Solr 3.6.0。

After running ./manage.py build_solr_schema and moving schema.xml to the conf directory, upon visiting http://localhost:8983/solr/admin, I receive an error exactly like the one produced in this thread.

跑后。/管理。py build_solr_schema和moving schema。xml到conf目录,访问http://localhost:8983/solr/admin时,我收到的错误与在此线程中生成的错误完全相同。

org.apache.solr.common.SolrException: No cores were created, please check the logs for errors

未创建内核,请检查日志中是否有错误

java.lang.RuntimeException: Can't find resource 'stopwords_en.txt' in classpath or 'solr/./conf/', cwd=/home/randall/startupsearch_live/apache-solr-3.6.0/example

. lang。运行时异常:无法找到资源的stopwords_en。txt'在类路径或'solr/。/ conf /”,慢性消耗病= / home /兰德尔/ startupsearch_live / apache-solr-3.6.0 /例子

At the bottom of the thread, a user mentions that schema.xml must be edited to match stopwords_en.txt to the /example/solr/conf/ directory, which I did both through a symbolic link and by editing all instances of stopwords.txt to /solr/conf/stopwords_en.txt in the generated schema.xml file. However, the same error persists, giving a slightly different output:

在线程的底部,用户会提到这个模式。必须编辑xml以匹配stopwords_en。txt到/example/solr/conf/目录,我通过符号链接和编辑所有stopwords实例来实现。txt / solr / conf / stopwords_en。生成模式中的txt。xml文件。但是,相同的错误仍然存在,输出略有不同:

java.lang.RuntimeException: Can't find resource '/solr/conf/stopwords_en.txt' in classpath or 'solr/./conf/', cwd=/home/randall/startupsearch_live/apache-solr-3.6.0/example

. lang。运行时异常:无法找到资源'/solr/conf/stopwords_en。txt'在类路径或'solr/。/ conf /”,慢性消耗病= / home /兰德尔/ startupsearch_live / apache-solr-3.6.0 /例子

What file must I edit to fix this problem?

我需要编辑什么文件来解决这个问题?

6 个解决方案

#1


7  

It can't find stopwords_en.txt file in the classpath. You should add stopwords_en.txt file into the solr/conf/ directory. You can find more information about stopwords here.

它找不到stopwords_en。类路径中的txt文件。你应该添加stopwords_en。txt文件到solr/conf/目录。你可以在这里找到更多关于停止的信息。

#2


6  

A better way is to find all occurrences of stopwords_en.txt in schema.xml and replace them with lang/stopwords_en.txt

更好的方法是查找所有stopwords_en的出现。三种模式。用lang/stopwords_en.txt替换它们

#3


2  

You have to put stopwords_en.txt in the path . Make a file name stopwords_en.txt and paste beside the schema.xml. I hope you know what stopword filter is used.....

你必须写上stopwords_en。路径中的txt。创建一个文件名stopwords_en。在schema.xml旁边粘贴txt。我希望你知道什么是秒针过滤器。

#4


1  

To combine all three of the above answers, you need the stopwords_en.txt as it begins testing for English language text

要组合上述三个答案,需要stopwords_en。txt作为它开始测试英语文本

From http://wiki.apache.org/solr/LanguageAnalysis#Stopwords

从http://wiki.apache.org/solr/LanguageAnalysis Stopwords

Stopwords affect Solr in three ways: relevance, performance, and resource utilization.

停止字在三个方面影响Solr:相关性、性能和资源利用。

From a relevance perspective, these extremely high-frequency terms tend to throw off the scoring algorithm, and you won't get very good results if you leave them. At the same time, if you remove them, you can return bad results when the stopword is actually important.

从相关性的角度来看,这些极其高频的术语往往会打乱评分算法,如果你离开了它们,你就不会得到很好的结果。同时,如果您删除它们,您可以在停止符实际上很重要时返回糟糕的结果。

From a performance perspective, if you keep stopwords, some queries (especially phrase queries) can be very slow.

从性能的角度来看,如果保留stopwords,一些查询(特别是短语查询)可能会很慢。

From a resource utilization perspective, if you keep stopwords, the index is much larger than if you remove them.

从资源利用的角度来看,如果保留stopwords,那么索引会比删除它们大得多。

One tradeoff you can make if you have the disk space: You can use CommonGramsFilter/CommonGramsQueryFilter instead of StopFilter. This solves the relevance and performance problems, at the expense of even more resource utilization, because it will form bigrams of stopwords to their adjacent words.

如果您有磁盘空间,您可以做一个权衡:您可以使用CommonGramsFilter/CommonGramsQueryFilter而不是StopFilter。这就解决了相关性和性能问题,以牺牲更多的资源利用为代价,因为它会将停词的bigrams和它们相邻的词组合在一起。

What you need to do is copy the original version located in the /conf/lang folder of your solr directory into just the /conf directory

您需要做的是将您的solr目录中的/conf/lang文件夹中的原始版本复制到/conf目录中!

cp PATH/TO/solr/conf/lang/stopwords_en.txt PATH/TO/solr/conf

#5


1  

In Solr 5 I got the same error. I had used the Solr zookeeper cli shell to upload my configuration. I had copied the contents of an existing solr config from the server/solr/configsets/basic_configs, but I somehow missed the lang directory.

在solr5中,我得到了同样的错误。我使用Solr zookeeper cli shell上传我的配置。我已经从服务器/solr/configsets/basic_configs中复制了现有solr配置的内容,但是不知何故我错过了lang目录。

The conf/lang directory contains stopwords_en.txt.

conf/lang目录包含stopwords_en.txt。

#6


0  

I had the same issue and it turns out that when I was created my stopwords_en.txt file I accidently created stopwords_en.txt.txt file. Recreating it as the correct .txt file solved the problem

我也有同样的问题,当我创建stopwords_en时。我不小心创建了stopwords_en.txt文件。txt文件。将它重新创建为正确的.txt文件解决了这个问题


推荐阅读
  • 本文介绍了Java工具类库Hutool,该工具包封装了对文件、流、加密解密、转码、正则、线程、XML等JDK方法的封装,并提供了各种Util工具类。同时,还介绍了Hutool的组件,包括动态代理、布隆过滤、缓存、定时任务等功能。该工具包可以简化Java代码,提高开发效率。 ... [详细]
  • 本文讨论了Alink回归预测的不完善问题,指出目前主要针对Python做案例,对其他语言支持不足。同时介绍了pom.xml文件的基本结构和使用方法,以及Maven的相关知识。最后,对Alink回归预测的未来发展提出了期待。 ... [详细]
  • Excel数据处理中的七个查询匹配函数详解
    本文介绍了Excel数据处理中的七个查询匹配函数,以vlookup函数为例进行了详细讲解。通过示例和语法解释,说明了vlookup函数的用法和参数的含义,帮助读者更好地理解和运用查询匹配函数进行数据处理。 ... [详细]
  • HDFS2.x新特性
    一、集群间数据拷贝scp实现两个远程主机之间的文件复制scp-rhello.txtroothadoop103:useratguiguhello.txt推pushscp-rr ... [详细]
  • Android系统移植与调试之如何修改Android设备状态条上音量加减键在横竖屏切换的时候的显示于隐藏
    本文介绍了如何修改Android设备状态条上音量加减键在横竖屏切换时的显示与隐藏。通过修改系统文件system_bar.xml实现了该功能,并分享了解决思路和经验。 ... [详细]
  • flowable工作流 流程变量_信也科技工作流平台的技术实践
    1背景随着公司业务发展及内部业务流程诉求的增长,目前信息化系统不能够很好满足期望,主要体现如下:目前OA流程引擎无法满足企业特定业务流程需求,且移动端体 ... [详细]
  • Android开发实现的计时器功能示例
    本文分享了Android开发实现的计时器功能示例,包括效果图、布局和按钮的使用。通过使用Chronometer控件,可以实现计时器功能。该示例适用于Android平台,供开发者参考。 ... [详细]
  • 本文介绍了使用cacti监控mssql 2005运行资源情况的操作步骤,包括安装必要的工具和驱动,测试mssql的连接,配置监控脚本等。通过php连接mssql来获取SQL 2005性能计算器的值,实现对mssql的监控。详细的操作步骤和代码请参考附件。 ... [详细]
  • 本文讨论了如何在codeigniter中识别来自angularjs的请求,并提供了两种方法的代码示例。作者尝试了$this->input->is_ajax_request()和自定义函数is_ajax(),但都没有成功。最后,作者展示了一个ajax请求的示例代码。 ... [详细]
  • 本文介绍了在处理不规则数据时如何使用Python自动提取文本中的时间日期,包括使用dateutil.parser模块统一日期字符串格式和使用datefinder模块提取日期。同时,还介绍了一段使用正则表达式的代码,可以支持中文日期和一些特殊的时间识别,例如'2012年12月12日'、'3小时前'、'在2012/12/13哈哈'等。 ... [详细]
  • 本文详细介绍了Python中正则表达式和re模块的使用方法。首先解释了转义符的作用,以及如何在字符串中包含特殊字符。然后介绍了re模块的功能和常用方法。通过学习本文,读者可以掌握正则表达式的基本概念和使用技巧,进一步提高Python编程能力。 ... [详细]
  • 本文整理了315道Python基础题目及答案,帮助读者检验学习成果。文章介绍了学习Python的途径、Python与其他编程语言的对比、解释型和编译型编程语言的简述、Python解释器的种类和特点、位和字节的关系、以及至少5个PEP8规范。对于想要检验自己学习成果的读者,这些题目将是一个不错的选择。请注意,答案在视频中,本文不提供答案。 ... [详细]
  • python3 nmap函数简介及使用方法
    本文介绍了python3 nmap函数的简介及使用方法,python-nmap是一个使用nmap进行端口扫描的python库,它可以生成nmap扫描报告,并帮助系统管理员进行自动化扫描任务和生成报告。同时,它也支持nmap脚本输出。文章详细介绍了python-nmap的几个py文件的功能和用途,包括__init__.py、nmap.py和test.py。__init__.py主要导入基本信息,nmap.py用于调用nmap的功能进行扫描,test.py用于测试是否可以利用nmap的扫描功能。 ... [详细]
  • 带添加按钮的GridView,item的删除事件
    先上图片效果;gridView无数据时显示添加按钮,有数据时,第一格显示添加按钮,后面显示数据:布局文件:addr_manage.xml<?xmlve ... [详细]
  • 本文讨论了在shiro java配置中加入Shiro listener后启动失败的问题。作者引入了一系列jar包,并在web.xml中配置了相关内容,但启动后却无法正常运行。文章提供了具体引入的jar包和web.xml的配置内容,并指出可能的错误原因。该问题可能与jar包版本不兼容、web.xml配置错误等有关。 ... [详细]
author-avatar
mobiledu2502862177
这个家伙很懒,什么也没留下!
PHP1.CN | 中国最专业的PHP中文社区 | DevBox开发工具箱 | json解析格式化 |PHP资讯 | PHP教程 | 数据库技术 | 服务器技术 | 前端开发技术 | PHP框架 | 开发工具 | 在线工具
Copyright © 1998 - 2020 PHP1.CN. All Rights Reserved | 京公网安备 11010802041100号 | 京ICP备19059560号-4 | PHP1.CN 第一PHP社区 版权所有