lucene.net

How to know when Lucene Index generation process is completed

Hi, I've a .net windows service which generates Lucene search indexes every night. I first get all the records from the database and add it to Lucene index using IndexWriter's AddDocument method and then call Optimize method before returning from the method. Since the records fetched are faily large, indexing takes around 2-3 minutes to...

How to: Increase Lucene .net Indexing Speed

I am trying to create an lucene of around 2 million records. The indexing time is around 9 hours. Could you please suggest how to increase performance? ...

SpatialQuery for location based search using Lucene

Hi, My lucene index has got latitude and longitudes fields indexed as follows: doc.Add(new Field("latitude", latitude.ToString() , Field.Store.YES, Field.Index.UN_TOKENIZED)); doc.Add(new Field("longitude", longitude.ToString(), Field.Store.YES, Field.Index.UN_TOKENIZED)); I want to retrieve a set of documents from this index whose ...

ConstantScoreRangeQuery in Lucene

How is Lucene's ConstantScoreRangeQuery better than the old RangeQuery? In what case should you use still use RangeQuery? ...

Correctly indexing latitude and longitude values in Lucene

Hi, Am working on a "US based nearest city search within a given radius" functionality using Lucene API. Am indexing city's lat and long values in Lucene as follows: doc.Add(new Field("latitude", paddedLatitude, Field.Store.YES, Field.Index.UN_TOKENIZED)); doc.Add(new Field("longitude", paddedLongitude, Field.Store.YES, Field.Index.U...

Good Lucene .NET alternative for ASP.NET website

Are there any good alternatives for Lucene .NET to use in a ASP.NET website? I want to index XML-, TXT-, PDF- and DOC-files. Thanks! ...

How do you implement a custom filter with Lucene.net?

The code below is from the Lucene In Action book (originally in Java). It's for building a list of 'allowed' documents (from a user permission point of view) to filter search results with. The problem is the termsDocs.Read() method does not accept the 'doc' and 'freq' arrays to be passed by reference, so they're still empty when it comes...

Need help regarding Lucene index/query

I want to have a "citystate" field in Lucene index which will store various city state values like: Chicago, IL Boston, MA San Diego, CA How do i store these values(shud it be tokenized or non-tokenized?) in Lucene and how do I generate a query (should it be phrasequery or termquery or something else?) which gets me all records who...

Nhibernate.Search, Lucene, and the Criteria API: types mismatch

Update I've been looking around the NHibernate.Search.Tests project to find out how the Criteria API is used (i find it immensely useful to look around the test code to have working examples) and i noticed that the way to use the Fulltext search is radically different. Here are two tests, one with the criteria API, one with the classic ...

How do I use native Lucene Query Syntax?

I read that Lucene has an internal query language where one specifies : and you make combinations of these using boolean operators. I read all about it on their website and it works just fine in LUKE, I can do things like field1:value1 AND field2:value2 and it will return seemingly correct results. My problem is how do I pass this w...

How to improve asp.net AJAX autocomplete performance

My web site has city,state and zip code autocomplete feature. If user types in 3 characters of a city in the textbox, then top 20 cities starting with those characters are shown. As of now, Autocomplete method in our application queries sql 2005 database which has got around 900,000 records related to city,state and zip. But the respo...

Lucene AddIndexes (merge) - how to avoid duplicates?

How do I make sure that when I merge a few temp indexes (that might or might not contain duplicate documents) I end up with one copy in the main index ? Thanks ...

Lucene.NET parallel indexing. i need a custom solution. Can anybody help?

Hi all, I'm using Lucene .NET I've got 2 threads, each one doing indexing of some different content (using a different algorithm, although they might try to index the same document). They are both writing to the same index (using a single IndexWriter instance). Also, I've got a web application that also needs to write to the index occ...

Lucene.Net and I/O Threading issue

Hello all, I have an indexing function named "Execute()" using IndexWriter to index my site's content. It works great if I simply called it from a web page, but failed when I have it as a delegate parameter into System.Threading.Thread. Strangely though, it always work on my local dev machine, it only fails when I uploads to a shared ho...

Error while copying Lucene index

I've an asp.net web application which uses Lucene API for search. Here is the problem scenario: Events: User invokes a Lucene search query thru the web application. There is another windows service running which just copies the search index folder to another folder. When event 2 occurs after event 1 has occurred, I am getting error ...

Can I use the same instance of IndexSearcher in Lucene.Net by multiple threads concurrently?

I want to be able to search by multiple clients and index at the same time in Lucene.Net Is it possible and thread safe? Can the same instance of IndexSearcher be shared across threads? ...

Preserving dots of an acronym while indexing in Lucene

Hi, If i want Lucene to preserve dots of acronyms(example: U.K,U.S.A. etc), which analyzer do i need to use and how? I also want to input a set of stop words to Lucene while doing this. ...

Newbie to Lucene.net, best aproach to complex queries?

Hi, I'm building a website for learning pruposes and i'm looking at lucene.net as a full text indexer for my content but I have some questions. Lets say I have a hierarchy (n levels) of categories, and articles that are assigned to one category (1 cat -> n articles). Using a simple RDB would be very easy to search for an article under ...

How do I re-use the query formed by bolean query when executing the same search next time in Lucene.Net.

I am using lucene.Net for searching in my application. I have to search in two fields so I am adding two term queries in a boolean query and the resulted boolean query is +(location:a* +(id:19)) I am using pagination to display results to the user. When I want to get next n records in my result set I am again exeuting the same search. ...

In lucene.net can we search for a content without giving field name..and it will search in all fields that are indexed??

In lucene.net can we search for a content without giving field name..and it will search in all fields that are indexed. ...