Forgot to comment on @Indexed Yes, I like it too. And with multiple annotations of same type now being possible, I think that opens up a lot of possibilities, as you showed.
Niclas On Thu, Apr 14, 2016 at 2:44 PM, Kent Sølvsten <[email protected]> wrote: > Hi Niclas! > > Sorry I have not been of much use lately. > The job-giving-bread-on-the-table-requiring some attention. > > I agree that defaulting to everything being queryable is a lousy default. > > Beginning from scratch today, I would have preferred the opposite > default, and an @Indexed annotation. > The opposite default, and i think it better communicates the machinery > below. > > In a distant future we could then consider adding (optional) attributes > to the annotation, such as > > @Indexed(name="login" order=1) > > @Indexed(name="employee" order="1") > > Property<String> name(); > > @Indexed(name="login" order=2) > > Property<String> password(); > > @Indexed(name="employee" order="2") > > Association<Company> company(); > > @Indexed > > Property<String> email(); > > acting as a hint that we should expect queries by name-and-password, > name-and-company or by email. > Some implementations might be able to use these hints to improve > performance. > > But I am more uncertain whether we should switch the default now or be > bound by the old decision. > > /Kent > > > > Den 14-04-2016 kl. 07:46 skrev Niclas Hedhman: > > Firstly, It feels a little bit icky to have a "true" default and a > long-ish > > declaration with false to disable it. > > > > Secondly, it is possibly somewhat misleading to say that it is not > > Queryable. In fact, it is not being indexed, which results in not > > searchable/queryable. > > > > > > I would like to come up with better naming, if possible. > > > > Also, I think it is a valid question to ask; Was it a correct decision > > "back-when" to default all Properties and all Associations to always be > > indexed?? Now is the time to consider this choice. > > > > Cheers > > -- Niclas Hedhman, Software Developer http://zest.apache.org - New Energy for Java
