FAQ
FuzzyQuery should not be final
------------------------------

Key: LUCENE-657
URL: http://issues.apache.org/jira/browse/LUCENE-657
Project: Lucene - Java
Issue Type: Improvement
Components: Search
Environment: all platforms
Reporter: Andreas Neumann
Priority: Trivial
Attachments: fuzzy.patch

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.

As discussed in the mailing list (http://www.gossamer-threads.com/lists/lucene/java-dev/38756), we want to make the private variables and inner classes protected.

I am attaching a patch for FuzzyQuery.java that implements this. I ran all unit tests and they passed without errors.

Andreas.

--
This message is automatically generated by JIRA.
-
If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
-
For more information on JIRA, see: http://www.atlassian.com/software/jira



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

Search Discussions

  • Steven Parkes (JIRA) at Oct 19, 2006 at 10:43 pm
    [ http://issues.apache.org/jira/browse/LUCENE-657?page=all ]

    Steven Parkes updated LUCENE-657:
    ---------------------------------

    Lucene Fields: [New, Patch Available]
    Fix Version/s: 2.1
    Assignee: Steven Parkes

    Anybody worried about this? Seems like a very nominal change. Any reason we would want to inhibit people from extended a query class like FuzzyQuery?
    FuzzyQuery should not be final
    ------------------------------

    Key: LUCENE-657
    URL: http://issues.apache.org/jira/browse/LUCENE-657
    Project: Lucene - Java
    Issue Type: Improvement
    Components: Search
    Environment: all platforms
    Reporter: Andreas Neumann
    Assigned To: Steven Parkes
    Priority: Trivial
    Fix For: 2.1

    Attachments: fuzzy.patch


    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.
    As discussed in the mailing list (http://www.gossamer-threads.com/lists/lucene/java-dev/38756), we want to make the private variables and inner classes protected.
    I am attaching a patch for FuzzyQuery.java that implements this. I ran all unit tests and they passed without errors.
    Andreas.
    --
    This message is automatically generated by JIRA.
    -
    If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
    -
    For more information on JIRA, see: http://www.atlassian.com/software/jira



    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-dev-help@lucene.apache.org
  • Otis Gospodnetic (JIRA) at Oct 26, 2006 at 4:20 am
    [ http://issues.apache.org/jira/browse/LUCENE-657?page=all ]

    Otis Gospodnetic resolved LUCENE-657.
    -------------------------------------

    Resolution: Fixed

    Applied in the trunk, thanks.
    FuzzyQuery should not be final
    ------------------------------

    Key: LUCENE-657
    URL: http://issues.apache.org/jira/browse/LUCENE-657
    Project: Lucene - Java
    Issue Type: Improvement
    Components: Search
    Environment: all platforms
    Reporter: Andreas Neumann
    Assigned To: Steven Parkes
    Priority: Trivial
    Fix For: 2.1

    Attachments: LUCENE-657.patch


    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.
    As discussed in the mailing list (http://www.gossamer-threads.com/lists/lucene/java-dev/38756), we want to make the private variables and inner classes protected.
    I am attaching a patch for FuzzyQuery.java that implements this. I ran all unit tests and they passed without errors.
    Andreas.
    --
    This message is automatically generated by JIRA.
    -
    If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
    -
    For more information on JIRA, see: http://www.atlassian.com/software/jira



    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-dev-help@lucene.apache.org
  • Andreas Neumann at Oct 26, 2006 at 6:39 am
    Two comments:

    1. In this particular case, all I need is the ability to override base
    class method
    getEnum(). No need to access or change member variables. As the class already
    defines getters for the members, the members can remain private.

    2. I noticed that many members have package (default Java) visibility.
    An example is
    analysis.Token. Its two members startOffset and endOffset only have
    getters, but no
    setters. If you want to set these after the Token was constructed,
    you need to define
    a subclass in the org.apache.lucene.analysis package. In cases like
    this, I don't think
    it would harm to make them protected, such that subclasses outside
    the package
    can access them. Or add setters to the base class.

    - Andreas.

    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-dev-help@lucene.apache.org
  • Chris Hostetter at Oct 26, 2006 at 6:47 am
    what happend to the patch for this issue? ... there doesn't seem to be
    anything attached to it in Jira.


    : Date: Wed, 25 Oct 2006 11:02:28 -0700
    : From: Andreas Neumann <neunand@gmail.com>
    : Reply-To: java-dev@lucene.apache.org
    : To: java-dev@lucene.apache.org
    : Subject: Re: [jira] Commented: (LUCENE-657) FuzzyQuery should not be final
    :
    : Two comments:
    :
    : 1. In this particular case, all I need is the ability to override base
    : class method
    : getEnum(). No need to access or change member variables. As the class already
    : defines getters for the members, the members can remain private.
    :
    : 2. I noticed that many members have package (default Java) visibility.
    : An example is
    : analysis.Token. Its two members startOffset and endOffset only have
    : getters, but no
    : setters. If you want to set these after the Token was constructed,
    : you need to define
    : a subclass in the org.apache.lucene.analysis package. In cases like
    : this, I don't think
    : it would harm to make them protected, such that subclasses outside
    : the package
    : can access them. Or add setters to the base class.
    :
    : - Andreas.
    :
    : ---------------------------------------------------------------------
    : To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
    : For additional commands, e-mail: java-dev-help@lucene.apache.org
    :



    -Hoss


    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-dev-help@lucene.apache.org
  • Steven Parkes (JIRA) at Oct 26, 2006 at 6:59 am
    [ http://issues.apache.org/jira/browse/LUCENE-657?page=all ]

    Steven Parkes updated LUCENE-657:
    ---------------------------------

    Attachment: (was: fuzzy.patch)
    FuzzyQuery should not be final
    ------------------------------

    Key: LUCENE-657
    URL: http://issues.apache.org/jira/browse/LUCENE-657
    Project: Lucene - Java
    Issue Type: Improvement
    Components: Search
    Environment: all platforms
    Reporter: Andreas Neumann
    Assigned To: Steven Parkes
    Priority: Trivial
    Fix For: 2.1

    Attachments: LUCENE-657.patch


    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.
    As discussed in the mailing list (http://www.gossamer-threads.com/lists/lucene/java-dev/38756), we want to make the private variables and inner classes protected.
    I am attaching a patch for FuzzyQuery.java that implements this. I ran all unit tests and they passed without errors.
    Andreas.
    --
    This message is automatically generated by JIRA.
    -
    If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
    -
    For more information on JIRA, see: http://www.atlassian.com/software/jira



    ---------------------------------------------------------------------
    To unsubscribe, e-mail: java-dev-unsubscribe@lucene.apache.org
    For additional commands, e-mail: java-dev-help@lucene.apache.org
  • Steven Parkes (JIRA) at Oct 26, 2006 at 7:04 am
    [ http://issues.apache.org/jira/browse/LUCENE-657?page=all ]

    Steven Parkes updated LUCENE-657:
    ---------------------------------

    Attachment: LUCENE-657.patch

    This version of the patch omits making the member variables public. FuzzyQuery is no longer final and some of the nested classes are made protected, but the member variables have getters so shouldn't need to be made public.
    FuzzyQuery should not be final
    ------------------------------

    Key: LUCENE-657
    URL: http://issues.apache.org/jira/browse/LUCENE-657
    Project: Lucene - Java
    Issue Type: Improvement
    Components: Search
    Environment: all platforms
    Reporter: Andreas Neumann
    Assigned To: Steven Parkes
    Priority: Trivial
    Fix For: 2.1

    Attachments: LUCENE-657.patch


    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.
    As discussed in the mailing list (http://www.gossamer-threads.com/lists/lucene/java-dev/38756), we want to make the private variables and inner classes protected.
    I am attaching a patch for FuzzyQuery.java that implements this. I ran all unit tests and they passed without errors.
    Andreas.
    --
    This message is automatically generated by JIRA.
    -
    If you think it was sent incorrectly contact one of the administrators: http://issues.apache.org/jira/secure/Administrators.jspa
    -
    For more information on JIRA, see: http://www.atlassian.com/software/jira



    ---------------------------------------------------------------------
    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 16, '06 at 12:34a
activeOct 26, '06 at 7:04a
posts7
users3
websitelucene.apache.org

People

Translate

site design / logo © 2021 Grokbase