lucene.net

Lucene security search asp.net c#

Hi, Im hoping this would be a really easy question for someone.... Basically we are indexing security information against my documents in lucene.net, the information is stored in 2 document fields called viewuserids and viewroleids, so when we construct a query - only documents which the user has view access to are returned. The requir...

Using Server.MapPath() inside a static field in ASP.NET MVC

I'm building an ASP.NET MVC site where I'm using Lucene.Net for search queries. I asked a question here about how to properly structure Lucene.Net usage in an ASP.NET MVC application and was told that the best method is to declare the my IndexWriter as public static, so that it can be re-used. Here is some code that is at the top of my ...

Lucene.net index directory usage in java lucene

Lucene.net is a direct port of Lucene for java, so it stands to reason that i could use the index directory created by Lucene.net directly from Lucene in java, is this assumption correct? ...

lucene bypass parser for search?

I dont think its needed but i was curious instead of generating a query string and searching lucene with it (ex "tag: abc 123 id:(2 or 99 or 123)") could i build a struct/class and pass it in? using lucene.net ...

custom Analyzer using ASCIIFoldingFilter not replacing diacritics

Hello experts, We have an issue with a custom Lucene.NET Analyzer which uses ASCIIFoldingFilter and LowerCaseFilter. While indexing our content, the lower case filter works and makes all terms low case but the ASCIIFoldingFilter leaves the diacritics untouched (there are no errors but characters like őŏő are not replaced with o, they ...

What's the best way to implement a fulltext search for an ASP.NET MVC application?

I've built an ASP.NET MVC application with MVC 2.0 and Fluent NHibernate (hided behind repositories for some reasons). The application represents a quite complex domain with some different objects like users, messages, comments, files and appointments. Now I want to implement a fulltext search which is enabling the user to find easily a...

Lucene PorterStemmer question

Given the following code: Dim stemmer As New Lucene.Net.Analysis.PorterStemmer() Response.Write(stemmer.Stem("mattress table") & "<br />") // Outputs: mattress t Response.Write(stemmer.Stem("mattress") & "<br />") // Outputs: mattress Response.Write(stemmer.Stem("table") & "<br />") // Outputs: tabl Could someone explain why the Port...

Lucene Standard Analyzer vs Snowball

Just getting started with Lucene.Net. I indexed 100,000 rows using standard analyzer, ran some test queries, and noticed plural queries don't return results if the original term was singular. I understand snowball analyzer adds stemming support, which sounds nice. However, I'm wondering if there are any drawbacks to gong with snowball...

How to optimize Lucene.Net indexing

I need to index around 10GB of data. Each of my "documents" is pretty small, think basic info about a product, about 20 fields of data, most only a few words. Only 1 column is indexed, the rest are stored. I'm grabbing the data from text files, so that part is pretty fast. Current indexing speed is only about 40mb per hour. I've hea...

How to maintain lucene indexes in azure cloud-app

Hi, I just started playing with the Azure Library for Lucene.NET (http://code.msdn.microsoft.com/AzureDirectory). Until now, I was using my own custom code for writing lucene indexes on the azure blob. So, I was copying the blob to localstorage of the azure web/worker role and reading/writing docs to the index. I was using my custom loc...

How can to group lucene's results?

My application indexes discussion threads. Each entry in the discussion is indexed as a separate Lucene document with a common_id field which can be used to group search hits into one discussion. Currently when the search is performed, if a thread has 3 entries, then 3 separate hits are returned. Even though this is correct, from the us...

How do I get solr term frequency?

hi All 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. ...

is it mandatory to optimize the lucene index after write?

Hi, Currently i am calling the optimize method of the indexwriter after the completions of the write. Since my data set is huge, it took long time ( and needs more space (2*actual size)) to optimize the index. I am very much concerned about this because lot of documents included frequently in the index. So is it ok to turn off opt...

How do I setup Lucene so that I can search ignoring whitespace characters?

For example, a list of part numbers includes: JRB-1000 JRB 1000 JRB1000 JRB100-0 -JRB1000 If a user searches on 'JRB1000', or 'JRB 1000' I would like to return a match for all the part numbers above. ...

Lucene.NET highlighter plugin highlighting strangely

I'm trying to add the Lucene.NET Highlighter to my search, however its doing some really strange highlighting, what am I doing wrong? Heres the highlighting code: // stuff here to get scoreDocs var content = doc.GetField("content").StringValue(); // content = "Lorem Ipsum is simply dummy text of the printing and typesetting industry. ...

Lucene.NET Faceted Search

I am building a faceted search with Lucene.NET, not using Solr. I want to get a list of navigation items within the current query. I just want to make sure I'm pointed in the right direction. I've got an idea in mind that will work, but I'm not sure if it's the right way to do this. My plan at the moment is to create hiarchry of all ava...

Lucene.Net and Nhibernate.Search: how to manage complex searches?

We have a SQL Server database with a million-ish records that are indexed by Lucene.net through Nhibernate.Search. When we built the index for our classes, we tried to be extensive since the cost for indexing/retrieval was really small. The goal was to offer full-text searching to users on a webpage with pagination. Since SQL Server com...

Solr on a .NET site

I've got an ASP.NET site backed with a SQL Server database. I'm been using Lucene.NET to index and search the database. I'm adding faceted search navigation to the results page (the facets are a hiarchical category tree). I asked yesterday to make sure I was using the right technique for faceting. All I've gotten so far is a suggestion t...

Thread safe queue (list) in .net

I need to create a thread safe list of items to be added to a lucene index. Is the following thread safe? public sealed class IndexQueue { static readonly IndexQueue instance = new IndexQueue(); private List<string> items = new List<string>(); private IndexQueue() { } public static IndexQueue Instance { get { ...

Random Sorting Results in Lucene.Net 2.4

How do I sort my results in a random order. my code looks something like this at the moment: Dim searcher As IndexSearcher = New IndexSearcher(dir, True) Dim collector As TopScoreDocCollector = TopScoreDocCollector.create(100, True) searcher.Search(query, collector) Dim hits() As ScoreDoc = collector.TopDocs.scoreDocs For Each sDoc As ...