solr

How can I use a HayStack form that contains a ChoiceField within a Context Processor(Django 1.3)?

限于喜欢 提交于 2019-12-13 04:25:36
问题 I have a pretty simple Haystack form that looks just like this: class BasicSearchForm(SearchForm): category_choices = Category.objects.all() category_tuples = tuple([(c.id, c.name) for c in category_choices]) category = forms.ChoiceField(choices=category_tuples, required=False) def search(self): sqs = super(BasicSearchForm, self).search() if self.cleaned_data['category']: if self.cleaned_data['category'] != "*": sqs = sqs.filter(category__id=self.cleaned_data['category']) return sqs I then

How to Implement JSON Facet API in SolrNet

ⅰ亾dé卋堺 提交于 2019-12-13 04:24:33
问题 I want to make aggregate functions in Solr I found the way from this Post But I can't implement it in SolrNet How to Implement JSON Facet API in SolrNet ISolrOperations<DeviceReadings> solr = connection.GetSolrInstance(); QueryOptions queryOption = new QueryOptions { Rows = 0, FilterQueries = new ISolrQuery[] { new SolrQueryByField("playerId", query.PlayerId.ToString()), new SolrQueryByRange<DateTime>("dateTime", query.DateTimeFrom, query.DateTimeTo) }, Facet = new FacetParameters { Queries =

Make JVM/Solr not swap, using mlockall

北战南征 提交于 2019-12-13 04:24:04
问题 I saw ElasticSearch provides the mlockall option which permits to keep the JVM heap inside physical memory instead of virtual memory (which may or not be physical), and to avoid swapping the heap. Is there such an option with Solr? 回答1: Check this mlockall For All article maybe it has some good insight. 来源: https://stackoverflow.com/questions/16689912/make-jvm-solr-not-swap-using-mlockall

Solr Facet Query

二次信任 提交于 2019-12-13 04:18:23
问题 I have a schema which has field Polarity which is of type "text" and has three values 0,1,-1 and CreatedAt which is of type "date". How can I get count of each polarity based on dates. For example, it gives the output that on 5/1/2011 there were 10 counts of 0, 10 counts of 1 and 10 counts of -1 回答1: Something like that ? http://192.168.0.10:8080/solr/your_repository/select?q=date:20110105&facet=true&facet.limit=10&facet.field=Polarity 回答2: A little late but may help others looking for an

How to upload pdf and update field within one request in solr

北城余情 提交于 2019-12-13 04:13:22
问题 All: I am new to solr and solrj. What I want to do right now is uploading pdf file to solr and set customized field such as last_modified field at same time. But I keep encounter the error such as " multiple values encountered for non multiValued field last_modified", I use solrj to upload pdf and set the last_modified field like ContentStreamUpdateRequest up = new ContentStreamUpdateRequest("/update/extract"); up.setParam("literal.last_modified", "2011-05-19T09:00:00Z"); I guess the error is

Zookeeper timeouts without error in zookeeper Solr

一笑奈何 提交于 2019-12-13 04:13:18
问题 We are facing issue with solr/zookeeper where zookeeper timeouts after 10000ms. Error below. SolrException: java.util.concurrent.TimeoutException: Could not connect to ZooKeeper <server1>:9181,<server2>:9182,<server2>:9183 within 10000 ms. at org.apache.solr.common.cloud.SolrZkClient.<init>(SolrZkClient.java:184) at org.apache.solr.common.cloud.SolrZkClient.<init>(SolrZkClient.java:121) We are not getting any error in zookeeper logs.Except below logs 2018-12-19 04:35:22,305 [myid:2] - INFO

Spring Data Solr: HTTP ERROR 404 when updating Document

心已入冬 提交于 2019-12-13 04:12:25
问题 I am doing a simple Search exercise in solr. I followed this tutorial. http://www.baeldung.com/spring-data-solr I did all same. I run the test case I am getting an error like this: <head> <meta http-equiv="Content-Type" content="text/html;charset=utf-8"/> <title>Error 404 Not Found</title> </head> <body><h2>HTTP ERROR 404</h2> <p>Problem accessing /solr/categories/categories/update. Reason: <pre> Not Found</pre></p> </body> </html> ; nested exception is org.apache.solr.client.solrj.impl

How to form a Solr edismax query with mutiple fields and different minimum match and boosts for different fields?

夙愿已清 提交于 2019-12-13 04:04:28
问题 I've a Solr index with all documents having three fields - name, address and other_addresses. I want to search for a person having name say 'Tom Cruise' and Address '3rd Avenue 23rd Floor New York, NY 10016'. Now I want to search name in only name field having its some specific boost value and minimum match value as well. Also, address need to be searched in both address and other_addresses, with different mm and boost values. Can someone help me in writing edismax query on any other way

Apache Solr facet search exclude space

拈花ヽ惹草 提交于 2019-12-13 03:47:00
问题 I am using Apache Solr and using following Query for search http://Siteurl:8080/solr/metro/select?q=*:*&rows=0&wt=json&indent=true&facet=true&facet.field=Make But as result let suppose I have 'Ford Fiesta' in make field. I am getting two results instead of one as shown below : Ford => 21 Fiesta => 21 It is seprating field by space. I want it like Ford Fiesta => 21 Please let me know the valid method to do so. Thanks 回答1: The problem is very simple here. You are trying to facet on tokenized

Solr Error: Unable to create core [mycore] Caused by solr.ICUCollationField

白昼怎懂夜的黑 提交于 2019-12-13 03:46:39
问题 I am trying to create a solr core, I am using drupalvm with vagrant and virtual box. When setting up solr with this command: sudo su - solr -c "/opt/solr/bin/solr create -c m4m -d /tmp/search_api_solr/solr-conf/7.x/" I am getting this error: INFO - 2018-11-05 19:21:45.804; org.apache.solr.util.configuration.SSLCredentialProviderFactory; Processing SSL Credential Provider chain: env;sysprop ERROR: Error CREATEing SolrCore 'mycore': Unable to create core [mycore] Caused by: solr