it's CharTermAttribute in particular but since there are many such
particular examples -- at some point it becomes Lucene in general.
perhaps the problem is on my end that I'm not familiar enough with
DSL-style, but learning DSL concepts is not a prerequisite for Lucene.
as for the Term being immutable -- it's a char buffer, which in my view
is Very much mutable -- so if that was the idea it totally escaped me.
again, I'm not trying to criticize here, but I think that perhaps the
Lucene-experts are already used to this API and new users have a steeper
learning curve because of it.
Igal
On 11/5/2012 11:38 AM, Vitaly Funstein wrote:
Are you critiquing CharTermAttribute in particular, or Lucene in general?
It appears CharTermAttribute is DSL-style builder API, just like its
superinterface Appendable - does that not appear intentional and
self-explanatory? Further, I believe Term instances are meant to be
immutable hence no direct linkage between the two. I could be wrong though.
On Mon, Nov 5, 2012 at 10:33 AM, Igal @ getRailo.org <i...@getrailo.org>wrote:
I don't mean to sound critical, but is there a reason that the API is not
simpler?
for example, if I want to read/modify a CharTermAttribute's value, I need
to use toString() to get the value, which is very unintuitive, and either
copyBuffer() or setEmpty() and append().
is there a reason not to add the methods getTerm() and setTerm()?
------------------------------**------------------------------**---------
To unsubscribe, e-mail:
java-user-unsubscribe@lucene.**apache.org<java-user-unsubscr...@lucene.apache.org>
For additional commands, e-mail:
java-user-help@lucene.apache.**org<java-user-h...@lucene.apache.org>
---------------------------------------------------------------------
To unsubscribe, e-mail: java-user-unsubscr...@lucene.apache.org
For additional commands, e-mail: java-user-h...@lucene.apache.org