solr

Zookeeper - upgrade from standalone to quorum

白昼怎懂夜的黑 提交于 2019-12-24 08:39:05
问题 Currently I have a standalone ZK instances used in a test system. But this test system has become production system and i would like to upgrade from 1 ZK instance to 3 without compromising availability of the SolrCloud system that ZK is overseeing. From what i've read upgrading from 3 to 5 and so on is pretty easy using rolling restarts, but haven't found any info on going from standalone (1 instance) to 3. Does anyone have any insight on this (anyone who might have tried it)? Thanks! 回答1: I

SOLR(亲测6.6.0和6.6.1安装正常)

♀尐吖头ヾ 提交于 2019-12-24 08:20:43
一、window 环境 solr 6.6.0 下载地址 http://apache.fayea.com/lucene/solr/6.6.0/ jdk 1.8 tomcat 8.0 本机tomcat环境:E:\Java\tomcat\apache-tomcat-8.0.26-windows-x64\webapps 本机解压路径:E:\Java\components\solr-6.6.0 二、部署solr 由于我在本地环境学习使用,所以下载window版本的zip包 1,首先确定安装了jdk 、tomcat、并下载了solr-6.6.0.zip 2,将solr-6.6.0.zip解压,找到E:\Java\components\solr-6.6.0\server\solr-webapp\webapp,并将webapp文件夹复制到tomcat的webapps下,并更名为solr(可以为任意名称) 3,拷贝solr-6.6.0\server\lib\ext下的jar包到tomcat下的webapps\solr\WEB-INF\lib路径下   拷贝solr-6.6.0\dist 下的solr-dataimporthandler-6.6.0.jar、solr-dataimporthandler-extras-6.6.0.jar 包到tomcat下的webapps\solr\WEB-INF

SOLR - Regex in Filter query

不问归期 提交于 2019-12-24 07:41:24
问题 I want to implement Regex in fq but never implemented it before. I have the below value in a property and the fieldtype is "lowercase": Prop=company1@city1@state1@country1@senior analytical chemist, chicago I want to filter the results based on the regex. The regex should match the above if "company1@city1@state1@country1@"+ regex to match chicago and analytical anywhere after last @ symbol. My requirement is to match the exact values before last @ and then use regex to match the remaining

How to concatenate 2 fields into one during query time in solr

南楼画角 提交于 2019-12-24 07:39:09
问题 I have a document in solr which is already indexed and stored like { "title":"Harry potter", "url":"http://harrypotter.com", "series":[ "sorcer's stone", "Goblin of fire", ] } My requirement is,during query time when I try to retrieve the document it should concatenate 2 fields in to and give the output like { "title":"Harry potter", "url":"http://harrypotter.com", "series":[ "sorcer's stone", "Goblin of fire", ], "title_url":"Harry potter,http://harrypotter.com" } I know how to do it during

how to get all docs with acts_as_solr

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-24 07:08:02
问题 I'm doing something like this: Item.find_by_solr('name:ab*') and it says it returns 297 results: => #<ActsAsSolr::SearchResults:0xb6516858 @total_pages=1, @solr_data={:docs=>[doc1, doc2, doc3...]}, :max_score=>1.6935261, :total_pages=>1, :total=>297}, @current_page=1> Item.count_by_solr('name:ab*') also returns 297. Yet when iterate it only shows 10 items: Item.find_by_solr('reference_name:ab*').each do |i| puts i end I tried adding {:per_page=>80} and :limit=>:all but it still shows those 10

Solr: How distinguish between multiple entities imported through DIH

家住魔仙堡 提交于 2019-12-24 07:06:04
问题 When using DataImportHandler with SqlEntityProcessor, I want to have several definitions going into the same schema with different queries. How can I search both type of entities but also distinguish their source at the same time. Example: <document> <entity name="entity1" query="query1"> <field column="column1" name="column1" /> <field column="column2" name="column2" /> </entity> <entity name="entity2" query="query2"> <field column="column1" name="column1" /> <field column="column2" name=

UTF-8 characters not showing properly

天涯浪子 提交于 2019-12-24 07:03:56
问题 I am using Nutch 1.4 and solr 3.3.0 to crawl and index my site which is in French. My site used to be in iso8859-1. Currently I have 2 indexes under solr. In the first one I store my old pages (in iso8859-1) and in the second one I store my new pages (in utf-8). I use the same nutch configurations for both of the crawl jobs to get and index the old and the new pages on my site. I have not added any settings about charters encodings on my own ( i think). I am facing problem when searching the

Getting Solr Elevated Results on top of Sorted by field Results

拈花ヽ惹草 提交于 2019-12-24 06:58:30
问题 We are using Solr 5. We are able to apply sorting on display order field in to Solr query and it works fine. We have certain results which are elevated and will always want them first. If we remove the sorting, the elevation works fine. However, we are unable to get both of them work together. We want to first list elevated results in the top and then other results based on the display order field. However, we are unable to find how to do this. Any help will be appreciated. Thanks in advance.

preserve association in multivalued in solr

为君一笑 提交于 2019-12-24 06:43:48
问题 I have multivalued fields in my solr datasource. sample is <doc> <str name="id">23606</str> <arr name="institution"> <str>Harvard University</str> <str>Yale Universety</str> <str>Cornell University</str> <str>TUFTS University</str> <str>University of Arizona</str> </arr> <arr name="degree_level"> <str>Bachelors</str> <str>Diploma</str> <str>Master</str> <str>Master</str> <str>PhD</str> </arr> </doc> in the example above this user has got Bachelors degree from Harvard, Diploma from Yale,

how to store file path in Solr when using TikaEntityProcessor

狂风中的少年 提交于 2019-12-24 06:42:57
问题 I am using DIH to index local file system. But the file path, size and lastmodified field were not stored. in the schema.xml I defined: <fields> <field name="title" type="string" indexed="true" stored="true"/> <field name="author" type="string" indexed="true" stored="true" /> <!--<field name="text" type="text" indexed="true" stored="true" /> liang added--> <field name="path" type="string" indexed="true" stored="true" /> <field name="size" type="long" indexed="true" stored="true" /> <field