solrj

Solr - highlight query phrase

六月ゝ 毕业季﹏ 提交于 2019-12-04 08:23:48
Is it possible to highlight whole query terms? f.e. when I ask for "United States" I want to get: <em>United States</em> and not: <em>United</em> <em>States</em> I've searched the whole Internet for an answer, used all combinations of hl.mergeContiguous , hl.usePhrasesHighlighter and hl.highlightMultiTerm parameters and still cannot make it work. my query is: http://localhost:8983/solandra/idxPosts.proj350_139/select?q=post_text:"Janusz Palikot"&hl=true&hl.fl=post_text&hl.mergeContiguous=true&hl.usePhrasesHighlighter=true&hl.highlightMultiTerm=true the answer is: ... <arr name="post_text"><str

Solr doesn't overwrite - duplicated uniqueKey entries

◇◆丶佛笑我妖孽 提交于 2019-12-04 05:12:05
I have a problem with Solr 5.3.1 . My Schema is rather simple. I have one uniqueKey which is the "id" as string. indexed, stored and required, non-multivalued. I add documents first with a "content_type:document_unfinished" and then overwrite the same document, with the same id but another content_type:document. The document is then twice in the index. Again, the only uniqueKey is "id", as string. The id is coming originally from a mysql-index primary int. Also looks like this happens not only once: http://lucene.472066.n3.nabble.com/uniqueKey-not-enforced-td4015086.html http://lucene.472066

Is usage of EmbeddedSolrServer now outdated & not recommended?

≯℡__Kan透↙ 提交于 2019-12-04 04:35:32
问题 I need to add search functionality to my Java webapp running on tomcat, along with the database as well on the same machine. Since I'm planning to use Solr on this same machine but which implementation should be used? I thought Embedded one is more preferable since I need to be adding data from the same machine, so adding via HTTP wont make much sense, no? & moreover running Solr as a separate web app would consume more resources than the embedded one(isn't it?). But now that the use of

Solr 5.3.0集成mmseg4j、tomcat部署、Solrj 5.3.0使用

橙三吉。 提交于 2019-12-04 04:10:54
环境:Jdk 1.7 Solr 5.3.0 Tomcat 7 mmseg4j-solr-2.3.0 1、Solr环境搭建 1.解压solr 5.3.0 2.新建solr_home,将解压文件中的 server/solr 文件夹的复制到solr_home 3.配置solr_home。在solr_home/solr中新建应用 mysolr 4.将solr_home/solr/configsets/sample_techproducts_configs中的conf文件夹复制到mysolr中 5.在mysolr目录中新建core.properties内容为name=mysolr (solr中的mysolr应用) 6.以tomcat 7为solr容器,解压tomcat 7.将solr-5.3.0\server中的solr-webapp复制到tomcat的webapps目录,重命名为solr 8.复制文件 (1)将以下内容复制到tomcat/webapps/solr/WEB-INF/lib文件夹中 (2)将log4j.properties复制到tomcat/webapps/solr/WEB-INF/classes文件夹中(新建classes) 9.配置solr项目中的web.xml,打开 env-entry节点,配置solr_home 10.启动tomcat浏览器输入http:/

Solr exact word result come first

僤鯓⒐⒋嵵緔 提交于 2019-12-03 21:17:08
In Solr-5.0.0, I have one product_name field. When I search for a word or more than words, its giving results with product names that contain the words. How can I make it as the exact match come first. My Schema.xml is below: <field name="product_name" type="text_wslc" indexed="true" stored="true" required="true" multiValued="false"/> and my field definition is also given below: <fieldType name="text_wslc" class="solr.TextField" positionIncrementGap="100"> <analyzer type="index"> <tokenizer class="solr.WhitespaceTokenizerFactory"/> <filter class="solr.SynonymFilterFactory" synonyms="synonyms

Sorting solr search results using multiple fields (solrj)

