solr

Haystack says “Model could not be found for SearchResult”

余生长醉 提交于 2019-12-18 14:52:45
问题 After updating my Django from 1.7 to 1.9, search engine, which is based on Haystack and Solr, stopped working. This is what I get: ./manage.py shell Python 2.7.6 (default, Jun 22 2015, 17:58:13) [GCC 4.8.2] on linux2 Type "help", "copyright", "credits" or "license" for more information. (InteractiveConsole) >>> from haystack.query import SearchQuerySet >>> sqs = SearchQuerySet().all() >>>sqs[0].pk u'1' >>> sqs[0].text u'\u06a9\u0627\u0645\u0631\u0627\u0646 \u0647\u0645\u062a\u200c\u067e\u0648

Solr: Retrieve field names from a solr index?

隐身守侯 提交于 2019-12-18 14:00:27
问题 How can I query a solr instance for all (or prefixed) field names? I want to use dynamic fields like category_0_s category_1_s ... but i do not know how many may exist. So I want to retrieve all fields (preferably with the prefix "category_"). Any Ideas? Thanks 回答1: Use the luke handler: http://solr:8983/solr/admin/luke?numTerms=0 Use a xpath to get all the field which has the tag dynamicBase matching the dynamic fields definition you are looking for. 回答2: This query will return a comma

Importing multi-valued field into Solr from mySQL using Solr Data Import Handler

对着背影说爱祢 提交于 2019-12-18 13:53:18
问题 We have the following two tables in our mySQL: mysql> describe comment; +--------------+--------------+------+-----+---------+-------+ | Field | Type | Null | Key | Default | Extra | +--------------+--------------+------+-----+---------+-------+ | id | int(11) | YES | | NULL | | | blogpost_id | int(11) | YES | | NULL | | | comment_text | varchar(256) | YES | | NULL | | +--------------+--------------+------+-----+---------+-------+ mysql> describe comment_tags; +------------+-------------+----

How to solve the 'Lock obtain timed out' when using Solr plainly?

旧时模样 提交于 2019-12-18 13:37:17
问题 I have two cores for our Solr system (Solr version 3.6.1). When I invoke the following command line on our dedicated Solr server to add and then index a file: java -Durl=http://solrprod:8080/solr/original/update -jar /home/solr/solr3/biomina/solr/post.jar /home/solr/tmp/2008/c2m-dump-01.noDEID_clean.xml I get an exception in /usr/share/tomcat7/logs/solr.2013-12-11.log file (after about 6 minutes of waiting): SEVERE: org.apache.lucene.store.LockObtainFailedException: Lock obtain timed out:

Using SOLR to calculate “similarity”/“bitcount” between two ulongs

喜夏-厌秋 提交于 2019-12-18 13:32:05
问题 We have a database of images where I have calculated the PHASH using Dr. Neal Krawetz's method as implemented by David Oftedal. Part of the sample code calculates the difference between these longs is here: ulong hash1 = AverageHash(theImage); ulong hash2 = AverageHash(theOtherImage); uint BitCount(ulong theNumber) { uint count = 0; for (; theNumber > 0; theNumber >>= 8) { count += bitCounts[(theNumber & 0xFF)]; } return count; } Console.WriteLine("Similarity: " + ((64 - BitCount(hash1 ^

Solr rule based boost

北慕城南 提交于 2019-12-18 13:23:34
问题 I am using Solr-5.0.0 . I am searching on a field product_name . I need to add some rules to get relevant results. If I search for a word, if exact match exists , it should come first. Ex: if I search for laptop ,it should return exact product_name with laptop first. If I search for more than one word , it should obey rule 1. along with least word length distanced names come first. Ex: if I search dell laptop , it should return Dell laptop first than dell inspiron laptop . If I search for

Indexing PDF with Solr

∥☆過路亽.° 提交于 2019-12-18 12:54:43
问题 Can anyone point me to a tutorial. My main experience with Solr is indexing CSV files. But I cannot find any simple instructions/tutorial to tell me what I need to do to index pdfs. I have seen this: http://wiki.apache.org/solr/ExtractingRequestHandler But it makes very little sense to me. Do I need to install Tika? Im lost - please help 回答1: With solr-4.9 (the latest version as of now), extracting data from rich documents like pdfs, spreadsheets(xls, xlxs family), presentations(ppt, ppts),

How to get the suggester component working in SolrNet?

南笙酒味 提交于 2019-12-18 12:45:44
问题 I have configured my solrconfig.xml and schema.xml to query for the suggestions. I am able to get the suggestions from the url http://localhost:8080/solr/collection1/suggest?q=ha&wt=xml My SolrConfig.xml looks like Curently, My solr query looks like <fields> <!-- declare fields of entity class --> <!-- type will specify the table name --> <field name="type" type="string" indexed="true" stored="true" /> <field name="id" type="string" indexed="true" stored="true" required="true" multiValued=

Searching over documents stored in Hadoop - which tool to use?

前提是你 提交于 2019-12-18 12:38:22
问题 I'm lost in: Hadoop, Hbase, Lucene, Carrot2, Cloudera, Tika, ZooKeeper, Solr, Katta, Cascading, POI... When you read about the one you can be often sure that each of the others tools is going to be mentioned. I don't expect you to explain every tool to me - sure not. If you could help me to narrow this set for my particular scenario it would be great. So far I'm not sure which of the above will fit and it looks like (as always) there are more then one way of doing what's to be done. The

Apache Solr java tutorials [closed]

牧云@^-^@ 提交于 2019-12-18 12:36:03
问题 As it currently stands, this question is not a good fit for our Q&A format. We expect answers to be supported by facts, references, or expertise, but this question will likely solicit debate, arguments, polling, or extended discussion. If you feel that this question can be improved and possibly reopened, visit the help center for guidance. Closed 7 years ago . I am new to Apache solr and somehow whatever google search I am doing, I am not able to understand the tutorials on solr. I want to