Chetan Mehrotra created OAK-4713:
------------------------------------

             Summary: Builder class to simplify Lucene Index Definition building
                 Key: OAK-4713
                 URL: https://issues.apache.org/jira/browse/OAK-4713
             Project: Jackrabbit Oak
          Issue Type: New Feature
          Components: lucene
            Reporter: Chetan Mehrotra
            Assignee: Chetan Mehrotra
            Priority: Minor
             Fix For: 1.6


Currently there are various ways to build Lucene index definition. The approach 
varies from code to code and at level they are working. Like test case working 
at NodeState api, Tree api or higher level Jcr api. To simplify creating index 
definition I would like to add a builder class.

*Usage*

{code}
IndexDefinitionBuilder builder = new IndexDefinitionBuilder();
builder.indexRule("nt:base")
            .property("foo")
                .ordered()
        .enclosingRule()
            .property("bar")
                .analyzed()
                .propertyIndex()
        .enclosingRule()
            .property("baz")
            .propertyIndex();

builder.build(); //Returns NodeState
builder.build(tree); //Copies the definition to tree
builder.build(node); //Copies the definition to JCR Node
{code}



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

Reply via email to