solr

【Solr】Solr-4.10.3安装教程

旧巷老猫 提交于 2020-12-08 01:26:55
前言 Solr是一个可伸缩性的、能够即时部署的、致力于信息检索的、可以处理海量信息的、以处理自然语言文本为中心的、检索结果按相关性排序的企业级搜索引擎。 Solr处理的业务需求有以下4个特点: (1)无结构化的自然语言文本为中心; (2)信息浏览占主导地位的用户需求; (3)以Document这种扁平化并且独立的结构组织信息(区别与关系型数据库); (4)要求组织成的数据模式灵活多变(不像数据库表一样要求统一的字段)。 环境 (1)jdk1.7 下载地址 (2)Linux环境 (3)tomcat 安装步骤 (1)把solr 的压缩包上传到Linux系统 solr-4.10.3下载地址 (2)解压( tar xzvf solr-4.10.3.tgz.tgz ) 我们这里不用bin启动,而是以tomcat作为容器启动。也就是dist包下的war,如下图。 主要使用的就是第一个和第三个,直接将war包部署到tomcat即可。 solrhome的包在example下,如下图。 (3)将solr-4.10.3.war部署到tomcat下。(它本身的bin目录下也有启动方式,使用的是jetty容器。) (4)将/solr-4.10.3/example/lib/ext目录下的所有jar包添加到tomcat解压出来的/tomcat/webapps/solr-4.10.3/WEB-INF/lib中。

In SOLR why would a field be non-stored and non-indexed?

帅比萌擦擦* 提交于 2020-11-28 09:10:30
问题 In Solr's documentation around atomic updates, they mention that a field should be non-indexed and non-stored. https://lucene.apache.org/solr/guide/7_6/updating-parts-of-documents.html#in-place-update-example An atomic update operation is performed using this approach only when the fields to be updated meet these three conditions: are non-indexed (indexed="false"), non-stored (stored="false"), single valued (multiValued="false") numeric docValues (docValues="true") fields; <field name="price"

In SOLR why would a field be non-stored and non-indexed?

巧了我就是萌 提交于 2020-11-28 09:09:05
问题 In Solr's documentation around atomic updates, they mention that a field should be non-indexed and non-stored. https://lucene.apache.org/solr/guide/7_6/updating-parts-of-documents.html#in-place-update-example An atomic update operation is performed using this approach only when the fields to be updated meet these three conditions: are non-indexed (indexed="false"), non-stored (stored="false"), single valued (multiValued="false") numeric docValues (docValues="true") fields; <field name="price"

In SOLR why would a field be non-stored and non-indexed?

三世轮回 提交于 2020-11-28 09:08:35
问题 In Solr's documentation around atomic updates, they mention that a field should be non-indexed and non-stored. https://lucene.apache.org/solr/guide/7_6/updating-parts-of-documents.html#in-place-update-example An atomic update operation is performed using this approach only when the fields to be updated meet these three conditions: are non-indexed (indexed="false"), non-stored (stored="false"), single valued (multiValued="false") numeric docValues (docValues="true") fields; <field name="price"

In SOLR why would a field be non-stored and non-indexed?

社会主义新天地 提交于 2020-11-28 09:08:14
问题 In Solr's documentation around atomic updates, they mention that a field should be non-indexed and non-stored. https://lucene.apache.org/solr/guide/7_6/updating-parts-of-documents.html#in-place-update-example An atomic update operation is performed using this approach only when the fields to be updated meet these three conditions: are non-indexed (indexed="false"), non-stored (stored="false"), single valued (multiValued="false") numeric docValues (docValues="true") fields; <field name="price"

In SOLR why would a field be non-stored and non-indexed?

佐手、 提交于 2020-11-28 09:07:57
问题 In Solr's documentation around atomic updates, they mention that a field should be non-indexed and non-stored. https://lucene.apache.org/solr/guide/7_6/updating-parts-of-documents.html#in-place-update-example An atomic update operation is performed using this approach only when the fields to be updated meet these three conditions: are non-indexed (indexed="false"), non-stored (stored="false"), single valued (multiValued="false") numeric docValues (docValues="true") fields; <field name="price"

java爬虫简介(一)->实现数据抓取->httpClient请求接口数据

守給你的承諾、 提交于 2020-11-25 04:28:45
背景 现如今,数据成为了越来越重要的网络资源,越来越有价值。无论是数据的分析还是前后端页面的数据交互,都离不开真实有效的数据。项目开发中数据甲方不可能实时提供,我们只能找到目标网站的数据进行抓取入库。 数据作用 决策支持 提升效益 数据的直接变现方式 数据资源交易 行业报告 广告平台 数据抓取的难点 1、目标网站有反爬取策略 2、目标网站模板会进行定时或实时变动 3、目标网站URL抓取失败 4、IP被封禁 解决办法: 购买代理IP库,随机获取IP进行数据抓取 部署多个应用分别进行抓取,降低单位节点访问的频率 设置每个页面抓取的时间间隔 5、用户登录限制 数据抓取的原理 实质上就是java程序模拟浏览器进行目标网站的访问,无论是请求目标服务器的接口还是请求目标网页内容,都是要在java程序中对数据进行解析。最简单的抓取方式有httpclient请求目标服务器接口,jsoup请求目标页面内容,把请求的数据进行解析然后入库。另外要做好爬取的实时监控,如果URL请求失败3次,就放弃该URL的抓取。 总体架构的设计 1、数据流向 1、确定数据爬取目标 2、数据采集 1、下载数据 2、解析数据 3、存取接入库(database,HDFS) 3、分析查询服务 2、模块划分 1、数据采集模块 2、数据分析模块 3、报表管理模块 4、系统管理与监控模块 3、模块解读 技术选型 数据采集层 JSoup

