jackrabbit-oak-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Julian Sedding (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (OAK-3576) Allow custom extension to augment indexed lucene documents
Date Tue, 03 Nov 2015 09:06:27 GMT

    [ https://issues.apache.org/jira/browse/OAK-3576?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14986959#comment-14986959
] 

Julian Sedding commented on OAK-3576:
-------------------------------------

Hi Vikas

Your approach differentiates between the LucenIndexe's "default" behaviour and the "augmented"
behaviour.

I wonder if it would be more elegant design to treat the "default" behaviour and the "augmented"
the same. E.g. we could have a {{IndexFieldGenerator}} interface (quite similar to your {{IndexAugmentor}}).

Each {{IndexFieldGenerator}} should have access at least to:
- the {{IndexDefinition}}, so it can evaluate properties of the definition
- the {{NodeState}} to be indexed
- the list of {{Field}}s extracted by previous {{IndexFieldGenerator}}s (empty list for the
first)

There would not be an {{indexAugmentor}} property pointing to a class name. Instead each {{IndexFieldGenerator}}
could decide to contribute {{Field}}s or not.

Such a design would allow to break out the "default" functionality (possibly at a later stage),
thus making it potentially optional. But more importantly, such an approach would allow to
plug in new features, that can be configured in the index-definition.

I believe that the approach described provides more flexibility in the implementations and
could simplify and encourage experimentation with various approaches (including replacements
for the "default" behaviour if desired).

Note: I am not implying that there is anything wrong with the default functionality! My concern
is purely about the design of this new feature.

> Allow custom extension to augment indexed lucene documents
> ----------------------------------------------------------
>
>                 Key: OAK-3576
>                 URL: https://issues.apache.org/jira/browse/OAK-3576
>             Project: Jackrabbit Oak
>          Issue Type: Improvement
>          Components: lucene
>            Reporter: Vikas Saurabh
>         Attachments: OAK-3576.wip.patch
>
>
> Following up on http://oak.markmail.org/thread/a53ahsgb3bowtwyq, we should have an extension
point in oak to allow custom code to add fields to documents getting indexed in lucene. We'd
also need to allow extension point to add extra query terms to utilize such augmented fields.
> (cc [~teofili], [~chetanm])



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

Mime
View raw message