lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Yonik Seeley (JIRA)" <j...@apache.org>
Subject [jira] Resolved: (LUCENE-438) add Token.setTermText(), remove final
Date Thu, 01 Jun 2006 21:16:30 GMT
     [ http://issues.apache.org/jira/browse/LUCENE-438?page=all ]
     
Yonik Seeley resolved LUCENE-438:
---------------------------------

    Fix Version: 2.1
     Resolution: Fixed

committed.

> add Token.setTermText(), remove final
> -------------------------------------
>
>          Key: LUCENE-438
>          URL: http://issues.apache.org/jira/browse/LUCENE-438
>      Project: Lucene - Java
>         Type: Improvement

>     Versions: CVS Nightly - Specify date in submission
>     Reporter: Yonik Seeley
>     Priority: Minor
>      Fix For: 2.1
>  Attachments: SpeedTest.java, TokenSpeed.java, yonik_Token.txt
>
> The Token class should be more friendly to classes not in it's package:
>   1) add setTermText()
>   2) remove final from class and toString()
>   3) add clone()
> Support for (1):
>   TokenFilters in the same package as Token are able to do things like 
>    "t.termText = t.termText.toLowerCase();" which is more efficient, but more importantly
less error prone.  Without the ability to change *only* the term text, a new Token must be
created, and one must remember to set all the properties correctly.  This exact issue caused
this bug:
> http://issues.apache.org/jira/browse/LUCENE-437
> Support for (2):
>   Removing final allows one to subclass Token.  I didn't see any performance impact after
removing final.
> I can go into more detail on why I want to subclass Token if anyone is interested.
> Support for (3):
>   - support for a synonym TokenFilter, where one needs to make two tokens from one (same
args that support (1), and esp important if instance is a subclass of Token).

-- 
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


Mime
View raw message