Thanks for your answer.
I already found the reason for the bad performance.
hossman wrote:
>
> don't construct a new LuceneDictionary/IndexReader on every "suggest" call
> ... construct them once, and reuse them for each suggestion.
>
This was the first thing I did, but the effect was not that
: How can I speed it up?
don't construct a new LuceneDictionary/IndexReader on every "suggest" call
... construct them once, and reuse them for each suggestion.
: My temporary method:
: public static Vector suggest(String query, String indexName, String field,
: float accuracy) {
:
I fixed this problem by writing an external Java class and changing completly
to Lucene-2.4.0.
The SpellChecker now returns results but it is very slow.
My index contains about 2 words, I don't think this is too much.
How can I speed it up?
My temporary method:
public static Vector suggest
Yes, I'm passing the same index for Spellchecker and IndexReader.
I'm going to test if this is a reason for my problem.
But I still don't understand why the same code is working on the testserver.
I think this could be because of the rights from tomcat.
Is there any tutorial about the tomcat con
So, what changed with the server?
From the looks of your code, you're passing the same index into both
the Spellchecker and the IndexReader. The spelling index is separate
from the main index.
See the example at:
http://lucene.apache.org/java/2_4_0/api/contrib-spellchecker/org/apache/luc
I tested it with the lucene-spellchecker-2.4.0.jar...
Then I get the queryString as suggestion if it exists in the index. But
there's no chance to get other suggestions neither with LevensteinDistance
nor with JaroWinklerDistance. The setAccuracy() method has no effect on the
result.
I think this