solr

How can I Ignore some fields in a SOLR query

你说的曾经没有我的故事 提交于 2019-12-22 13:05:23
问题 I have Solr 5.3.1 and need to do query for all field except some field (what I need search in some field not retrieve fields this way to retrieve [/?q=query&fl=field1,field2,field3] ) i try with some solution but not work 1.How to exclude fields in a SOLR query [this soluation not work] 2.[the below solution work but take more time] query = field1:"+txtSearch+"OR field1:"+ txtSearch+" OR field1:"+txtSearch 3.I set indexed="false" in data-config.xml it only Ignore search in this field but when

Sort result by date difference

匆匆过客 提交于 2019-12-22 12:23:49
问题 We have a solr result queried by a date range +/- 1 Month of the date entered. If i entered 2012-12-01 i get a Result Set from 2012-11-01 to 2013-01-01. This works fine, but we want to sort the Result after the date difference to the date entered. For example if we have the Dates: 2012-11-10, 2012-11-30, 2012-12-03, 2012-12-10 we want the Result sorted like this: 2012-11-30, 2012-12-03, 2012-12-10, 2012-11-10 Any Ideas how to accomplish this in solr? Thanks in advance! 回答1: you can just add

Apache Pig和Solr问题笔记(一)

荒凉一梦 提交于 2019-12-22 11:33:54
【推荐】2019 Java 开发者跳槽指南.pdf(吐血整理) >>> 记录下最近两天散仙在工作中遇到的有关Pig0.12.0和Solr4.10.2一些问题,总共有3个,如下: (1)问题一: 如何Pig中使用ASCII和十六进制(hexadecimal)的分隔符进行加载,和切分数据? 注意关于这个问题,在Pig中,会反应到2个场景中, 第一: 在Pig加载(load)数据时候 。 第二: 在Pig处理split,或则正则截取数据的时候。 先稍微说下,为啥使用十六进制的字段分隔符,而不是我们常见的空格,逗号,冒号,分号,#号,等,这些字符,虽然也可以使用,但是如果我们数据中有和这些符号冲突的数据,那么在解析时,就会发生一些出人意料的Bug,所以,为了保险起见,选用肉眼不可读的十六进制的数据,是一个不错的选择,当然这也是,针对场景来说的,看情况决定。 关于详细的ASCII和十六进制,二进制,八进制,十进制的文档介绍,请参考 维基 百科全书。 下面继续回到正题,本例中,我们的数据格式是这样存储的: Java代码 每行一条记录,UTF- 8 编码; 每条记录都包括字段名和字段内容; 字段之间用ascii码 1 分隔; 字段名与内容之间用ascii码 2 分隔; 一个在eclipse中的小例子如下: Java代码 public static void main(String[] args)

Solrj IOException occured when talking to server

穿精又带淫゛_ 提交于 2019-12-22 11:29:20
问题 I am using basic authentication. My solr version is 4.1. I can get query results but when I try to index documents I am getting the following error message: org.apache.solr.client.solrj.SolrServerException: IOException occured when talking to server at: http://192.168.0.1:8983/solr/my_core at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:416) at org.apache.solr.client.solrj.impl.HttpSolrServer.request(HttpSolrServer.java:181) at org.apache.solr.client.solrj

how to search for more than one facet in solr?

匆匆过客 提交于 2019-12-22 11:16:45
问题 I need to search for facets in solr as below: fq=country:usa fq=country:canada fq=topic:industrial fq=topic:political now i need to search for the articles that have the above facets (logical And) and (logical Or). suppose that i have the following articles country=USA France //Topic: Industrial Scientific country=USA canada //Topic: Industrial country=USA canada //Topic: Industrial political now, i have tried http://127.0.0.1:8888/solr/Collection1/select?q=*:*&start=0&rows=10&facet=true&fq

Solr highlighting

扶醉桌前 提交于 2019-12-22 10:57:55
问题 I saw this post here, he explains well howto show a highlighted result, but for me this is not going to work... I am getting the lst with highlighting and all, but the text in that is very less compared to the original response without highlighting... How do I merge highlighting content with original result set in php ? 回答1: Try hl.fragsize to increase the size of the highlighted snippet returned by Solr. 回答2: I would recommend to use a non-default highlighter to get much better results.

solr multicore vs sharding vs 1 big collection

你。 提交于 2019-12-22 10:55:10
问题 I currently have a single collection with 40 million documents and index size of 25 GB. The collections gets updated every n minutes and as a result the number of deleted documents is constantly growing. The data in the collection is an amalgamation of more than 1000+ customer records. The number of documents per each customer is around 100,000 records on average. Now that being said, I 'm trying to get an handle on the growing deleted document size. Because of the growing index size both the

SolrCloud Indexing/Querying without a Smart-Client

青春壹個敷衍的年華 提交于 2019-12-22 10:38:06
问题 I'm having a bit of trouble understanding exactly how indexing and querying would work if I don't have a smart-client available. I'm using SolrNet with C#, which currently doesn't integrate with ZooKeeper. As a basic example, let's say I have a single collection, split into two shards, replicated across two separate nodes/servers, and I have a standard HTTP load-balancer in front of the servers (a scenario mentioned here). If I use the standard compositeId router, I believe that indexing

Solr Faceting on Multiple Concatenated Fields

不想你离开。 提交于 2019-12-22 10:33:51
问题 I need a way to get facets on two combined field names. To show you what I mean, take a look at the query as it is now: { "responseHeader":{ "status":0, "QTime":16, "params":{ "facet":"true", "indent":"true", "q":"productId:(1 OR 2 OR 3 OR 4)", "facet.field":["productMetaType", "productId"], "rows":"10"}}, "response":{"numFound":4,"start":0,"docs":[ { "productId":1, "productMetaType":"PRIMARY_PHOTO", "url":"1_PRIM.JPG"}, { "productId":1, "productMetaType":"OTHER_PHOTO", "url":"1_1.JPG"}, {

solr not tokenizing protected words

半腔热情 提交于 2019-12-22 10:28:36
问题 I have documents in Solr/Lucene (3.x) with a special copy field facet_headline in order to have an unstemmed field for faceting. Sometimes 2 ore more words are belong together, and this should be handled/counted as one word, for example "kim jong il". So the headline "Saturday: kim jong il had died" should be split into: Saturday kim jong il had died For this reason I decided to use protected words (protwords), where I add kim jong il . The schema.xml looks like this. <fieldType name="facet