solr

Could not find or load main class org.apache.solr.util.SolrCLI

梦想的初衷 提交于 2020-01-17 08:00:07
问题 I kept getting the error "Could not find or load main class org.apache.solr.util.SolrCLI" while trying to setup SOLR on windows x64 machine. 回答1: The resolution to the problem is really simple. 1)start solr. notice that you have to use solr.cmd instead of just solr *bin/solr.cmd start* 2) then create the collection: *bin/solr.cmd create -c gettingstarted -p 8983* 3) then add file/s to index using post tool. You can execute the post command in two ways a) java -Dc=gettingstarted -jar post.jar

Select query for search with 2 or more words without double quotes in solr

蓝咒 提交于 2020-01-17 07:28:08
问题 I have a column named title. I want to search this column. There is no problem when I use single word like title:'sport' OR title:"sport" . Both giving same number of record. My problem is when I search with 2 or more words without double quotes(with double quotes giving exact result ex: title:"sport education" ). title:'sport education' - returning irrelevant records(more title's don't have sport or education word) +title:'sport education' - returns the same number of record for the search

Using Solr with PHP

半世苍凉 提交于 2020-01-17 04:19:25
问题 I am trying to use solr with php . I have configured my solr application and it's working fine . However I am not able to communicate with solr using php . I have tried a number of extensions : pecl-solr , solr-php-client and Solarium . However none were able to even ping my solr server . All this while my solr server is available at localhost:8080/solr . I am running it on windows with tomcat . (I have checked my tomcat and solr services all the while when pinging through php , they were up

Query on Solr, limit the number of rows per day

早过忘川 提交于 2020-01-17 01:37:22
问题 I want to get documents from Solr by querying the same keywords everyday in time interval, with rows limit applied on each day. For example, if the keywords is "Machine Learning", the time interval is in between 21-11-2018 to 23-11-2018, each day is limited by 100 rows at most. Currently I naively query on each day: q="Machine Learning", fl=date:21-11-2018, rows=100 q="Machine Learning", fl=date:22-11-2018, rows=100 q="Machine Learning", fl=date:23-11-2018, rows=100 Is there an equivalent way

一、linux系统安装配置solr8

谁说我不能喝 提交于 2020-01-17 00:34:11
一、准备环境 1、下载solr最新版本,我的是8.4.0 https://lucene.apache.org/solr/downloads.html 2、下载安装tomcat,我的是9.0版本,用来做启动运行solr服务,因为solr内嵌的是netty,不稳定 3、下载安装jdk1.8以上版本 二、安装solr,创建目录solr,解压下载好的solr,记得,linux是tgz后缀,建议在window系统中解压,因为要用到里面的文件配置,在window系统中方便操作 mkdir /usr/local/solr tar -xvf solr-8.4.0.tgz 三、把/usr/local/solr/solr-8.4.0/server/solr-webapp目录下的webapp复制粘贴到下载安装好的tomcat中,并mv改名为solr 四、将solr安装包中的server→ext 文件夹下的jar、server→metrics开头的jar文件、server→http2开头的jar文件 拷贝到tomcat→webApp→solr→WEB_INF→lib文件夹中 第五步:配家、配置apache-tomcat-8.0.47→webApp→solr→WEB_INF下的web.xml 注释一下配置(目的是防止tomcat 403问题) 第六步:把solr8安装包中的server

Solr Multiphrase query not able to generate result even when the token was present

依然范特西╮ 提交于 2020-01-16 21:54:45
问题 Hi I'm stuck with an issue: I have a field splited_data and field type text_split (in my schema.xml ): <field name="splited_data" type="text_split" indexed="true" stored="false" /> <fieldType name="text_split" class="solr.TextField" autoGeneratePhraseQueries="true" omitNorms="true"> <analyzer type="index"> <tokenizer class="solr.WhitespaceTokenizerFactory" /> <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" /> <filter class="solr

How to add docs to Solr using PHP?

随声附和 提交于 2020-01-16 18:31:11
问题 I've got Solr set up on my server, and a test collection loaded. Without installing anything else, I can search the collection fine using the Solr URL and JSON decoding file_get_contents($url) . In order to add/update/delete documents, do I need to install a PHP Solr client? Or is there a native way that is standard to use? If the former, is this the one to install?: http://www.php.net/manual/en/book.solr.php - or can you recommend another and why? 回答1: Check the below links : Integrate SOLR

How to add docs to Solr using PHP?

丶灬走出姿态 提交于 2020-01-16 18:31:09
问题 I've got Solr set up on my server, and a test collection loaded. Without installing anything else, I can search the collection fine using the Solr URL and JSON decoding file_get_contents($url) . In order to add/update/delete documents, do I need to install a PHP Solr client? Or is there a native way that is standard to use? If the former, is this the one to install?: http://www.php.net/manual/en/book.solr.php - or can you recommend another and why? 回答1: Check the below links : Integrate SOLR

I want output to be in csv when I query SOLR , but output still comes in javabin

早过忘川 提交于 2020-01-16 18:03:46
问题 SolrQuery query = new SolrQuery(); query.setQuery("*:*"); query.add("wt","csv"); server.query(query); In QueryResponse object params come out to be params{q= : , wt=javabin ,version=2} Even though I have set wt as csv in code above . Any way how to get solr output in csv ? 回答1: The solrj Java library only supports javabin and xml . You can use HttpSolrServer#setParser(ResponseParser processor) to define the format. The wt parameter won't work here. If you want a csv output you have to

I want output to be in csv when I query SOLR , but output still comes in javabin

℡╲_俬逩灬. 提交于 2020-01-16 18:02:19
问题 SolrQuery query = new SolrQuery(); query.setQuery("*:*"); query.add("wt","csv"); server.query(query); In QueryResponse object params come out to be params{q= : , wt=javabin ,version=2} Even though I have set wt as csv in code above . Any way how to get solr output in csv ? 回答1: The solrj Java library only supports javabin and xml . You can use HttpSolrServer#setParser(ResponseParser processor) to define the format. The wt parameter won't work here. If you want a csv output you have to