Hi,
Am a newbie to Lucene search API.
I keep getting following exception when updating Lucene index...why do i get this error and how do i avoid it?
System.IO.IOException: Lock obtain timed out: SimpleFSLock@C:\Indexes\write.lock
at Lucene.Net.Store.Lock.Obtain(Int64 lockWaitTimeout)
at Lucene.Net.Index.IndexWriter.Init(Directory...
Lucene's StandardAnalyzer removes dots from string/acronyms when indexing it.
I want Lucene to retain dots and hence I'm using WhitespaceAnalyzer class.
I can give my list of stop words to StandardAnalyzer...but how do i give it to WhitespaceAnalyzer?
Thanks for reading.
...
I've a line in my Lucene code:
try
{
searcher.GetIndexReader();
}
catch(Exception ex)
{
throw ex;
}
finally
{
if (searcher != null)
{
searcher.Close();
}
}
In my finally clause, when I execute searcher.Close(), will it also execute searcher.GetIndexReader().Close behind the scenes?
Or do I need to explicit...
Before calling AddDocument() on IndexWriter, is it ok if i call IndexReader.IsLocked(myDirectory) and if it returns true then call, IndexReader.Unlock(myDirectory)??
Please suggest.
ie...
if(IndexReader.IsLocked(myDirectory))
{
IndexReader.Unlock(myDirectory);
}
writer = new IndexWriter(myDirectory, _analyzer, true);
writer.AddDocument...
I am having trouble searching for an exact phrase using Lucene.NET 2.0.0.4
For example I am searching for "scope attribute sets the variable" (including quotes) but receive no matches, I have confirmed 100% that the phrase exists.
Can anyone suggest where I am going wrong? Is this even supported with Lucene.NET? As usual the API...
I'm using Lucene search API in a web based application.
Which method of Lucene's IndexSearcher class is recommended to use?Is any method faster than other?
1.IndexSearcher(Directory directory)
2.IndexSearcher(IndexReader r)
3.IndexSearcher(String path)
Thanks for reading.
...
Hi,
Am using Lucene in a web based application and want to reuse the same instance of Indexsearcher for all the incoming requests.
Does this logic(using C#) make sense?Please suggest.
DateTime lastWriteTime = System.IO.Directory.GetLastWriteTime(myIndexFolderPath);
if (HttpRuntime.Cache["myIndexSearcher"] == null) //Cache is empty
{...
Is it generally fast enough to make simple updates synchronously? For instance with a ASP.NET web app, if I change the person's name... will I have any issues just updating the index synchronously as part of the "Save" mechanism?
OR is the only safe way to have some other asynchronous process to make the index updates?
...
I'm using Lucene.Net's MultiFieldQueryParser to search multiple fields in my documents. I want to find out which field the text was found. For example, my search might look like this:
var parser = new MultiFieldQueryParser(new string[] {"question","answer"}, analyzer);
var query = parser.Parse(searchphrase);
for(int idx=0; idx<hits.Len...
Hi,
Am using Lucene API in a .net web application.
I want to use the same instance of Indexsearcher for all the requests.Hence am storing indexsearcher instance in http cache.
here is my code for the same:
if (HttpRuntime.Cache["IndexSearcher"] == null)
{
searcher = new IndexSearcher(jobIndexFolderP...
Hi,
we are designing the search architecture for a corporate web application. We'll be using Lucene.net for this. The indexes will not be big (about 100,000 documents), but the search service must be always up and always be up to date. There will be new documents added to the index all the time and concurrent searches.
Since we must hav...
Hi,
Am using Lucene search API for a .net web application.
Can I know the pros and cons of using MultiSearcher ?In what scenarios shall I use it?
Thanks for reading!
...
We are looking at writing a site using Lucene.Net to search our Subversion repository but before we do that has anybody else already tackled this problem? Something like google for our private source code would be great. Thanks
...
Hi,
I'm working on a company search API using Lucene.
My Lucene company index has got 2 companies:
1.Abigail Adams National Bancorp, Inc.
2.National Bancorp
If the user types in National Bancorp, then only company # 2(ie. National Bancorp) should be returned and not #1.....ie. only exact matches should be returned.
How do I achieve thi...
I'm working on a project where I will have a LOT of data, and it will be searchable by several forms that are very efficiently expressed as SQL Queries, but it also needs to be searched via natural language processing.
My plan is to build an index using Lucene for this form of search.
My question is that if I do this, and perform a sea...
I am using Lucene.Net for indexing and searching documents, and I am using the following code to create or open an index if one exists:
IndexWriter writer = new IndexWriter(@"C:\index", new StandardAnalyzer(), !IndexExists);
private bool IndexExists
{
get
{
return ??
}
}
now how can ...
What are the best practices in using Lucene.Net? or where can I find a good lucene.net usage sample?
...
I've an asp.net web application hosted on a web server(IIS 7).It uses Lucene for search functionality.
Lucene search requests are served by .Net WCF services sitting on 2 application servers (IIS 7).The 2 application servers are Load balanced using "netscaler".
Both these servers host a .net windows service which updates search indexes ...
I would like to make the field name in my query case incesitive so that when users make the queries
title:Jurassic
or
Title:Jurassic
NHibernate Search would yield the same result.
As I understand the way Lucene works field names are case sensitive. Is there a way to configure NH Search/Lucene to lowercase the field names when inde...
Hi,
I'm using Lucene for a job search portal using .net.
Am facing some performance related issues in the following use case.
Use case is:
When doing job search, user can select job location(for exameple:Atlanta,GA) and select radial distance (say 50 miles).The time required to return job search results from Lucene is pretty high.
FYI,...