I think this proposal is what makes the most sense since this discussion started. As for making an instance not modifiable, the setVersion could check if it was already called and
error-out if it was. Then you could go from default to version 123, but at least you couldn't hop from version to version while the analyzer is live. This should mostly be handled by factories anyhow, so if factories explicitly calls setVersion all the time
before returning an instance, the instances wouldn't be modifiable.
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscr...@lucene.apache.org
For additional commands, e-mail: dev-h...@lucene.apache.org
My 2 cents. :) Steve From: Shai Erera [ser...@gmail.com]
Sent: August 3, 2014 8:51 AM To: dev@lucene.apache.org Subject: Re: Lucene versioning logic OK I see, it's the Tokenizers and Filters that usually change, the Analyzer only needs Version to determine which TokenStream chain to return, and so we achieve that w/ Ryan's proposal of setVersion().
I'd still feel better if Version was a final setting on an Analyzer, i.e. that a single Analyzer instance always behaves consistently, and cannot alternate behavior down-stream if someone called setVersion(). But this is a really stupid thing to do. Maybe
setVersion() can return an Analyzer, so you're sure that instance is not modifiable. But maybe this is just over engineering...
I'm +0.5 to that. I prefer Version to be mandatory somehow (class name, ctor argument), but I can live with setVersion as well...
Shai On Sun, Aug 3, 2014 at 3:30 PM, Robert Muir
<rcm...@gmail.com> wrote:
No, I didn't say any of this, please read it again :) |
- Lucene versioning logic Ryan Ernst
- Re: Lucene versioning logic Michael McCandless
- Re: Lucene versioning logic Shai Erera
- Re: Lucene versioning logic Robert Muir
- Re: Lucene versioning logic Shai Erera
- Re: Lucene versioning logic Robert Muir
- Re: Lucene versioning logic Shai Erera
- Re: Lucene versioning log... Robert Muir
- Re: Lucene versioning log... Shai Erera
- RE: Lucene versioning log... Steve Molloy
- Re: Lucene versioning log... Shai Erera