content management system - Search Magnolia returning 0 results -
search magnolia returning 0 results
hello everyone,
i trying follow this documentation to create internal search engine on template, can't search results.
at moment created my indexing_configuration.xml to search in components , areas:
tags
<index-rule nodetype="nt:hierarchynode"> <property boost="10" useinexcerpt="false">title</property> <property boost="1.0" useinexcerpt="true">text</property> <!-- exclude jcr:* , mgnl:* properties --> <property isregexp="true" nodescopeindex="false" useinexcerpt="false">.*:.*</property> </index-rule> <index-rule nodetype="mgnl:contentnode"> <property boost="5" nodescopeindex="false" useinexcerpt="false">title</property> <property boost="2" nodescopeindex="false" useinexcerpt="true">text</property> <!-- exclude jcr:* , mgnl:* properties --> <property isregexp="true" nodescopeindex="false" useinexcerpt="false">.*:.*</property> </index-rule> <!-- index text content on paragraphs. can configured using nodetypes only? --> <aggregate primarytype="mgnl:content"> <!-- aggregates content on main column --> <include primarytype="mgnl:contentnode">nomeoftheareanode/*</include> </aggregate> <aggregate primarytype="mgnl:page"> <include primarytype="mgnl:area">*</include> <include primarytype="mgnl:component">*</include> </aggregate> <!-- areas can nested. see http://wiki.apache.org/jackrabbit/indexingconfiguration recursion --> <aggregate primarytype="mgnl:area" recursive="true"> <include primarytype="mgnl:component">*</include> <include primarytype="mgnl:area">*</include> </aggregate> <!-- index metadata attributes inside main node, allow sorting! --> <aggregate primarytype="mgnl:content"> <include>mgnl:creationdate</include> <include-property>metadata/mgnl:creationdate</include-property> </aggregate> <aggregate primarytype="mgnl:content"> <include>mgnl:lastmodified</include> <include-property>metadata/mgnl:lastmodified</include-property> </aggregate> <aggregate primarytype="mgnl:content"> <include>mgnl:template</include> <include-property>metadata/mgnl:template</include-property> </aggregate>
and modified param indexingconfiguration on jackrabbit-memory-search.xml
and on template used ftl on documentation as:
[#-------------- assignments --------------] [#assign querystr = ctx.getparameter('querystr')!?html] [#-------------- rendering --------------] [#if content.headline?has_content] <h2>${content.headline}</h2> [/#if] [#if querystr?has_content] [#assign searchresults = searchfn.searchpages(querystr, '/home') /] [#assign recordsfound = searchresults?size /] <h3><em>${recordsfound}</em> ${i18n['search.pagesfoundfor']} "${querystr}"</span></h3> <div class="list-group"> [#if searchresults?has_content] [#list searchresults item] <a href="${cmsfn.link(item)}" class="list-group-item"> <h4 class="list-group-item-heading">${item.title!}</h4> <p class="list-group-item-text">${item.excerpt!}</p> </a> [/#list] [/#if] </div> <#-- more processing here, not shown in snippet > [/#if]
on workspace website i'm using tree create structural site. @ moment home->main
thanks in advance. coding!!!
ps.: need change on magnolia.properties use it? i'm using mysql database so, jackrabbit-bundle-mysql-search.xml jackrabbit.config on magnolia.properties
Comments
Post a Comment