lucene-java-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Doron Cohen <DOR...@il.ibm.com>
Subject Re: Consult some information about adding index while searching
Date Fri, 28 Jul 2006 15:56:23 GMT
"hu andy" <andyhugb@gmail.com> 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: java-user-unsubscribe@lucene.apache.org
For additional commands, e-mail: java-user-help@lucene.apache.org


Mime
View raw message