"hu andy" <[EMAIL PROTECTED]> wrote on 28/07/2006 01:28:14:
> These codes are written in C#,. There is a C# version of Lucene 1.9,
which
I am not a C#'er so I might have misunderstood this code, still, here is my
take;
One general comment - the program sent is not self contained so it's hard
to "debug" - the singleton behavior is disabled, so it is better clean the
"wrappers" before sending the code; It is best to send the simplest (self
contained) code that generates the problem.
> AddDirectory(directory);
> writer.Optimize();
> writer.Close();
> directory.Refresh();
writer seems to be is a global variable.
when is writer instantiated? in AddDirectory()? For which path?
directory is not Lucene's Directory, right? - no Refresh() method in
Lucene's directory.
> public class SingletonSearcher
> {
> SingletonSearcher searcher
Side comment - for the (disabled) singleton behavior, searcher should be
static.
> public static SingletonSearcher GetSearcher()
> {
> return new SingletonSearcher(Current.Server.Path);
> }
Verify that same Current.Server.Path is used for search and for indexing.
Hope (but not sure:-) this helps at all,
Doron
---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]