Vikas Saurabh created OAK-3156:
----------------------------------

             Summary: [OAK] Lucene suggestions index definition can't be 
restricted to a specific type of node
                 Key: OAK-3156
                 URL: https://issues.apache.org/jira/browse/OAK-3156
             Project: Jackrabbit Oak
          Issue Type: Bug
          Components: lucene
            Reporter: Vikas Saurabh


In current implementation, 
[suggestions|http://jackrabbit.apache.org/oak/docs/query/lucene.html#Suggestions]
 in Oak work only for index definitions for {{nt:base}} nodetype.
So, an index definition like:
{code:xml}
    <lucene-suggest
        jcr:primaryType="oak:QueryIndexDefinition"
        async="async"
        compatVersion="{Long}2"
        type="lucene">
        <indexRules jcr:primaryType="nt:unstructured">
            <nt:base jcr:primaryType="nt:unstructured">
                <properties jcr:primaryType="nt:unstructured">
                    <description
                        jcr:primaryType="nt:unstructured"
                        analyzed="{Boolean}true"
                        name="description"
                        propertyIndex="{Boolean}true"
                        useInSuggest="{Boolean}true"/>
                </properties>
            </nt:base>
        </indexRules>
    </lucene-suggest>
{code}
works, but if we change nodetype to {{dam:Asset}} like:
{code:xml}
    <lucene-suggest
        jcr:primaryType="oak:QueryIndexDefinition"
        async="async"
        compatVersion="{Long}2"
        type="lucene">
        <indexRules jcr:primaryType="nt:unstructured">
            <dam:Asset jcr:primaryType="nt:unstructured">
                <properties jcr:primaryType="nt:unstructured">
                    <description
                        jcr:primaryType="nt:unstructured"
                        analyzed="{Boolean}true"
                        name="description"
                        propertyIndex="{Boolean}true"
                        useInSuggest="{Boolean}true"/>
                </properties>
            </nt:base>
        </indexRules>
    </lucene-suggest>
{code}
, it won't work.



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

Reply via email to