OOB Lucene Search component- How to exclude a component on page from search | Community
Skip to main content
Level 4
October 16, 2015
Solved

OOB Lucene Search component- How to exclude a component on page from search

  • October 16, 2015
  • 2 replies
  • 683 views

Hi everyone,

 

We are using OOB lucene search component. Currently the search is searching the text in all the components in a page and if the search term matches it returns that page. Because of this for example if we search for word "blog" then our "profile page" appears in search results because "blog" word is present in LEFT RAIL navigation on "profile page".

 

To fix this we added below rule to ignore that component (LEFT RAIL)

<index-rule nodeType="nt:unstructured">

<property isRegexp="true" nodeScopeIndex="false">/jcr:content/configurablemenu/title*</property>

</index-rule>

 

But now after adding this rule lucene is not searching other components like "Rich Text" and "Text" Component (any other component which has text property)

 

Please let me know if you have encountered similar issue. Thanks in advance.

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 Sham_HC

You are using regular expression & hence applies to all. Avoiding it should help. More details at http://wiki.apache.org/jackrabbit/IndexingConfiguration

2 replies

Sham_HC
Sham_HCAccepted solution
Level 10
October 16, 2015

You are using regular expression & hence applies to all. Avoiding it should help. More details at http://wiki.apache.org/jackrabbit/IndexingConfiguration

Level 4
October 16, 2015

Thanks for you reply. Let me try it. By any chance have you worked on similar requirement before.