橙三吉。 提交于 2019-12-03 20:58:41
I need to sort the results I get back from apache solr based on two factors: There are three entities in our system that are indexed by solr (groups, projects and datasets) and in the results I want datasets to be displayed first, followed by projects and then groups; but I still want it to respect to score values for each of the types. So, for example: results would be Dataset with score of 0.325 Dataset with score of 0.282 Dataset with score of 0.200 Project with score of 0.298 Project with score of 0.186 Group with score of 0.360 Group with score of 0.270 I'm doing this in java and using

Unable to find schema.xml file in solr 6.0,so to configure it,am i supposed to add a new file,or it will happen automatically?

百般思念 提交于 2019-12-03 16:26:58
问题 I have created a new core named "testcore" in solR ,but in solR 6.0 I am not able to find Schema.xml file in conf folder,so am I supposed to manually create it or it will configure itself automatically? I wanted to index a example from example docs,so to index it am I supposed to mention Schema.xml document or it will happen automatically as solR 6 is schemaless. I am trying to folow this tutorial https://examples.javacodegeeks.com/enterprise-java/apache-solr/apache-solr-tutorial-beginners/

Situations to prefer Apache Lucene over Solr?

生来就可爱ヽ(ⅴ<●) 提交于 2019-12-03 10:02:12
There are several advantages to use Solr 1.4 (out-of-the-box facetting search, grouping, replication, http administration vs. luke, ...). Even if I embed a search-functionality in my Java application I could use SolrJ to avoid the HTTP trade-off when using Solr. Is SolrJ recommended at all? So, when would you recommend to use "pure-Lucene"? Does it have a better performance or requires less RAM? Is it better unit-testable? PS: I am aware of this question . If you have a web application, use Solr - I've tried integrating both, and Solr is easier. Otherwise, if you don't need Solr's features

linux/window 下 solr5.1 tomcat7.x 环境搭建即简单功能测试

独自空忆成欢 提交于 2019-12-03 09:31:06
之所以想使用solr来进行学习,很大一部分原因就是,solr能够在某种程度上提供RESTFUL相关的URL请求连接,可以把它理解为 以搜索引擎为基础的存储服务系统 ,由于他的搜索可以是针对URL的,那么他的扩展性就会很强,也不会对整个代码开发侵入性太强。 Lucene是一套提供搜索的类库,而Solr是建立在Lucene之上的一套全文检索的解决方案。你可以基于Lucene建立一套自己的搜索应用程序出来,也可以直接使用Solr、ElasticSearch等成熟的基于Lucene的搜索程序 源码地址: http://git.oschina.net/alexgaoyh/Maven-solr 项目执行效果(左边为本地搭建的solr环境进行的查询结果,右边是使用Eclipse来进行数据查询的结果,结果集匹配,测试结果正确): 1: 环境搭建: 本文使用的是solr5.1 和 tomcat7.x 版本,具体的项目整合例子如连接所示: http://www.tuicool.com/articles/mueARf : 2:环境整合完成后,是没有相应的cores的,显示 no cores available, 这时,需要本地进行core添加,这里不过多进行介绍,只是简单的进行文件夹的复制(注意由于是对文件夹的复制,所以需要编辑相应的两个xml文件) 3: 遇到报错: org.apache.solr

How to configure Solr for improved indexing speed

我怕爱的太早我们不能终老 提交于 2019-12-03 05:50:11
I have a client program which generates a 1-50 millions Solr documents and add them to Solr. I'm using ConcurrentUpdateSolrServer for pushing the documents from the client, 1000 documents per request. The documents are relatively small (few small text fields). I want to improve the indexing speed. I've tried to increase the "ramBufferSizeMB" to 1G and the "mergeFactor" to 25 but didn't see any change. I was wondering if there is some other recommended settings for improving Solr indexing speed. Any links to relevant materials will be appreciated. It looks like you are doing a bulk import of