lucene.net

C#: Could not load types from assembly

青春壹個敷衍的年華 提交于 2019-12-17 19:15:23
问题 After adding Lucene.net and Lucene.net Contrib to a C# MVC3, I get the message below after the first successful run. After receiving this error, I need to completely wipe C:\Users\Me\AppData\Local\Temp\Temporary ASP.NET Files before I can run the project again. I've tried removing the Lucene files manually (including references in my project), and reinstalling them - both with NuGet and manually - but it's always the same situation; after the project has been run once, I start getting the

How do i implement tag searching? with lucene?

﹥>﹥吖頭↗ 提交于 2019-12-17 17:41:33
问题 I havent used lucene. Last time i ask (many months ago, maybe a year) people suggested lucene. If i shouldnt use lucene what should i use? As am example say there are items tagged like this apples carrots apples carrots apple banana if a user search apples i dont care if there is any preference from 1,2 and 4. However i seen many forums do this which i HATED is when a user search apple carrots 2 and 3 have high results while 1 is hard to find even though it matches my search more closely.

How do i implement tag searching? with lucene?

狂风中的少年 提交于 2019-12-17 17:41:14
问题 I havent used lucene. Last time i ask (many months ago, maybe a year) people suggested lucene. If i shouldnt use lucene what should i use? As am example say there are items tagged like this apples carrots apples carrots apple banana if a user search apples i dont care if there is any preference from 1,2 and 4. However i seen many forums do this which i HATED is when a user search apple carrots 2 and 3 have high results while 1 is hard to find even though it matches my search more closely.

Lucene.Net Search result to highlight search keywords

我的未来我决定 提交于 2019-12-17 17:29:28
问题 I use Lucene.Net to index some documents. I want to show the user a couple of lines as to why that document is in the result set. just like when you use google to search and it shows the link and followed by the link there are a few lines with the keywords highlighted. any ideas? 回答1: When you have a result you can get the indexed text pass it along with your query through a method similar to this: public string GeneratePreviewText(Query q, string text) { QueryScorer scorer = new QueryScorer

Search Engine - Lucene or Solr

时间秒杀一切 提交于 2019-12-17 08:12:28
问题 We need to integrate a search engine in our Product Catalog management software. the catalog is expected to have more than 4-5 mn. records with relational data spread over several tables. Our dev platform is Asp.Net 3.5 and we have done some pre-liminary work on Lucene, found it to be good. However, we just came to know of Solr and was looking for some practical tips to compare Lucene & Solr from implementation, timeline, regular maintenance, performance, features perspective. Any guidance or

Lucene.Net phrase count

这一生的挚爱 提交于 2019-12-14 03:16:15
问题 As with Lucene.net count how many times the phrase is met ( not the word "something", namely the phrase "Hi how are you" ) in the text? I sorry for my English. 回答1: One way to do it is to use TermPositionVectors. You basically get the positions for each of your query terms, and count the number of times they occur in the same order in your Document as they were in your Query. 来源: https://stackoverflow.com/questions/9211792/lucene-net-phrase-count

Escaping special characters in lucene and query using wildcard

隐身守侯 提交于 2019-12-13 19:53:17
问题 I have an issue when I try to query using wildcard in a term that has a special character in it. As an example if I index "Test::Here" ,I search using this using wildcard ? for "TE?T\:\:Here" (NOTE: I escaped ':'). I do not get any results. I use standard analyser and queryparser for indexing and searching. Anyone encountered similar issue? 回答1: StandardAnalyzer uses StandardTokenizer , so Test::Here is seen as two tokens: Test and Here . Wildcard queries are not run through an analyzer, so

Lucene.NET - check if document exists in index

前提是你 提交于 2019-12-13 18:48:02
问题 I want to check whether or not a document already exists in my Lucene.NET (4.0) index. I have tried using the following code from this post. IndexReader reader; Term indexTerm = new Term("filepath", "C:\\my\\path"); TermDocs docs = reader.TermDocs(indexTerm); if (docs.Next()) { continue; } But I get an error telling me that reader is unassigned. I have Googled this a lot and cannot find a working answer in Lucene.NET 4 for what should be quite an easy task. edit : IndexReader is an abstract

Impact of repeat value across multiple fields in Lucene

坚强是说给别人听的谎言 提交于 2019-12-13 14:53:02
问题 What would be the impact of re-indexing the same value across multiple fields in a lucene index? The idea is that someone's first name is a part of their name and their general details. So I would want to index that value into multiple fields. Ted Bloggs I might index as follows: Field | Value -------------|--------- firstName | Ted lastName | Blogs name | Ted name | Bloggs general | Ted general | Bloggs all | Ted all | Bloggs By doing this I can easily form categories of fields however I'm