lucy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Marvin Humphrey (JIRA)" <>
Subject [jira] Updated: (LUCY-110) Architecture
Date Sun, 13 Jun 2010 02:00:13 GMT


Marvin Humphrey updated LUCY-110:

    Attachment: arch.patch

This diff introduces the Architecture class, discussed numerous times in both
Lucy and Lucene forums as one approach to the modularization problem for index
writers and readers.

There is a division of labor between the two configuration classes
Lucy::Plan::Architecture and Lucy::Index::IndexManager:

  * Architecture is responsible for unchanging aspects of the index, for
    instance what indexing components (document writer/reader pair, posting 
    list writer/reader pair, etc.) will be used.
  * IndexManager is responsible for ephemeral, per-session configuration, such
    as lock factory, merge policy, etc

Architecture uses a registration model rather than factory methods to
initialize index subcomponents.  An earlier prototype used factory methods,
but the argument lists of factory methods render them more fragile and less
extensible.  Under a registration model, it's easier for Architecture to
extract needed arguments from the object being modified as needed --
otherwise, it is necessary to break back compat to add arguments to a factory

-    public incremented DeletionsReader*
-    Make_Deletions_Reader(Architecture *self, Schema *schema, Folder *folder,
-                          Snapshot *snapshot, Segment *segment);
+    public void
+    Register_Deletions_Reader(Architecture *self, SegReader *reader);

Architecture objects are normally spawned using a factory method by Schema, 
so in order to change the Architecture, you must subclass Schema.  (This 
spares us from having to serialize Architecture objects within the Schema json 
file.)  It is an advanced class, available to experts but invisible to newcomers.

This patch also introduces stub classes for Lucy::Plan::SegWriter and

> Architecture
> ------------
>                 Key: LUCY-110
>                 URL:
>             Project: Lucy
>          Issue Type: New Feature
>          Components: Core - Plan
>            Reporter: Marvin Humphrey
>            Assignee: Marvin Humphrey
>         Attachments: arch.patch
> Lucy::Plan::Architecture encapsulates unchanging index configuration data
> needed by index readers and writers, such as choice of index 
> subcomponents.

This message is automatically generated by JIRA.
You can reply to this email to add a comment to the issue online.

View raw message