solr

Sunspot — Boost records where matches occur early in the text

流过昼夜 提交于 2020-01-03 16:44:56
问题 For example, let's say there is a record in my DB that has the text "Hormel Corporation" and my search term is something like "Hormel Corned Beef 16 Ounces" . As my current configuration stands, the top results will be other records, even though "Hormel Corporation" is the one I'm looking for. I think the solution to my problem would be to give priority to records where a match comes earliest in the search term. I've read all the docs, but I have had trouble figuring out how this might work.

How to fix SolrException: QueryElevationComponent requires the schema to have a uniqueKeyField?

早过忘川 提交于 2020-01-03 16:36:11
问题 I am setting up a solr built into tomcat. I can get the example running in tomcat no problem. I then try to change schema.xml to a very simple one and I get an error. This is my schema.xml <?xml version="1.0" encoding="UTF-8" ?> <schema name="minimal" version="1.1"> <types> <fieldType name="string" class="solr.StrField"/> </types> <fields> <dynamicField name="*" type="string" indexed="true" stored="true"/> </fields> </schema> This is the error I get on start up: May 24, 2012 10:03:33 AM org

Solr - _version_ field must exist in schema and be searchable

久未见 提交于 2020-01-03 09:05:14
问题 I am pretty new to Solr and getting error on setting up my first example core. I am trying to add new core under admin dashboard but I am receving error about version field. Is there any workaround for this? Background: OS : Windows Solr Folder : C:\solr-6.0.0 Core Admin Url : http://localhost:8984/solr/#/~cores Folder Created For new_core : C:\solr-6.0.0\server\solr\new_core Error : Error CREATEing SolrCore 'new_core': Unable to create core [new_core] Caused by: _version_ field must exist in

How to make Solr spellchecker to correct both Latin and Cyrillic words?

我的梦境 提交于 2020-01-03 09:00:59
问题 I allow users to type Russian words in Latin letters. If user misspells Russian word in Latin letters, I want Solr spellchecker to suggest correct word in Cyrillic (Russian words in the index is in Cyrillic). However, if user misspells not a Russian word (for example a brand name), it should be corrected in Latin letters (not russian words in the index is in Latin). For example, tilevizor smasung should be fixed to телевизор samsung Now I'm using the following configuration: <fieldType name=

json reading error json.decoder.JSONDecodeError: Invalid \escape

人盡茶涼 提交于 2020-01-03 07:38:07
问题 I am writing a code to upload a model (train_and_upload_demo_model.py) in solr using "config.json" file settings. but i am getting following error: json.decoder.JSONDecodeError: Invalid \escape: line 11 column 34 (char 461) this is the traceback here: D:\solr640\contrib\ltr\example>python train_and_upload_demo_model.py -c config.json Traceback (most recent call last): File "train_and_upload_demo_model.py", line 182, in <module> sys.exit(main()) File "train_and_upload_demo_model.py", line 158,

How to update bigger solr index efficiently

和自甴很熟 提交于 2020-01-03 06:21:09
问题 I have a larger Solr index size. The index contains 3 million documents. I need to update some documents frequently. But each time Solr commit takes some time since the index contains millions of documents. And each commit opens a new searcher. So it takes some time to perform search for first time. Is there any way to update the documents in an efficient manner? Thanks in advance. 回答1: You can check for Solr 4 soft commits which would make the indexing faster. The new documents would be

Index/Search PDF content with Solr

爷,独闯天下 提交于 2020-01-03 06:15:43
问题 I'm experimenting with Solr and I've encountered this issue: I've indexed a PDF document and when I search for ":" in the admin console, the PDF is listed. However when I search for content within the PDF I get no results. To index the document, I used copy-and-paste code from: http://wiki.apache.org/solr/ContentStreamUpdateRequestExample 回答1: use this command curl "http://localhost:8983/solr/update/extract?stream.file=/home/fstl/apache-solr-3.2.0/example/exampledocs/pup.pdf&stream

Confuse about the tie and qf in edismax

和自甴很熟 提交于 2020-01-03 04:59:09
问题 I am confused about the qf and tie parameters in eDisMax According to the document: The qf is used to specify which field to search, while tie is use to specify all other field(except the highest score field)'s affect to the total score. My confusion is since we already specify which field(suppose we only specify only one field) to search, why we still be able to get other fields to affect the total results(I guess this must be my misunderstanding to how edismax works, but this is also my

Solr Dismax Config for Boost Scoring

旧时模样 提交于 2020-01-03 04:57:05
问题 I've seen many of this topics here but still confusing to implement it. In my case i need to do these: Search certain phrases in title & text and give title^3, text^1 based on result in #1, i need to boost the results by modified time i've tried these with different results: /solr/select ?q={!boost b=$dateboost v=$qq defType=dismax} &dateboost=recip(ms(NOW/HOUR,modified),86400000,1,1) &qq=video &qf=title^3+text &pf=title^3+text &debugQuery=true And Normal Query with different setting in

DIH Scheduling in Solr

↘锁芯ラ 提交于 2020-01-03 04:53:09
问题 I have just started playing around with Solr and I have it deployed and running on Tomcat. I have the schema and data import handler set up and it indexes the files just fine. Now I want to schedule this dataImportHandler to run every hour or so. There is a wiki page detailing the files here. But there are not instructions on where to create the files and how to deploy them A similar question has been asked on Stack Overflow before here. The answer was to "Create classes ApplicationListener,