solr

what is solr's default query parser

断了今生、忘了曾经 提交于 2019-12-23 20:08:57
问题 i am confused by these words in the solr document: https://cwiki.apache.org/confluence/display/solr/The+Standard+Query+Parser Before Solr 1.3, the Standard Request Handler called the standard query parser as the default query parser. In versions since Solr 1.3, the Standard Request Handler calls the DisMax query parser as the default query parser. https://cwiki.apache.org/confluence/display/solr/The+DisMax+Query+Parser The q parameter does not support wildcard characters such as *. so i

Upgrade Apache Solr from 4.10.4 to 6.6.0 on Cent os 7

折月煮酒 提交于 2019-12-23 19:04:33
问题 How to upgrade Apache solr from existing version 4.10.4 to 6.6.0 (A latest one) On linux centos 7 operating system. 回答1: stop existing running solr sudo service solr stop confirm its stopped or not sudo service solr status You can take backup of existing solr data from /var/solr/data/< core_name >, But reindexing solr data after upgrading solr version will give best performance without any unknown issues. now remove existing solr from centos sudo rm -r /var/solr remove solr from following

Faceting on distance in solr- how to generate links that search withing a given range of distance

穿精又带淫゛_ 提交于 2019-12-23 18:41:45
问题 It is fairly simple to generate facets for ranges or 'buckets' of distance in Solr: http://wiki.apache.org/solr/SpatialSearch#How_to_facet_by_distance What isnt described is how to generate the links for these facets If this is the query to return everything within 5km : &q= : &fq={!geofilt sfield=store}&pt=45.15,-93.85&d=5 -what then would be the syntax to search for everything between 5 and 10km ? Basically I can generate distance facets, but I dont know how to generate the links for the

CDH6.x Solr7.x 集成 Ik 分词

喜你入骨 提交于 2019-12-23 18:05:11
下载ik相关jar包: 链接:https://pan.baidu.com/s/19fydKWw15g8rPg4LW1cOtw 提取码:f2l8 在CDH安装目录下 查找CDH6 solr 的启动目录 [root@hostname1 ~]# find /opt -name WEB-INF |grep 'solr' /opt/cloudera/parcels/CDH-6.0.0-1.cdh6.0.0.p0.537114/lib/solr/server/solr-webapp/webapp/WEB-INF 进入该目录下的lib目录,可以查看到相关jar包 将我们刚刚下载的ik分词两个jar包放入lib目录下 ik-analyzer-solr5-5.x.jar , solr-analyzer-ik-5.1.0.jar 修改权限 chmod 777 solr-analyzer-ik-5.1.0.jar ik-analyzer-solr5-5.x.jar 分发到所有solr服务器中 重启Solr服务 在 schema.xml 中添加solr配置,并给字段配置该类型,Mpophlines文件(Key-Value Store Indexer 配置文件)配置不需要改变 <field name="hbase_indexer_user_fn_name" type="text_ik"

sort the solr search result. give error can not sort on multivalued field: name

橙三吉。 提交于 2019-12-23 17:16:08
问题 I am newer to the Apache Solr search. I am trying to sort the result set in the Solr query. Query : name:abc* AND hidden:false & sort=name desc It's showing the error : can not sort on the multivalued field: name Solr version is: 7.2.1 回答1: If you’re using recent versions of the Solr (>5.3) you should be able to use min or max functions to do sorting on multivalued fileds like this: sort=field(field_to_sort_on,min) asc The only requirement to achieve this is to use DocValues on this field -

Solr: boost based on existence of a field, disregarding that field's contents

扶醉桌前 提交于 2019-12-23 16:59:16
问题 I'd like to boost a query based on the existence of a field in the document, regardless of the contents of that field. Let's say a document has a field containing an id value of a photo, and I'd like documents that have photos to come up first on the search. The photo id value would be irrelevant to the search query but the existence of the field is what would matter. How to do it? 回答1: As described here, field:[* TO *] will match all documents with the field and can be used by you for

Manipulate Lucene query before performing search

余生颓废 提交于 2019-12-23 15:52:29
问题 I'm working on a Java webapp (Spring 3.x) that uses SOLR for its search engine. I want to be able to intercept the Lucene query and substitute a "virtual" search field for either one of two indexed fields, based upon a lookup service (if successful use a range search otherwise search a regular field). E.g., given a query like field0:foo (field1:bar OR field1:bash) AND field2:bing (field1 being a virtual field) manipulate the query to get field0:foo (field3:[42 TO 45] OR field4:bash) AND

Solr highlighting does not work with multiple fields hl.fl when dynamic field is present

半腔热情 提交于 2019-12-23 15:44:59
问题 I have a dynamic text field bar_* in my index and want Solr to return highlightings for that field. So what I run is: q=gold&hl=true&hl.fl=bar_* It works as expected BUT in case I add some more fields to hl.fl it stops working. E.g. q=gold&hl=true&hl.fl=bar_*,foo Notes: bar_* and foo fields are in the index/schema and there is no error here. just rewriting request as q=gold&hl=true&hl.fl=bar_*&hl.fl=foo or q=gold&hl=true&hl.fl=bar_* foo does NOT help. I didn't find any bugs in Solr JIRA on

Custom tokenizer solr only is invoked at the first

∥☆過路亽.° 提交于 2019-12-23 12:52:41
问题 I created a custom tokenizer, it seem work fine by checking with admin/analysis.jsp and with system.out log. However when I perform querying in the field which use this custom tokenizer, I saw that custom tokenizer solr only is invoked for the first query string (check by system.out log). Could you help me by point out what I am wrong ?. These are my code: package com.fosp.searchengine; import java.io.Reader; import org.apache.lucene.analysis.WhitespaceTokenizer; import org.apache.solr

How to import RDF file to Apache Solr

此生再无相见时 提交于 2019-12-23 12:46:02
问题 I'm new to Apache Solr. I want to import a rdf file into solr for indexing.I have googled it but I didn't find anything useful. please give me some pointers. 回答1: Solr accepts JSON documents. You can transform your RDF document into a JSON-LD document. JSON-LD is a RDF serialization format and it is part of RDF 1.1. You can safely go back and forth between JSON-LD and other RDF serializations and not loose any data. 回答2: Take a look at HttpDataSource example of DataImportHandler. It talks