Index configuration for excluding properties from fulltext search results | Community
Skip to main content
Sudheer_Sundala
October 16, 2015
Solved

Index configuration for excluding properties from fulltext search results

  • October 16, 2015
  • 5 replies
  • 2303 views

Requirement: To exclude few properties on component nodes under jcr:content node so that when fulltext search is performed, query ignores Nodes/pages which matches with fulltext search term of excluded properties term.

Index configuration created as below:

Created Index under: /content/projectname/www/en-us/locations/

<oak:index
        jcr:mixinTypes="[rep:AccessControllable]"
        jcr:primaryType="nt:unstructured">
        <sdpPageContentLucene
            jcr:primaryType="oak:QueryIndexDefinition"
            async="async"
            compatVersion="{Long}2"
            includePropertyTypes="[String,Binary]"
            reindex="{Boolean}false"
            reindexCount="{Long}19"
            type="lucene">
            <aggregates jcr:primaryType="nt:unstructured">
                <cq:PageContent jcr:primaryType="nt:unstructured">
                    <include0
                        jcr:primaryType="nt:unstructured"
                        path="*"
                        relativeNode="{Boolean}false"/>
                    <include1
                        jcr:primaryType="nt:unstructured"
                        path="*/*"
                        relativeNode="{Boolean}true"/>
                    <include2
                        jcr:primaryType="nt:unstructured"
                        path="*/*/*"
                        relativeNode="{Boolean}true"/>
                    <include3
                        jcr:primaryType="nt:unstructured"
                        path="*/*/*/*"
                        relativeNode="{Boolean}true"/>
                </cq:PageContent>
            </aggregates>
            <indexRules jcr:primaryType="nt:unstructured">
                <cq:PageContent jcr:primaryType="nt:unstructured">
                    <properties jcr:primaryType="nt:unstructured">
                        <serviceslabel
                            jcr:primaryType="nt:unstructured"
                            analyze="{Boolean}false"
                            index="{Boolean}false"
                            name="jcr:content/comp1/serviceslabel"
                            nodeScopeIndex="{Boolean}false"
                            type="String"/>
                        <text
                            jcr:primaryType="nt:unstructured"
                            analyze="{Boolean}false"
                            index="{Boolean}false"
                            name="jcr:content/comp2/text"
                            nodeScopeIndex="{Boolean}false"
                            type="String"/>
                    </properties>
                </cq:PageContent>
            </indexRules>
        </sdpPageContentLucene>
    </oak:index>

I have tried creating same index configuration under /oak:index, Lucene is not even considering my index in that case. Also, I have tried all the combinations of index=true/false, nodeScopeIndex=true/false and analyze=true/false.

I am not sure where am I going wrong with this index configuration. Can we influence query results by creating indexes or indexes just to run queries faster?

I have read "http://jackrabbit.apache.org/oak/docs/query/lucene.html" documentation many times to figure out the issue but no luck so far.
I would be great if I can get some help on this requirement.
Our current production systems are running on AEM 6.0 with JCR 2.x and I was able to achieve this requirement by using indexing_config.xml configuration.

This post is no longer active and is closed to new replies. Need help? Start a new post to ask your question.
Best answer by ogill

Hi Sudheer,

I would raise a daycare ticket referencing OAK-2281, asking for this feature. If there is enough demand, engineering will look into it.

Regards,

Opkar

5 replies

ogillAdobe EmployeeAccepted solution
Adobe Employee
October 16, 2015

Hi Sudheer,

I would raise a daycare ticket referencing OAK-2281, asking for this feature. If there is enough demand, engineering will look into it.

Regards,

Opkar

Adobe Employee
October 16, 2015

Hi Sudheer,

are you using AEM6 with CRX2? If so, this will not use the new OAK repository and all it's indexing features. Your previous indexing config should still work.

Regards,

Opkar

Sudheer_Sundala
October 16, 2015

Hi,

We are working on AEM 6.1 with OAK Lucene migration project. Our existing production systems are on AEM 6.0 with CRX2 and we don't have any issues on production system.

My query is on how to get same indexing and query filtering get working on AEM 6.1 with OAK Lucene. 

OOTB Search functionality is one of our very big migration issue currently.

Sudheer_Sundala
October 16, 2015

Thanks Opkar.

Adobe Employee
October 16, 2015

Sorry Sudheer, misunderstood, it appears there was "excludePropertyNames" [1] in OAK until version 1.0.9

Also there is an open ticket [2] for conditional indexing rules, is that what you are looking for?

[1] http://jackrabbit.apache.org/oak/docs/query/lucene-old.html

[2] https://issues.apache.org/jira/browse/OAK-2281