solr

Solr DataImportHandler configuration

这一生的挚爱 提交于 2019-12-13 12:37:23
问题 I want to get data from mysql database with the help of DataImportHandler so i can create indexes. Now I've configured my Solr instance so that it works on Tomcat (the example admin page), but if I try to change the sorlconfig.xml file i'll get the error message. I'm working with Solr 3.6 So my configuration is: In solrconfig.xml I added: <dataDir>${solr.data.dir:/usr/share/tomcat7/solr2}</dataDir> to specify my working directory and then <requestHandler name="/dataimport" class="org.apache

queryResultCache in SOLR

我的梦境 提交于 2019-12-13 12:35:51
问题 I am wondering if queryResultCache in solrconfig.xml caches anything blindly or only successfully handled results? That is I don't want to cache failed query's results. Also I see some attribute called "autowarmCount" in the queryResultCache definition. <queryResultCache class="solr.LRUCache" size="16384" initialSize="16384" autowarmCount="128"/> Can I specify queries for auto warming up? Or can it figure out itself what queries to use? 回答1: The queryResultCache will only store results from

Solr How to search ñ and Ñ with normal char N and vice verse

…衆ロ難τιáo~ 提交于 2019-12-13 12:17:06
问题 How can we map non ASCII char with ASCII character? Ex.: In solr index we have word contain char ñ, Ñ [LATIN CAPITAL LETTER N WITH TILDE] or normal n,N Then what filter/token we use to search with Normal N or Ñ and both mapped. 回答1: Merging the answers of Solr, Special Chars, and Latin to Cyrilic char conversion Take a look at Solr's Analyzers, Tokenizers, and Token Filters which give you a good intro to the type of manipulation you're looking for. Probably the ASCIIFoldingFilterFactory does

Solr Facetting - Showing First 10 results and Other

让人想犯罪 __ 提交于 2019-12-13 12:05:31
问题 I am implementing a solution in Solr where I have a lot of values in my facet. As opposed to displaying a long list of values(facets) down the side of my page I want to display the top 10. And also have one for other. For instance I would be faceting on Nationality. So, I do not want to have a list of every nationality, Nor do I want a "see all" button. What I require is the top 10 nationalitys and then "Other". When a user clicks on other, it facets on this? 回答1: This is quite easy in Solr..

Solr score keyword detection rate

天大地大妈咪最大 提交于 2019-12-13 07:35:01
问题 I'm used Solr 6.1 I'm setting the score now, But I have some issue on score I just search GCS, the qf set is: title^100 content^70 text^50, The three fields type all are text_general, I get first one result score is 1050.8486 and another is 853.08655, But the first one content is so short in content field and another one is so many in content field, I just not know why the first score will be many Two results debugquery content below: 1002.8741 = sum of:\n 1002.8741 = max of:\n 1002.8741 =

Finding duplicate values in Solr

▼魔方 西西 提交于 2019-12-13 07:34:54
问题 Is there a way to construct a query such that it will identify/return documents where a particular field is duplicated. What I am looking for is the equivalent of this in SQL: SELECT content, count(*) FROM documents GROUP BY content ORDER BY count(*) DESC Basically, give me the documents where the content is the same. Everything I have found discusses how to toss out duplicates upon insertion, or how to get rid of them in the search results. I tried using FieldCollapsing, but I get the

Solrj DeleteByQuery is not working

点点圈 提交于 2019-12-13 07:13:53
问题 I have spent more than 3 hours of time to fix this issue, but unfortunately i am not able to fix it. Can anyone help me on this ? Here is the exception i am getting while running deletebyQuery using solrj while adding to solr is working. Note : deletebyQuery is not working but add is working. org.apache.solr.client.solrj.SolrServerException: IOException occured when talking to server at: http://localhost:8090/solr/abc at org.apache.solr.client.solrj.impl.HttpSolrClient.executeMethod

Different indexing and search strategies on same field without doubling index size?

▼魔方 西西 提交于 2019-12-13 07:13:18
问题 For a phrase search, we want to bring up results only if there's an exact match (without ignoring stopwords). If it's a non-phrase search, we are fine displaying results even if the root form of the word matches etc. We currently pass our data through standardTokenizer, StopFilter, PorterStemFilter and LowerCaseFilter. Due to this when user wants to search for "password management", search brings up results containing "password manager". If I remove StemFilter, then I will not be able to

Adding filter queries (FS) to a soler query using solrj

喜你入骨 提交于 2019-12-13 07:11:47
问题 I am trying to query solr using solrj and I can't seem to find the way to and a fq argument to my code here is the http request I am trying to run select?wt=json&indent=true&fl=name,store&q=*:*&fq=!geofilt%20pt=45.15,-93.85%20sfield=store%20d=5} and here is my code SolrServer server = new HttpSolrServer("the host"); SolrQuery query = new SolrQuery(); query.setQuery( "*" ); query.setParam("fl","name,price"); How do I add the setParam for the fq "!geofilt pt=45.15,-93.85 sfield=store d=5" I

solr: function usage problem

拥有回忆 提交于 2019-12-13 07:03:36
问题 to solve a problem described at [question]: Solr: where to store additional information? i wrote a function termcnt(fieldname) which just count specific terms in document regarding specified fieldname. Using solr admin page (http://localhost:8080/admin/form.jsp) in "Solr/Lucene Statement" I queried: fq={!frange l=3 u=1000}termcnt(wc_text) and got an error: type Status report message org.apache.lucene.queryParser.ParseException: Cannot parse 'fq={!frange l=3 u=1000}termcnt(wc_text)':