solr

Sorl Suggester issue

做~自己de王妃 提交于 2020-01-04 05:55:13
问题 I'm using solr Suggester lookupImpl as AnalyzingInfixLookupFactory , it's working fine the only issue i am not able to resolve is the fact I want exact search keyword display on top. .i.e if I1`q search "Leather bags" then that particular keywords should display on top but it is showing "mens leather", "ladies leather bags" after that it is showing "Leather bags". <searchComponent name="suggest" class="solr.SuggestComponent"> <lst name="suggester"> <str name="name">mySuggester</str> <str name

haystack isn't indexing my multivalue

╄→гoц情女王★ 提交于 2020-01-04 05:34:48
问题 I'm trying to get a MultiValueField to be indexed, but it's just not working. Here is what I have: class Public_PollIndex(SearchIndex): text = CharField(model_attr='question', document=True, use_template=True) date_created = DateTimeField(model_attr='date_created') choices = MultiValueField() def get_model(self): return Public_Poll def prepare_choices(self, obj): # For some silly reason we get (u"choice",) instead of just u"choice" # So we unpack... c = [ str(c) for (c,) in obj.choice_set

sunspot return all results for a model

巧了我就是萌 提交于 2020-01-04 05:19:12
问题 I have in my controller this: def boards @user = User.find_by_slug(params[:id]) @search = @user.boards.solr_search do |s| s.fulltext params[:search] s.keywords params[:search] s.order_by :created_at, :desc s.paginate :page => params[:page], :per_page => 1 end @boards = @search.results respond_to do |format| format.html { render :layout => nil}# panel.html.erb format.json { render json: @boards } format.js end end In my view: <table id="body_object"> <% for board in @boards %> <tr class=

Solr Query on Unique Integer Field

大城市里の小女人 提交于 2020-01-04 05:13:16
问题 I have a field defined in schema.xml as: <field name="id" type="integer" indexed="true" stored="true" required="true" /> It is also the uniqueKey for the schema. I cannot perform a query on this field with the query url: /select?q=4525&qf=id&fl=id,name%2Cscore This returns no results, however, if I search on a different field(such as a text field), with a different query, I get many results, which include the stored id. Solr is working great for text fields, but I cannot query for items based

How to know when Solr Optimize is done?

匆匆过客 提交于 2020-01-04 03:13:08
问题 I am using the Solr-php-client to communicate with Solr, via php. This piece of code triggers the solr optimize command: $solr->optimize(); I wonder if there is any method to know for sure that the optimization is done? This is all because I have an administrations page on my website where I manually once a day must optimize the Solr index, but I have difficulty writing this code. Currently I have a simple form with a submit button which triggers the optimize() command, but I must somehow

Special characters (-&+, etc) not working in SOLR Query

前提是你 提交于 2020-01-04 02:47:08
问题 I'm using "text_general" fieldType for searching in SOLR. While searching with special characters I'm not getting proper results and getting errors. I would like to use special characters like these: - & + Query solr?q=Healing - Live solr?q=Healing & Live Error message The request sent by the client was syntactically incorrect (org.apache.lucene.queryParser.ParseException: Cannot parse '("Healing \': Lexical error at line 1, column 8. Encountered: after : "\"Healing \"). schema.xml <fieldType

Find total term count in Solr index

妖精的绣舞 提交于 2020-01-04 02:10:26
问题 I need to figure out how many unique terms are in our Solr (Lucene) index. And by unique terms, I dont mean by document. I mean total unique terms from all documents in the index. The Solr admin console shows how many documents, but not total terms. I found a tool called Luke (Lucene Index Toolbox) that will give you that info, but its a UI tool, and my Sorl index is on a Ubuntu server so I cant run it. Any Ideas? 回答1: You can use the LukeRequestHandler. You should see the tag "numTerms" in

Solr Deduplication (dedupe) giving all zeros in signatureField

自闭症网瘾萝莉.ら 提交于 2020-01-03 20:13:31
问题 I've followed the examples listed in the documentation here: http://wiki.apache.org/solr/Deduplication and https://cwiki.apache.org/confluence/display/solr/De-Duplication However, when analyzing the results every signatureField gets returned like so: 0000000000000000 I can't seem to figure out why a unique signature isn't being generated. Relevant config sections: solrconfig.xml <requestHandler name="/update" class="solr.XmlUpdateRequestHandler"> <!-- See below for information on defining

Solr Search Using Susnpot Gem

心不动则不痛 提交于 2020-01-03 17:47:17
问题 I am currently using the sunspot gem to implement full text search in my rails application. Queries on my website through Sunspot/Solr are working and returning the proper results. However, when I attempt to make a query using the Solr admin page, I am having a hard time displaying results. Using the query string *:* I can display all the results contained in my indexed database, but I cannot make a proper query. If I try to make a query using a string other than *:* , such as test , no

SolrCloud with SSL and Basic Authentication

喜夏-厌秋 提交于 2020-01-03 17:42:12
问题 Is it possible to configure SolrCloud with SSL and Basic Authentication? I have configured 3 nodes of Solr in SolrCloud with SSL using this: https://cwiki.apache.org/confluence/display/solr/Enabling+SSL and I have added authentication and authorization following this: https://cwiki.apache.org/confluence/display/solr/Basic+Authentication+Plugin, https://cwiki.apache.org/confluence/display/solr/Rule-Based+Authorization+Plugin when only SSL is enabled it works. when only authentication +