solrnet

Solrnet - Boost query with function

[亡魂溺海] 提交于 2019-12-12 18:48:50
问题 I am trying to query sol using solrnet. I am looking to boost the query by a record's property. My query then looks like this: /select?fl=QualityScore,score&q={!boost+b=sum(1,log(sum(1,QualityScore)))+v=$qq}&qq="qome query" Is there a way to do this using SolrNet? PS - I already looked at SolrNet queries with boost functions and I dont see the same result when I use 'bf'. 回答1: Mauricio's pointer is what helped me in this case. Local Params 来源: https://stackoverflow.com/questions/11453269

Solrnet: problem when search field value is query operator (eq. or, and)

六月ゝ 毕业季﹏ 提交于 2019-12-12 15:28:14
问题 To be more precise I will be working with example... Clean query is: (type:77 AND (zipCode:12345 OR name:OR)) When querying on Solr Admin page this throws exception: org.apache.lucene.queryParser.ParseException: Cannot parse... So on Solr Admin page I changed query to: (type:"77" AND (zipCode:"12345" OR name:"OR")) which worked as a charm Now I have a problem to do the same stuff with solrnet. I am using SolrQueryByField class for querying. When I am working with new SolrQueryByField("name",

Solr: How to search multiple fields

两盒软妹~` 提交于 2019-12-12 08:58:28
问题 I am using solrnet. I have a title and Description fields. I need to search both fields simultaneously. How do I do this? 回答1: Jayendra's answer is correct, but if you want to do this without aggregating data in a single field at index-time (copyFields) and want to do it at query-time instead using the standard handler instead of dismax, in SolrNet you can do: var query = Query.Field("title").Is(mytitle) || Query.Field("Description").Is(mydescription); var results = solr.Query(query); See

How to register a ISolrFieldSerializer in Windsor container so that SolrNet can pick it up

亡梦爱人 提交于 2019-12-12 04:13:55
问题 I am trying to get an enum to serialize to it's int value when posting to Solr. So I have implemented a ISolrFieldSerializer to do this, As suggested here. But I can seem to register it within the Windsor container in a way that it then gets used by SolrNet Here is what I have: This works fine apart from the serializer does not get used, although it appears in the containers components list. Any ideas? container.Register(Component.For<ISolrFieldSerializer>().ImplementedBy<SolrEnumSerializer>(

How to update ExternalFileField value to external file which is located on solr directory

限于喜欢 提交于 2019-12-12 02:47:20
问题 I have implemented ExternalFileField in solr. But I am not able to update values into external file " external_BestSellerTest " that is located into ~\data directory inside solr core. My application and Solr Server were physically separated on two place. Application will calculate a score and generate a file for ExternalFileField. So, Am I need to post this external file into solr directory. Help me to update values into that external file. 来源: https://stackoverflow.com/questions/33412859/how

How to get Solr result as per their scores

£可爱£侵袭症+ 提交于 2019-12-12 01:55:58
问题 I am working on Solr with ASP.Net MVC. I want to display result as per score result . It means if I search for any keyword, it gives me total 500 result. But I want only first 100 Results. I also display scores for results using following query: Fields = new[] {"*","score"}, I want results which have score more than 0.3 How can I do this in Solr? Also a solrnet query to get this result. Please advise. Thank you. 来源: https://stackoverflow.com/questions/26842830/how-to-get-solr-result-as-per

The given key was not present in the dictionary solrnet

泄露秘密 提交于 2019-12-11 19:45:23
问题 Please note: I know for the question SolrNet - The given key was not present in the dictionary and I have initialized solr object just like Mauricio suggests. I am using solr 4.6.0 and solrnet build #173, .net framework 4.0 and VS2012 for development. For some unknown reason I am receiving error 'The given key was not present in the dictionary'. I have a document with that id in solr, I've checked via browser. It's a document like any other document. Why is error popping up? My code (I've

SolrNet ANDs and ORs with SolrQuery objects and eDisMax

亡梦爱人 提交于 2019-12-11 18:14:50
问题 I have been building Solr queries manually as strings and passing them to SolrNet. The queries can be complicated combinations of ANDs and ORs like this: _query_:"field1:[1 TO 10] OR field2:[1 TO 10] OR field3:[1 TO 10]" AND _query_:"field4:(keyword)" AND _query_:"field5:(keyword)" This was working well, but looking into the API for SolrNet, I see there are objects I could use for each clause and then pull these objects together to form the complete query. I would much rather implement this

How to use Min,max and average with Solr.net

与世无争的帅哥 提交于 2019-12-11 15:22:34
问题 I found http://code.google.com/p/solrnet/wiki/Stats link. But i cannot understand properly. I want to use min,max kind of function with solr query. My query(Display min, max and average price of Round shape and color D and clarity FL and caratweight.(This query will be genarated based on user's selection dynamically) (Shape:"Round") AND (Color:"D") AND (Clarity:"FL") AND (CaratWeight:[1 TO 10]) But how can i use such kind of function and select specific column. Now i am somewhat nearer... By

Solrnet facet returning spaces

為{幸葍}努か 提交于 2019-12-11 11:31:33
问题 I'm using Solrnet to return search results and am also requesting the facets, in particular categories which is a multi-valued field. The problem I'm coming up against is that the category "house products" is being returned as two seperate facets because of the space. Is there a way of ensuring this is returned as a single facet value, or should I be escaping the value when it is added to the index? Thanks in advance Al 回答1: If the tokens are generated for house products then you are using