solrnet

How do I pass multiple “bq” arguments to LocalParams in SolrNet?

感情迁移 提交于 2020-01-06 19:35:31
问题 LocalParams is really just a Dictionary<string, string> behind the scenes. However, I want to pass multiple Boost Queries, which use the key "bq". Obviously, any attempt to add my second "bq" key will fail with An item with the same key has already been added. var lp = new LocalParams(); lp.Add("bq", "ContentType:Update^3.0"); lp.Add("bq", "ContentType:Comment^0.5"); // Error occurs here... What's the trick to passing multiple Boost Queries (or multiple anything, really)... 回答1: The comment

Solr search query returning full head exception

一笑奈何 提交于 2020-01-02 05:45:08
问题 I am calling remote solr search hosted on other machine in a c# application. Now since my query length becomes too large so search engine is returning full head error. I can't reducing query length. so i just wanted to know can i make a post request for the same? how would i make this?Please suggest me.Thanks. 回答1: Looks like you are running into jetty's default GET parameter size limit. This can be adjusted by changing headerBufferSize in jetty.xml. Refer to this link on configuring jetty -

can i use copyfield or dynamicfield or multivalued field functionality in solrnet?

南楼画角 提交于 2019-12-25 11:53:52
问题 can any body explain how during indexing i can use copyfield or dynamicfield or multivalued field functionality usin solrnet 回答1: Map multiValued fields to ICollection<T> properties: [SolrField("features")] public ICollection<string> Features {get;set;} I just updated the docs about mapping dynamicFields. 来源: https://stackoverflow.com/questions/3644627/can-i-use-copyfield-or-dynamicfield-or-multivalued-field-functionality-in-solrne

How can I read and write the external file field in solr?

╄→尐↘猪︶ㄣ 提交于 2019-12-25 07:45:19
问题 I am using External File field in solr for my frequently updated types of data. I had created a file _external_<myfieldTypename > in my Index directory. And my data is like : 4950 = 150.0 4951 = 65.0 4952 = 789.0 4953 = 786.0 4954 = 5.0 4955 = 21.0 Now I had created new field as: <fieldType name="<myfieldTypename>" class="solr.ExternalFileField" keyField="Name" defVal="1" indexed="false" stored="false" valType="float"/> <field name="MyFieldName" type="<myfieldTypename>" indexed="true" stored=

Migrating SolrNet MVC2 Application to MVC3

别来无恙 提交于 2019-12-25 03:59:06
问题 The sample application for SolrNET search is in MVC 2. I tried to convert it into MVC 3 application. The search is working perfectly, by connecting to my own solr instance. But the faceting is not getting displayed. private static readonly string[] AllFacetFields = new[] { "Dataaccess", "AccessMethod", "Datacreator", "Dataset", "Geographicalarea"}; And when the I sort the search results according to the best match, price and random, I get the link like, http://localhost:2086/?sort=price But,

Solr / rdbms, where to store additonal data

北慕城南 提交于 2019-12-24 11:51:43
问题 What would be considered best practice when you need additional data about facet results. ie. i need a friendlyname / image / meta keywords / description / and more.. for product categories. (when faceting on categories) include it in the document? (can lead to looots of duplication) introduce category as a new index in solr (or fake by doctype=category field in solr) use a rdbms to lookup additional data using a SELECT WHERE IN (..category facet result ids..) Thanks, Remco 回答1: I would think

Is there a way to get Hit Counts in solr

丶灬走出姿态 提交于 2019-12-24 11:47:59
问题 I have a simple question that is it possible to get hit counts in a document. like if we search "risk" could we get the count of risk in the matched document. 回答1: You can use highlighting and count the snippets. Make sure you have termVectors enabled for the affected fields and understand the highlighting options. You could also use the TermVectorComponent, it's currently not directly addressable via SolrNet though. 来源: https://stackoverflow.com/questions/4143896/is-there-a-way-to-get-hit

SolrNet: How can I perform Fuzzy search in SolrNet?

人走茶凉 提交于 2019-12-24 09:35:00
问题 I am searching a "text" field in solr and I looking for a way to match (for e.g.) "anamal" with "animal". My schema for the "text" field looks like the following: <filter class="solr.StopFilterFactory" ignoreCase="true" words="stopwords.txt" enablePositionIncrements="true" /> <filter class="solr.WordDelimiterFilterFactory" generateWordParts="1" generateNumberParts="1" catenateWords="1" catenateNumbers="1" catenateAll="0" splitOnCaseChange="1" /> <filter class="solr.LowerCaseFilterFactory" />

Getting Solr Elevated Results on top of Sorted by field Results

拈花ヽ惹草 提交于 2019-12-24 06:58:30
问题 We are using Solr 5. We are able to apply sorting on display order field in to Solr query and it works fine. We have certain results which are elevated and will always want them first. If we remove the sorting, the elevation works fine. However, we are unable to get both of them work together. We want to first list elevated results in the top and then other results based on the display order field. However, we are unable to find how to do this. Any help will be appreciated. Thanks in advance.

Updating Solr Index when product data has changed

牧云@^-^@ 提交于 2019-12-24 06:40:13
问题 We are working on implementing Solr on e-commerce site. The site is continuously updated with a new data, either by updates made in existing product information or add new product altogether. We are using it on asp.net mvc3 application with solrnet. We are facing issue with indexing. We are currently doing commit using following: private static ISolrOperations<ProductSolr> solrWorker; public void ProductIndex() { //Check connection instance invoked or not if (solrWorker == null) { Startup