FAQ
Hi everyone,

I am new to Lucene, so this may have been asked before. But I could not find
an answer to my question in the archives, so I hope it is OK to ask it here.


I am trying to extend the FuzzyQuery to further filter the TermEnum. (I am
indexing stem forms and original forms, but I only want to match original
forms with a fuzzy term, otherwise I get to much noise). However, FuzzyQuery
is a final class and I cannot extend it. Could that be changed?

Thanks, Andreas.

Search Discussions

  • Chris Hostetter at Aug 9, 2006 at 11:39 pm
    : forms with a fuzzy term, otherwise I get to much noise). However, FuzzyQuery
    : is a final class and I cannot extend it. Could that be changed?

    It's been final since the first rev ... i seem to recall some discussion
    about many Lucene classes being final as a speed optimization in really
    old JVMs, so it probably could be changed, but it would be a good idea to
    audit the variables/methods in the class to make sure they would play nice
    with subclasses (ie: no private methods that a subclass would likely need
    to call, etc...)


    that's not to say however that there isn't still a legitimate reason why
    the class is final that i'm not realizing.

    -Hoss


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-dev-help@lucene.apache.org
  • Andreas Neumann at Aug 14, 2006 at 6:19 am

    On 8/9/06, Chris Hostetter wrote:

    old JVMs, so it probably could be changed, but it would be a good idea to
    audit the variables/methods in the class to make sure they would play nice
    with subclasses (ie: no private methods that a subclass would likely need
    to call, etc...)
    Right, a subclass would probably like to see the minimumSimilarity and
    prefixLength. They would be useful to redefine the enumerator.

    Then there are also the inner classes ScoreTerm and ScoreTermQueue, used
    by rewrite() to collect the most similar terms returned by the enumerator. If a
    subclass wants to redefine rewrite(), they may be useful, and I don't
    think it's
    harmful to expose them.
    that's not to say however that there isn't still a legitimate reason why
    the class is final that i'm not realizing.
    The class is fairly simple, and very similar to, for instance, WildcardQuery
    (which is not final).

    Andreas.

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-dev-help@lucene.apache.org

Related Discussions

Discussion Navigation
viewthread | post
Discussion Overview
groupdev @
categorieslucene
postedAug 9, '06 at 7:48a
activeAug 14, '06 at 6:19a
posts3
users2
websitelucene.apache.org

People

Translate

site design / logo © 2021 Grokbase