solrnet

Adding user defined types in SOLR schema

你说的曾经没有我的故事 提交于 2019-12-11 08:58:30
问题 Iam using SOLR as my search query database. My current requirement is to post this Document on SOLR database. namespace SOLRApp { public class Table1Document { public Table1Document() { MobileNos = new List<int>(); EducationalDetails = new List<EducationalDetails>(); } [SolrUniqueKey("ID")] public string ID { get; set; } [SolrField("FirstName")] public string FirstName { get; set; } [SolrField("LastName")] public string LastName{ get; set; } [SolrField("MobileNos")] public List<int> MobileNos

Solr.Net query returning false results

微笑、不失礼 提交于 2019-12-11 06:01:28
问题 I am trying to search Solr Instance with Solr.Net. I have field body which is defined in schema as: <field name="body" type="text_general" indexed="true" stored="true" omitNorms="true"/> text_general uses solr.StandardTokenizerFactory in schema and defined as: <fieldType name="text_general" class="solr.TextField" positionIncrementGap="100"> <analyzer type="index"> <tokenizer class="solr.StandardTokenizerFactory"/> <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt"

SolrNet: How to switch Solr connection to another server if the currently used server goes down?

坚强是说给别人听的谎言 提交于 2019-12-11 01:52:50
问题 I have to setup two solr servers, so that if one of the servers goes offline, traffic can be switched to the other server at runtime. One way is to let Solr try to connect to the server and after it times out try connecting with the other server. Is there a better way of doing this? Using 'try..catch' method takes a long time, so if there isn't a better way then is there a faster way to use 'try..catch' method? Thanks 回答1: You might want to try using a regular HTTP load balancer for this,

SolrNET - Could not load file or assembly 'HttpWebAdapters' when pulling from Nuget

╄→гoц情女王★ 提交于 2019-12-10 23:23:14
问题 I am using Nuget to get the latest version of SolrNET and StructureMap.SolrNetIntegration in my ASP.NET MVC project. x.IncludeRegistry(new SolrNetRegistry(((SolrConfigurationSection)ConfigurationManager.GetSection("solr")).SolrServers)); When the above line of code is invoked I receive the following error: Could not load file or assembly 'HttpWebAdapters, Version=0.3.0.0, Culture=neutral, PublicKeyToken=bc21753e8aa334cb' or one of its dependencies. The located assembly's manifest definition

Solr does not initialize

ε祈祈猫儿з 提交于 2019-12-10 21:22:33
问题 I am just creating one application which is start Solr from code side using ASP.NET Web Application. http://localhost:8080/solr/admin/ this link working perfect but am i startup initialize from code side it's give me error like file not found exception so please help me code line :: Startup.Init("http://localhost:8080/solr"); error message :: System.IO.FileNotFoundException Could not load file or assembly 'HttpWebAdapters, Version=1.0.0.0, Culture=neutral, PublicKeyToken=null' or one of its

Solr boost for multivalued date field

走远了吗. 提交于 2019-12-10 17:47:00
问题 I have a Solr index and each document is the information of an Event . In my schema Schedule is a multivalued field of type date. I am wondering if it is possible to boost the documents with a schedule date (any of those dates in the multivalued field) in the future and closest to the current date? I am using Dismax query and SolrNet client api. 回答1: You can user Solr FunctionQuery - recip. Example function query: recip(ms(NOW/HOUR,_datefield_),3.16e-11,1,1) Also read relevancy FAQ: http:/

Explanation of SolrNet connection

牧云@^-^@ 提交于 2019-12-10 14:13:55
问题 Why is the container of the SolrNet connections kept static? This is a very big fault, as when, in our application, we send an asynchronous request to our application, SolrNet behaves abnormally. How I can avoid this issue in SolrNet? class P { static void M(string[] a) { Thread t = new Thread(delegate() { f1(); }); Thread t1 = new Thread(delegate() { f2(); }); t.Start(); t1.Start(); t.Join(); t1.Join(); } static void f1() { Startup.Init<Doc>(new SolrNet.Impl.SolrPostConnection("http:/

Sorting with Multivalued Field in Solr

寵の児 提交于 2019-12-10 12:51:49
问题 I Have a Solr index that stores Price in a multivalued field for each Product. I need to sort the result set by Price where the Price is Low to high and High to Low. I try to use sorting on Price it's showing Error You can't sort on multivalued=True fields. below is my solr XML <arr name="sellprice"> <float>195.0</float> <float>136.5</float> <float>10.0</float> </arr> in schema.xml <field name="sellprice" type="float" indexed="true" stored="true" multiValued="true"/> In C# Code

Solr MoreLikeThis /mlt handler returns a 404 error

感情迁移 提交于 2019-12-10 10:33:29
问题 I want to find all the documents that is similar to a specific document within solr. I have installed solr and made some queries. The query I am trying to make gives an error which I cannot make out or research on the internet. Can you give me some light on this? I am using solrnet client but if solrnet is not appropriate for this type of query I will gladly use pure solr and read the XML. Here is the query I am using: http://192.168.1.10:8080/solr/mlt?q=id:12&mlt.fl=content&mlt.mindf=1&mlt

Solr Date Format issue in the Query

倖福魔咒の 提交于 2019-12-08 11:29:24
问题 I am trying to implement the solr query using .NET but i am getting bad request when i try to connect to the solr for search since my date format is wrong.Can any one tell me the exact syntax to create a date format in .net Created_Dt :[12/12/2008 3:45 PM TO *] 回答1: SolrNet already does the conversion to Solr time format for you, you only need to work with the standard DateTime type: new SolrQueryByRange<DateTime?>("Created_Dt", new DateTime(2008, 12, 12, 15, 45, 0), null); 回答2: You need to