solr

How can copy 2 fields data to one field on Solr

倾然丶 夕夏残阳落幕 提交于 2020-01-12 07:29:08
问题 I have a document in solr with Lat and Lng fields. I need to add a new field called store containing data taken from both the Lat and Lng . I tried to use copyField field but I got the error: Field store is not multivalued and destination for multiple copyFields (2) Here is my configuration: <fields> <field name="lat" type="sdouble" indexed="true" stored="true" required="true" multiValued="false" /> <field name="lng" type="sdouble" indexed="true" stored="true" required="true" multiValued=

Where can I find performance benchmarks for Apache Lucene/Solr

余生颓废 提交于 2020-01-12 06:51:05
问题 Are there any links/resources towards performance benchmarks for Lucene/Solr on large datasets. Data sets above the range of 500GB ~ 5TB Thanks 回答1: Lucene committer Mike McCandless runs benchmarks on a regular basis to track down performances improvements and regressions. They are made with Wikipedia exports, which might be a little bit smaller than what you are looking for. But the performance doesn't depend so much on the input size, but rather on the number of documents and unique terms.

浅谈solr

≡放荡痞女 提交于 2020-01-12 06:19:15
Solr是一个独立的 企业级搜索 应用服务器,它对外提供类似于Web-service的API接口。用户可以通过http请求,向搜索引擎服务器提交一定格式的XML文件,生成索引;也可以通过Http Get操作提出查找请求,并得到XML格式的返回结果。 Solr是一个高性能,采用Java5开发, Solr 基于Lucene的全文搜索服务器。同时对其进行了扩展,提供了比Lucene更为丰富的查询语言,同时实现了可配置、可扩展并对查询性能进行了优化,并且提供了一个完善的功能管理界面,是一款非常优秀的 全文搜索引擎 。 下面我们来看看如何使用solr: 解压下载的压缩包,solr 不需要使用Tomcat启动,自带jetty,(我会在文末注上solr下载地址:无需去官网翻墙---慢的一比- -) window运行cmd 找到solr解压后的目录: bin/solr.cmd start,solr默认端口为8983 出现如右图所示,即可,表明solr已经启动完毕。 访问:http://localhost:8983/solr/ 出现如下页面: solr 配置 创建core,cmd命令为:solr.cmd create -c articles。其中articles是core的名称,可以自定义。 2. 重启solr:solr restart -p 8983 3. 查看core:打开solr控制台,点击

Sunspot / Solr / Rails: Model Associations are not updating in the Index

眉间皱痕 提交于 2020-01-12 05:43:26
问题 I have a Fieldnote model in my app, which has_many :activities attached to it through a table called :fieldnote_activities. I then define a searchable index this way: searchable :auto_index => true, :auto_remove => true do integer :id integer :user_id, :references => User integer :activity_ids, :multiple => true do activities.map(&:id) end text :observations end And then I have a Search model to store / update searches. The search model thus also has its own associations with activities. I

How does Solr's schema-less feature work? How to revert it to classic schema?

走远了吗. 提交于 2020-01-12 03:00:07
问题 Just found that Solr 5 doesn't require a schema file to be predefined and it generates the schema, based on the indexing being performed. I would like to know how does this work in the background? And whether it's a good practice or not? Is there any way to disable it? 回答1: The schemaless feature has been in Solr since version 4.3. But it might be more stable only now as a concurrency issue with it was fixed in 4.10. It is also called managed schema. When you configure Solr to use managed

How does Solr's schema-less feature work? How to revert it to classic schema?

六眼飞鱼酱① 提交于 2020-01-12 02:59:53
问题 Just found that Solr 5 doesn't require a schema file to be predefined and it generates the schema, based on the indexing being performed. I would like to know how does this work in the background? And whether it's a good practice or not? Is there any way to disable it? 回答1: The schemaless feature has been in Solr since version 4.3. But it might be more stable only now as a concurrency issue with it was fixed in 4.10. It is also called managed schema. When you configure Solr to use managed

Node.getTextContent() is undefined in Node

允我心安 提交于 2020-01-12 01:36:50
问题 In my project I am facing a problem stating The method getTextContent() is undefined for the type Node I am currently using jdk 1.5, can anybody tell me what this is about. 回答1: If you are getting this problem in Eclipse , my tested solution would be: Java Build Path → Order and Export , select JRE System Library and move it to Top 回答2: Java Build Path -> Order and Export tab, selected the JRE. Clicked the "UP" button to move it to the upper. 回答3: As there are lot of class named Node in the

solr学习篇(三) solr7.4 连接MySQL数据库

徘徊边缘 提交于 2020-01-11 13:52:54
目录    导入相关jar包    配置连接信息    将数据库导入到solr中    验证是否成功     创建一个Core,创建Core的方法之前已经很详细的讲解过了,如果还是不清楚请参考 solr7.4 安装配置篇 ; 1.导入相关jar包   1.1、下载 mysql 驱动包:mysql-connector-java-x.x.x.jar,绝大部分jar包在 maven仓库 都能找到,mysql驱动包在maven仓库中的下载链接是: MySQLjar包 ;   1.2、将 mysql 驱动包导入 solr :将下载下来的 mysql-connector-java-x.x.x.jar 拷贝到 solr\server\solr-webapp\webapp\WEB-INF\lib 下;   1.3、将solr{home}\dist目录下的:solr-dataimporthandler-7.4.0.jar和solr-dataimporthandler-extras-7.4.0.jar这两个jar包拷贝到 solr\server\solr-webapp\webapp\WEB-INF\lib下   2.配置连接信息     2.1、把solr{home}\example\example-DIH\solr\db下的文件复制到你创建的core里面   2.2、打开conf目录在db-data

How to sort SOLR spellCheck suggestions NOT by frequency?

萝らか妹 提交于 2020-01-11 13:09:46
问题 If you search for ahve on my staging index you get the as the first spellcheck correction because the appears more than have in the index (I have 500 documents indexed). If you search for ahve on my local index you get have as the first spellcheck correction because have appears more than any other word in the index. (I have 21 documents indexed). This is a simple dumb returned from my staging index <lst name="ahve"> <int name="numFound">5</int> <int name="startOffset">0</int> <int name=

When should we apply Hard commit and Soft commit in SOLR?

不问归期 提交于 2020-01-11 09:33:05
问题 I want to know when we should do hard commit and when we should do soft commit in SOLR. Thanks 回答1: In the same vein as the question you just asked but deleted, this is explained thoroughly on the internet: Soft commit when you want something to be made available as soon as possible without waiting for it to be written to disk. Hard commit when you want make sure its being persisted to disk. From the link above: Soft commits Soft commits are about visibility, hard commits are about durability