solr

sorl的使用

跟風遠走 提交于 2020-01-10 02:46:10
Sorl定义: sorl是独立的企业级搜索服务器,它对外提供类似于Web-service的API接口。用户可以通过http请求,向搜索引擎服务器提交一定格式的xml文件,生成索引。 同时也可以通过Http Get操作提出查询请求,并以xml返回查询结果 特点: sorl采用java5开发的基于Lucene的全文服务器。同时对其进行了扩展,提供了比Lucene更为丰富的查询语言,同时实现了可配置、可扩展并对查询性能进行了优化,并且提供了一个完善的功能管理界面,是一款非常优秀的 全文搜索引擎 。 工作方式: 文档通过Http利用XML 加到一个搜索集合中。 查询该集合也是通过http收到一个XML/JSON响应来实现。它的主要特性包括:高效、灵活的缓存功能, 垂直搜索功能,高亮显示搜索结果,通过索引复制来提高可用性,提供一套强大Data Schema来定义字段,类型和设置 文本分析 ,提供基于Web的管理界面等。 全文检索引擎Solr系列—–全文检索基本原理 http://www.importnew.com/12707.html 全文检索可以归纳为两个过程:1、索引创建(indexing)2、搜索索引(search) Solr/Lucene采用的是一种反向索引,所谓 反向索引 :就是从关键字到文档的映射过程,保存这种映射这种信息的索引称为反向索引 索引创建: 1)把原始文档交给分词组件

What are some Search Servers out there? [closed]

混江龙づ霸主 提交于 2020-01-09 12:52:10
问题 Closed. This question is off-topic. It is not currently accepting answers. Want to improve this question? Update the question so it's on-topic for Stack Overflow. Closed 6 years ago . I'm looking to find alternatives to Solr from the Apache Software Foundation. For those that don't know, Solr is an enterprise search server. A client application uses a web-services like interface to submit documents for indexing and also to perform search queries. Solr has other features built in like caching

solr实时更新mysql数据的方法

China☆狼群 提交于 2020-01-09 08:17:14
第一步:创建 core core 是 solr 的特有概念,每个 core 是一个查询数据 , 、索引等的集合体,你可以把它想象成一个独立数据库,我们创建一个新 core :名字 [ core1] 进入 linux 命令行 , 进入到 solr 的 bin 目录 , 执行如下命令 : cd /usr/local/solr/bin ./solr create -c core1 -force // -c 指定要创建的 Core 名称 root 用户启动需要增加 -force 第二步:准备数据导入配置 1 、修改 /usr/local/solr/server/solr/core1/conf 目录下的 solrconfig.xml 增加内容如下: 注意不要放到其他 requestHandler 里面 , 放在已经存在的 </requestHandler> 节点后面 ! <requestHandler name="/dataimport" class="solr.DataImportHandler"> <lst name="defaults"> <str name="config">data-config.xml</str> </lst> </requestHandler> requestHandler 请求处理器,定义了索引和搜索的访问方式。 通过 /dataimport 进行数据导入

solr的域

笑着哭i 提交于 2020-01-09 03:41:58
solrhom相当于存放数据的地方,里面一个个文件相当于数据库,每个数据库里面有两个文件夹,一个data,一个conf,conf下有一个schema.xml文件,配置域,相当于表的字段。 solr中内置了许多的字段类型 参照 Solr中的字段类型field type 配置域 域相当于数据库的表字段,用户存放数据,因此用户根据业务需要去定义相关的Field(域),一般来说,每一种对应着一种数据,用户对同一种数据进行相同的操作。 域的常用属性: name:指定域的名称 type:指定域的类型 indexed:是否索引 stored:是否存储 required:是否必须 multiValued:是否多值 一般域的配置: <field name="item_goodsid" type="long" indexed="true" stored="true" /> 域为item_goodsid我们在使用spring data solr 的时候会用到这个域 type就是指定这个域存放的数据类型 indexed=true就是需要索引 复制域 复制域的作用在于将某一个Field中的数据复制到另一个域中 一般 不需要存储,需要索引,type为ik分词 <!-- 复制域 --> <field name="item_keywords" type="text_ik" indexed="true"

SOLR企业搜索平台 三 (schema.xml配置和solrj的使用)

