solrnet

Solr Schemaless Mode creating fields as MultiValued

╄→гoц情女王★ 提交于 2019-12-08 06:51:11
问题 I'm using Solr 6.1 in Schemaless Mode. After creating a collection and indexing a sample data the fields created were all set to have MultiValued = true, except for unique id. The problem is when querying this data using SolrNet it wouldn't map the result to the model correctly. The queried results is returned as an array and require all my properties in the model to be updated to ICollection type. Is there anyway we can set these field to MultiValued = false when indexing the sample data? An

Solr date boost and sort by relevant results NOT working properly

一曲冷凌霜 提交于 2019-12-08 04:32:10
问题 I am implementing Solr dismax search and also using this function recip(ms(NOW,PubDate),3.16e-11,1000,1000) for date boost. Everthing is working fine but only got one problem. if search keywords are repeated in the Title, they get more score than recent results. e.g. 1) Title = solr lucene Date = 1 day old 2) Title = solr lucene is best, love solr lucene Date = 15 days old If user searched for 'solr lucene', then #2 comes at first position only because keywords are repeated in the Title. I

How do I get solr term frequency?

橙三吉。 提交于 2019-12-08 00:46:31
问题 I have a question that how could somebody get term frequency as we do get in lucene by the following method DocFreq(new Term("Field", "value")); using solr/solrnet. 回答1: Try debugQuery=on or TermsComponent. None of them are currently supported through SolrNet, so you can either work around it, or implement them and contribute them to the project. 来源: https://stackoverflow.com/questions/3905101/how-do-i-get-solr-term-frequency

Solr Connection' already registered in container

女生的网名这么多〃 提交于 2019-12-07 14:11:35
问题 i am using solr search on asp.net when i search first time it give me correct search result, bt after that when i change search parameter and try to search it give an error ("Solr Connection' already registered in container") so pl z suggest me that how can i remove it... 回答1: Make sure that you are only initializing the connection to the Solr instance once, by putting something similar to the following in the Application_Start event in the Global.asax. file. Startup.Init("http://localhost

Get all the results from solr without 10 as limit

本小妞迷上赌 提交于 2019-12-07 03:15:06
问题 How to get all the rows returned from the solr instead of getting only 10 rows? 回答1: You can define how many rows you want (see Pagination in SolrNet), but you can't get all documents. Solr is not a database. It doesn't make much sense to get all documents in Solr, if you feel you need it you might be using the wrong tool for the job. This is also explained in detail in the Solr FAQ. 回答2: As per Solr Wiki, About the row that query returns, The default value is "10", which is used if the

SolrNet - Score always 0

删除回忆录丶 提交于 2019-12-06 12:34:16
问题 I have a simple query to a Solr instance using SolrNet, But for some reason, the score is always 0. I have verified : have a field [SolrField("Score")] public double Score { get; set; } in my mapping class have checked that the fields being searched are string instead of text. What else could be wrong? Please help Update: var results = solr.Query(q, new QueryOptions { OrderBy = new[] { new SolrNet.SortOrder("DateSubmitted", Order.ASC) }, Fields = new[] { "score" } } ); 回答1: Make sure that

Set default search fields in Apache Solr

北城以北 提交于 2019-12-06 03:44:20
问题 I am trying to Implement Apache Solr search through SolrNet library.So far I have managed to run an instance of Solr in my machine and make some queries based on specific fields. My code to do it looks like this var solr = ServiceLocator.Current.GetInstance<ISolrOperations<Product>>(); var results = solr.Query(new SolrQueryByField("id", "SP2514N")); This one works fine now,But I would like to make queries with out specifying a field , So that when I enter a search key word solr will look in

How to add Spatial Solr to a Solrnet query

倖福魔咒の 提交于 2019-12-06 02:47:44
问题 I am running Solr on my windows machine using jetty. I have downloaded the Spatial Solr Plugin which I finally managed to get up and running. I am also using Solrnet to query against Solr from my asp.net mvc project. Now, adding data into my index seems to work fine and the SpatialTierUpdateProcessorFactory does work as well. The problem is: How do I add the spatial query to my normal query using the Solrnet library. I have tried adding it using the "ExtraParams" parameter but that didn't

Solr Connection' already registered in container

北慕城南 提交于 2019-12-06 02:18:47
i am using solr search on asp.net when i search first time it give me correct search result, bt after that when i change search parameter and try to search it give an error ("Solr Connection' already registered in container") so pl z suggest me that how can i remove it... Make sure that you are only initializing the connection to the Solr instance once, by putting something similar to the following in the Application_Start event in the Global.asax. file. Startup.Init("http://localhost:8983/solr"); Can you post a code snippet of how you are opening the SolrConnection and querying against the

Issue about Schema.xml uniqueKey field [duplicate]

天涯浪子 提交于 2019-12-05 09:14:03
问题 This question already has answers here : Closed 7 years ago . Possible Duplicate: Solr: QueryElevationComponent requires StrField uniqueKeyField error I hava configured the schema.xml with different field like <fields> <field name="id" type="int" indexed="true" stored="true" required="true" /> </fields> <uniqueKey>id</uniqueKey> when I run solr service it gives me the error like uniquekey field must be string then after I change the field type int to string it's working fine <fields> <field