MongoDB 数据自动同步到 ElasticSearch

两盒软妹~` 提交于 2020-11-24 03:03:29
MongoDB 数据自动同步到 ElasticSearch Elasticsearch日志分析 我们产品中需要全文检索的功能,后端数据存储主要使用了 MySQL + MongoDB,而其中需要检索的内容是在 MongoDB 中的。 MongoDB 本身是自带文本索引功能的,但是,不支持中文。 术业有专攻 ,MongoDB 是数据存储应用,那么全文检索就使用专业的全文搜索引擎吧。 预选的几个选手有:Solr、ElasticSearch、Xapian、Sphinx、XunSearch。由于我们的数据量比较大,觉得现在单机已经有些力不从心了,MongoDB 也开始计划做分片,那么全文搜索如果自带分布式技能那就最合适不过了。经过一系列的考量,最后,我们就决定用 ElasticSearch 了。 现在后端程序是直接将数据写到 MongoDB 中,我不想修改程序代码,不想在增删改 MongoDB 中数据的同时去增删改 ElasticSearch 中的数据。希望 MongoDB 中数据发送变化时自动同步到 ElasticSearch 中,这样就可以最快地用上 ElasticSearch 了。 刚开始我找到的方案是利用 ElasticSearch 的 River 来同步数据,并在 GitHub 上到了 MongoDB River 插件:elasticsearch-river-mongodb。但是

海量数据存储方案

好久不见. 提交于 2020-11-23 21:43:11
参考原文: http://blog.csdn.net/xlgen157387/article/details/53230138 一、网站应用背景 开发一个网站的应用程序,当用户规模比较小的时候,使用简单的:一台应用服务器+一台数据库服务器+一台文件服务器,这样的话完全可以解决一部分问题,也可以通过堆硬件的方式来提高网站应用的访问性能,当然,也要考虑成本的问题。 当问题的规模在经济条件下通过堆硬件的方式解决不了的时候,我们应该通过其他的思路去解决问题,互联网发展至今,已经提供了很多成熟的解决方案,但并不是都具有适用性,你把淘宝的技术全部都搬过来也不一定达到现在淘宝的水平,道理很简单。 当然,很多文章都在强调,一个网站的发展水平,是逐渐的演变过来的,并不是一朝一夕的事情。虽然目前的情况互联网的泡沫越来越大,但是整个互联网技术的发展确实为我们提供了方便快捷的上网体验。下边是一张早期的淘宝官网的界面: 目前,博主正在跟随导师做一个创业项目,使用的技术是SSM+MySQL+Linux这些,但是由于资金的限制和考虑到用户群体的特殊性,系统的架构无奈的选择的就是最简单的方式:一台应用服务器、一台数据库服务器、一台文件系统服务器,没有用到高级的技术,也没有用到分布式部署的方案。下边整理的是一些针对海量数据和高并发情况下的解决方案,技术水平有限,欢迎留言指导。 二、针对海量数据和高并发的主要解决方案

CVE-2020-13957:Apche Solr 未授权上传漏洞的分析及复现(环境搭建+复现)

穿精又带淫゛_ 提交于 2020-11-22 12:27:19
CVE-2020-13957:Apche Solr 未授权上传漏洞的分析及复现 一、漏洞描述 Solr是一个独立的企业级搜索应用服务器,它对外提供类似于Web-service的API接口。用户可以通过http请求,向搜索引擎服务器提交一定格式的XML文件,生成索引;也可以通过Http Get操作提出查找请求,并得到XML格式的返回结果。 Solr 主要特性有:强大的全文检索功能,高亮显示检索结果,动态集群,数据库接口和电子文档(Word ,PDF 等)的处理。而且Solr 具有高度的可扩展,支持分布搜索和索引的复制。 在特定的Solr版本中ConfigSet API存在未授权上传漏洞,攻击者利用漏洞可实现远程代码执行。 二、影响范围 Apache Solr 6.6.0 -6.6.5 Apache Solr 7.0.0 -7.7.3 Apache Solr 8.0.0 -8.6.2 三、漏洞原理 上传configset——基于configset再次上传configset(跳过身份检测)——利用新configset创造collection——利用solrVelocity模板进行RCE 四、环境搭建 本次实验的是solr7.7.0版本,去官网下载 http://archive.apache.org/dist/lucene/solr/7.7.0/ 下载完毕后,进行安装