You are viewing a plain text version of this content. The canonical link for it is here.
Posted to oak-issues@jackrabbit.apache.org by "Ankit Agarwal (JIRA)" <ji...@apache.org> on 2015/12/16 14:15:46 UTC

[jira] [Updated] (OAK-3800) Lucene spell check index definition can't be restricted to a specific type of node

     [ https://issues.apache.org/jira/browse/OAK-3800?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ankit Agarwal updated OAK-3800:
-------------------------------
    Description: 
While performing a spell check query like

SELECT [rep:spellcheck()] FROM [nt:unstructured]  WHERE [jcr:path] = '/' AND SPELLCHECK('helo')

SpellCheck does not provide any result. In current implementation, spell check in Oak work only for index definitions for nt:base nodetype.
So, an index definition like:

---------------------------------------------------------------
<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"
                        useInSpellcheck="{Boolean}true"/>
                </properties>
            </nt:base>
        </indexRules>
    </lucene-suggest>

-----------------------------------------------------------


works, but if we change nodetype to nt:unstructured like:

------------------------------------------------------------

<lucene-suggest
        jcr:primaryType="oak:QueryIndexDefinition"
        async="async"
        compatVersion="{Long}2"
        type="lucene">
        <indexRules jcr:primaryType="nt:unstructured">
            <nt:unstructured 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"
                        useInSpellcheck="{Boolean}true"/>
                </properties>
            </nt:base>
        </indexRules>
    </lucene-suggest>
------------------------------------------------

, it won't work.

> Lucene spell check index definition can't be restricted to a specific type of node
> ----------------------------------------------------------------------------------
>
>                 Key: OAK-3800
>                 URL: https://issues.apache.org/jira/browse/OAK-3800
>             Project: Jackrabbit Oak
>          Issue Type: Bug
>          Components: lucene
>            Reporter: Ankit Agarwal
>
> While performing a spell check query like
> SELECT [rep:spellcheck()] FROM [nt:unstructured]  WHERE [jcr:path] = '/' AND SPELLCHECK('helo')
> SpellCheck does not provide any result. In current implementation, spell check in Oak work only for index definitions for nt:base nodetype.
> So, an index definition like:
> ---------------------------------------------------------------
> <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"
>                         useInSpellcheck="{Boolean}true"/>
>                 </properties>
>             </nt:base>
>         </indexRules>
>     </lucene-suggest>
> -----------------------------------------------------------
> works, but if we change nodetype to nt:unstructured like:
> ------------------------------------------------------------
> <lucene-suggest
>         jcr:primaryType="oak:QueryIndexDefinition"
>         async="async"
>         compatVersion="{Long}2"
>         type="lucene">
>         <indexRules jcr:primaryType="nt:unstructured">
>             <nt:unstructured 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"
>                         useInSpellcheck="{Boolean}true"/>
>                 </properties>
>             </nt:base>
>         </indexRules>
>     </lucene-suggest>
> ------------------------------------------------
> , it won't work.



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