solr

Search in solr with special characters

别等时光非礼了梦想. 提交于 2019-12-22 05:17:23
问题 I have a problem with a search with special characters in solr. My document has a field "title" and sometimes it can be like "Titanic - 1999" (it has the character "-"). When i try to search in solr with "-" i receive a 400 error. I've tried to escape the character, so I tried something like "-" and "\-". With that changes solr doesn't response me with an error, but it returns 0 results. How can i search in the solr admin with that special character(something like "-" or "'"??? Regards UPDATE

Solr MoreLikeThis boosting query fields

时光毁灭记忆、已成空白 提交于 2019-12-22 05:14:58
问题 I am experimenting with Solr's MoreLikeThis feature. My schema deals with articles, and I'm looking for similarities between articles within three fields: articletitle, articletext and topic. The following query works well: q=id:(2e2ec74c-7c26-49c9-b359-31a11ea50453) &rows=100000000&mlt=true &mlt.fl=articletext,articletitle,topic&mlt.boost=true&mlt.mindf=1&mlt.mintf=1 But I would like to experiment with boosting different query fields - i.e. putting more weight on similarities in the

how to order groups by count in solr

为君一笑 提交于 2019-12-22 04:49:17
问题 I'm wondering how to order groups in a Solr result. I want to order the groups by numFound . I saw how to order the groups by score here , but that didn't seem to actually make a difference in the examples I looked at, and isn't exactly what I wanted. In the xml you can see the number per group as numFound and that is what I want to sort the groups by, so for example I could see the largest group at the top. <arr name="groups"> <lst> <str name="groupValue">top secret</str> <result name=

Jetty Classpath issues

懵懂的女人 提交于 2019-12-22 04:00:14
问题 I'm currently running Solr out of a Jetty container that it ships with. It runs correctly when run from the command line via: java -jar start.jar when I'm in the same directory as start.jar. Unfortunately I need to be able to launch jetty from any directory, not just the one that contains start.jar. I've tried many options, such as: java -Dsolr.solr.home=~/solr/ -Djetty.home=~/solr/ -Djetty.logs=~/solr/logs/ -cp ~/solr/start.jar:~/solr/lib/jetty-util-6.1.26-patched-JETTY-1340.jar:~/solr/lib

ranger安装

╄→гoц情女王★ 提交于 2019-12-22 03:59:33
下载 $ wget https://github.com/apache/ranger/archive/release-ranger-2.0.0.tar.gz 解压缩 $ tar zxvf release-ranger-2.0.0.tar.gz -C /opt/module/ 编译 $ mvn clean compile package assembly:assembly install -DskipTests 结果 [INFO] ------------------------------------------------------------------------ [INFO] Reactor Summary for ranger 2.0.0: [INFO] [INFO] ranger ............................................. SUCCESS [ 4.100 s] [INFO] Jdbc SQL Connector ................................. SUCCESS [ 1.290 s] [INFO] Credential Support ................................. SUCCESS [ 1.137 s] [INFO] Audit Component ..

Default value in a field in the Solr schema can be the current date?

僤鯓⒐⒋嵵緔 提交于 2019-12-22 03:53:00
问题 I'm using Solr and I would like to add a field last_update in the schema.xml where the default value would be the current date when the document is added or updated. Do you have an idea how can I do this? Thanks 回答1: It is a supported scenario for DateField. The following should work: <field name="last_update" type="date" indexed="true" stored="true" default="NOW" /> 来源: https://stackoverflow.com/questions/7317759/default-value-in-a-field-in-the-solr-schema-can-be-the-current-date

SOLR: What does an autoSoftCommit maxtime of -1 mean?

余生长醉 提交于 2019-12-22 03:40:47
问题 Here's the default setting from my solrconfig.xml file: <autoSoftCommit> <maxTime>${solr.autoSoftCommit.maxTime:-1}</maxTime> </autoSoftCommit> Does the maxTime of '-1' mean that automatic soft commits are off? If so, would I get the same result if I deleted the tag altogether? And if I have to manually do the soft commits, can that be done with 'commitWithin' (I googled this but got conflicting answers)? Oh, and I'm using Solr 4.5.0 回答1: First off, you can see the expression ${solr

request counting for documents in apache solr

蓝咒 提交于 2019-12-22 01:20:38
问题 I have a simple website that is using apache solr for request of specific documents. Now I have to count the total number of request for each document served. I know that I have to use some database for this purpose. But I do not know how to update documents in database on fly i.e. when documents are served. I have used DIH to import documents from mysql to solr. How do I do it. 回答1: please be more specific about your use-case. I will answer for this question: What should I do to count all

Sphinx/Solr/Lucene/Elastic Relevancy

霸气de小男生 提交于 2019-12-22 01:14:58
问题 We have an extremely large database of 30+ Million products, and need to query them to create search results and ad displays thousands of times a second. We have been looking into Sphinx, Solr, Lucene, and Elastic as options to perform these constant massive searches. Here's what we need to do. Take keywords and run them through the database to find products that match the closest. We're going to be using our OWN algorithm to decide which products are most related to target our advertisements

Solr accent removal

非 Y 不嫁゛ 提交于 2019-12-22 00:29:18
问题 i have read various threads about how to remove accents during index/query time. The current fieldtype i have come up with looks like the following: <fieldType name="text_general" class="solr.TextField"> <analyzer> <tokenizer class="solr.StandardTokenizerFactory"/> <filter class="solr.ASCIIFoldingFilterFactory"/> <filter class="solr.LowerCaseFilterFactory" /> </analyzer> </fieldType> After having added a couple of test information to index i have checked via http://localhost:8080/solr/test