lucene search suggestion Results issue | Community
Skip to main content
Level 2
July 29, 2020

lucene search suggestion Results issue

  • July 29, 2020
  • 2 replies
  • 2148 views

Hi Experts,

 

We are using AEM 6.4.7 with Lucene Search functionality with oak indexing.  When ever the below query runs the suggestions gives results but only 255 characters even though the Description have 500 characters.

 

SELECT [rep:suggest()] FROM [nt:base] AS s WHERE suggest('Our ') AND ISDESCENDANTNODE(s, '/content/path') AND NOT [hideInSearch] = "true" .

 

 Please suggest do we need to add any config to give full sentence of the description.

 

Note: We are indexing pageTitle and Description of the page.

 

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

2 replies

Vijayalakshmi_S
Level 10
July 29, 2020

Hi @prathapm1847112,

Could you please let know the index used when this query is executed.

I assume it to be custom index definition. If yes, can you share the config/property details that you added specific to suggest functionality. 

Level 2
July 29, 2020

Hi Thanks for the reply. We are using custom index for suggestions. Please see the below.

 

Hi VijayaLakshmi,

 

I am using the below custom index.

<my-suggest
jcr:primaryType="oak:QueryIndexDefinition"
async="async"
compatVersion="{Long}2"
evaluatePathRestrictions="{Boolean}true"
excludedPaths="[/rep:policy,/usergenerated,/projects,/campaigns,/phonegap,/mobileapps,/launches,/publications,/entities,/forms,/screens,/communities,/sites,/community-components,/catalogs,/experience-fragments,/we-retail,/oak:index,/install,/packages]"
indexPath="/oak:index/my-suggest"
reindex="{Boolean}false"
reindexCount="{Long}5"
seed="{Long}-4556624132782666122"
type="lucene">
<indexRules jcr:primaryType="nt:unstructured">
<nt:base jcr:primaryType="nt:unstructured">
<properties jcr:primaryType="nt:unstructured">
<pageTitle
jcr:primaryType="nt:unstructured"
analyzed="{Boolean}true"
nodeScopeIndex="{Boolean}true"
useInSuggest="{Boolean}true"/>
<jcr:description
jcr:primaryType="nt:unstructured"
analyzed="{Boolean}true"
nodeScopeIndex="{Boolean}true"
useInSuggest="{Boolean}true"/>
<dcDescription
jcr:primaryType="nt:unstructured"
analyzed="{Boolean}true"
name="dc:description"
nodeScopeIndex="{Boolean}true"
useInSuggest="{Boolean}true"/>
</properties>
</nt:base>
</indexRules>
<suggestions
jcr:primaryType="nt:unstructured"
suggestAnalyzed="{Boolean}true"/>
</my-suggest>

 

Please let me know your thoughts on this.

SundeepKatepally
Community Advisor
Community Advisor
July 30, 2020

we got similar issue , as a workaround i have switched the query from suggestion to search result query