solrj

SolrJ : Server refused connection

余生长醉 提交于 2021-02-11 13:09:40
问题 For a customer, I need to write a search engine running on Linux. I am using SolrJ and did not configure anything else so far. I followed https://lucene.apache.org/solr/guide/7_4/using-solrj.html#common-build-systems and thus added SolrJ in the project pom.xml, and also that tutorial. The SolR client is instanciated like : solrClient = new HttpSolrClient.Builder( GeneralSettings.getRootSolrPath() + "/" + getCollectionName()). build(); But for any query or commit I keep getting org.apache.solr

Solrj and Dynamic Fields

冷暖自知 提交于 2021-02-07 06:28:05
问题 I'm have a solr schema with dynamic field of different types in. Eg in the schema.xml there are: <dynamicField name="*_s" type="string" indexed="true" stored="true"/> <dynamicField name="*_i" type="int" indexed="true" stored="true"/> <dynamicField name="*_l" type="long" indexed="true" stored="true"/> <dynamicField name="*_f" type="float" indexed="true" stored="true"/> <dynamicField name="*_d" type="double" indexed="true" stored="true"/> And I want to access these field using a SolrJ annotated

Autoscaling solr - Add pull replicas, not NRT replicas

*爱你&永不变心* 提交于 2021-01-28 11:22:04
问题 I have a specific requirement where I just want to create only pull replicas using the solr autoscaling feature whenever the cluster starts the recovey process after a node failure. However Using solrcloud autoscaling creates NRT type replicas when node goes down and brought up. I have gone through the examples given in the policy specifcation list : https://lucene.apache.org/solr/guide/7_4/solrcloud-autoscaling-policy-preferences.html#policy-specification but I am not able to find a example

SolrJ: is not nesting documents

故事扮演 提交于 2021-01-07 03:33:30
问题 Here my beans: public class UnitatDenormalized { @Field private String id; @Field(value= "autors", child = true) private List<Autor> autors = new ArrayList<Autor>(); } public class Autor { @Field private String id; @Field private String name; } I'm trying to index nested authors as a nested document inside unitat . Here my straightforward bean initialization: UnitatDenormalized denormalized = new UnitatDenormalized(); denormalized.setId("giac_img-111-99-5805-415087"); denormalized.addAutors

SolrJ: is not nesting documents

半世苍凉 提交于 2021-01-07 03:33:27
问题 Here my beans: public class UnitatDenormalized { @Field private String id; @Field(value= "autors", child = true) private List<Autor> autors = new ArrayList<Autor>(); } public class Autor { @Field private String id; @Field private String name; } I'm trying to index nested authors as a nested document inside unitat . Here my straightforward bean initialization: UnitatDenormalized denormalized = new UnitatDenormalized(); denormalized.setId("giac_img-111-99-5805-415087"); denormalized.addAutors

SOLR

和自甴很熟 提交于 2020-12-13 21:40:41
搜索技术---solr solr 企业站内搜索技术选型 在一些大型门户网站、电子商务网站等都需要站内搜索功能,使用传统的数据库查询方式实现搜索无法满足一些高级的搜索需求,比如:搜索速度要快、搜索结果按相关度排序、搜索内容格式不固定等,这里就需要使用全文检索技术实现搜索功能。 单独使用 Lucene 实现 单独使用Lucene实现站内搜索需要开发的工作量较大,主要表现在:索引维护、索引性能优化、搜索性能优化等,因此不建议采用。 使用 Google 或 Baidu 接口 通过第三方搜索引擎提供的接口实现站内搜索,这样和第三方引擎系统依赖紧密,不方便扩展,不建议采用。 使用 Solr 实现 基于Solr实现站内搜索扩展性较好并且可以减少程序员的工作量,因为Solr提供了较为完备的搜索引擎解决方案,因此在门户、论坛等系统中常用此方案。 什么是Solr Solr 是Apache下的一个顶级开源项目,采用Java开发,它是基于Lucene的全文搜索服务器。Solr提供了比Lucene更为丰富的查询语言,同时实现了可配置、可扩展,并对索引、搜索性能进行了优化 Solr可以独立运行,运行在Jetty、Tomcat等这些Servlet容器中,Solr 索引的实现方法很简单,用 POST 方法向 Solr 服务器发送一个描述 Field 及其内容的 XML 文档,Solr根据xml文档添加、删除