五迷三道 提交于 2020-01-08 05:33:33
标签: solrj 原创作品,允许转载,转载时请务必以超链接形式标明文章 原始出处 、作者信息和本声明。否则将追究法律责任。 http://3961409.blog.51cto.com/3951409/836027 前面讲到如何搭建solr运行环境以及对中文查询语句进行分词处理,这篇文章主要讲解对schema.xml的相关配置和如何使用solrj 对于搜索程序来说,最重要的是理解他的总体架构.solr也是基于Lucene的全文搜索服务器。同时对其进行了扩展,提供了比Lucene更为丰富的查询语言,同时实现了可配置、可扩展并对查询性能进行了优化,并且提供了一个完善的功能管理界面.但是他的执行过程却无异于lucene 搜索程序的典型组件,其中阴影部分由lucene完成 我们首先来说说这个schema.xml。 schema.xml,这个相当于数据表配置文件,它定义了加入索引的数据的数据类型。主要包括types、fields和其他的一些缺省设置。 1)首先需要在types结点内定义一个FieldType子结点,包括name,class,positionIncrementGap等等一些参数,name就是这个FieldType的名称,class指向org.apache.solr.analysis包里面对应的class名称,用来定义这个类型的行为

Apache Atlas部署安装

谁说胖子不能爱 提交于 2020-01-07 16:18:08
原创文章,转载请注明: 转载自 https://www.cnblogs.com/tovin/p/12161793.html 从atlas官网选择合适版本下载: https://atlas.apache.org/#/Downloads ,本文以2.0.0版本为例进行说明: 1、进入源码目录编译,最好选择将hbase、solr一起编译,减少版本的冲突,mvn编译过程比较久慢慢等,会出现下载某些包超时失败的情况,多重试几次就可以了。 cd apache-atlas-2.0.0-sources mvn clean -DskipTests package -Pdist,embedded-hbase-solr 编译成功后在 distro/target/ 目录下会生成编译好的包 2 、使用 distro/target/apache-atlas-2.0.0-server.tar.gz 包启动服务 解压: tar zxvf apache-atlas-2.0.0-server.tar.gz cd apache-atlas-2.0.0 vim conf/atlas-env.sh 设置 JAVA_HOME: export JAVA_HOME=/data/app/jdk1.8.0_192 bin/atlas_start.py 启动 atlas ,看启动 log 确认是否使用内置的 hbase 、 solr

Solr httpCache 缓存分析

空扰寡人 提交于 2020-01-07 08:19:41
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> solr httpCache 主要是用来判断当前的搜索请求request的请求头header的If-Modified-Since和If-None-Match的两个值, If-Modified-Since和If-None-Match这两个header信息可以参考我的另一篇博客 有关Last-Modified 与 If-Modified-Since 要想Solr的httpCache缓存生效,需要修改solr的配置文件solrconfig.xml,因为solr的过滤器会做如下判断: HttpCacheHeaderUtil.setCacheControlHeader(config, resp, reqMethod); if (config.getHttpCachingConfig().isNever304() || !HttpCacheHeaderUtil.doCacheHeaderValidation(solrReq, req, reqMethod, resp)){ 这里是没有httpcache缓存要做的所有工作。 } 要缓存,首先让solr生成header信息,这个代码就是HttpCacheHeaderUtil.setCacheControlHeader里完成的, 代码如下: if (Method.POST=

Solr : Write custom request Handler

被刻印的时光 ゝ 提交于 2020-01-07 07:09:58
问题 Well , I want to write custom request handler. So I thought of reviewing code of 'standard request handler' come with solr. Where can I find source code of handler. i didn't find it in my solr directory. 回答1: You can view the source code of the StandardRequestHandler from this link. The entire tree of the source code can be accessed in readonly view via http://svn.apache.org/viewvc/lucene/dev/ I would encourage you to check out the RequestHandler documentation on the Solr Wiki as well for

solr autosuggestion with tokenization

梦想的初衷 提交于 2020-01-07 05:01:54
问题 I am trying the autosuggestion with tokenization. If I provide 'solr', I should get results of 'Apache Solr' too. The below configuration provides results as 'Apache solr' if I provide 'apache'. I need a tokenized wildcard search. managed-schema <fieldType name="custom_text" class="solr.TextField" positionIncrementGap="100" multiValued="true"> <analyzer type="index"> <tokenizer class="solr.WhitespaceTokenizerFactory"/> <filter class="solr.LowerCaseFilterFactory"/> </analyzer> <analyzer type=

Merging index with SolR 1.4

谁说胖子不能爱 提交于 2020-01-07 04:40:31
问题 I'm working with Solr 1.4, and I want to test mergeindexes. Imagine these following Cores (A and B) : http://img59.imageshack.us/img59/5804/coreaandb.png In the core "A", there are document that have the same id than in core B. I want to merge these two core into a core C. The goal is to get a core C which contains merged documents (based on id). For example, I want to get the following document into the core C : id : 1 title : rambo tag : super If I call the mergeindexes method, I get the