Jahia in English > Limiting Jahia search...

0 (0 Good)
0 (0 Bad)

Limiting Jahia search results to pages

by  douglascummings »  2013/10/07 22:15

We are using Lucene to index our site and many of the results returned are to the containers not the pages the containers are on. If a user clicks on one of these links they lose the context of the site and see only the container. Does anyone know how to limit the search results to page level links?

  • Limiting Jahia search results to pages
    2013/10/07 22:15

    douglascummings <p> We are using Lucene to index our site and many of the results returned are to the containers not the pages the containers are on. If a user clicks on one of these links they lose the context of the site and see only the container. Does anyone know how to limit the search results to page level links?</p>

  • Number of messages  1
    Registration date Oct 7, 2013
    0 (0 Good)
    0 (0 Bad)

    Re: Limiting Jahia search results to pages

    by  shyrkov »  2013/10/11 07:21

    Hello,

    could you please provide some more details on how you execute the search?

    Kind regards

    Sergiy

  • Re: Limiting Jahia search results to pages
    2013/10/11 07:21

    shyrkov <p> Hello,</p> <p> could you please provide some more details on how you execute the search?</p> <p> Kind regards</p> <p> Sergiy</p>

  • Number of messages  407
    Registration date Oct 11, 2013
    0 (0 Good)
    0 (0 Bad)

    Re: Limiting Jahia search results to pages

    by  pap@commaro.com »  2013/12/06 16:30

    Hello,

    for each hit Jahia checks whether the nodetype has a template assigned, so it can be displayed on its own. If not, we iterate up the parents until we find a node, which has a template, most often it is the page.

    In ACME-SPACE demo you can see that for instance a jnt:news node can be displayed on its own (by clicking on the news URL), although it is not a jnt:page type. There is a news-template with applyOn="jnt:news", which is taken. In contrast a jnt:event node cannot be displayed in its own template, but is always displayed on the events page within the filtered events list. Like that there would always be just one hit to the events page, even if multiple events would be found with the same search keyword. Therefore we added a rule (events module's rules.drl file) to modify the search hit URL by adding query parameters for the events page to display the right date and UUID of the found event. That way each found event has its distinct URL and therefore all found events get listed in the search result list.

    So in your case it looks like you have templates defined for your containers, so that the URL points to them directly instead of the page.

    Regards,
    Benjamin

    Benjamin Papez (pap@commaro.com)

    Number of messages  220
    Registration date
    Contact
    Share
    Feedback

    Get in touch

    Whether you are a current user or if you are just evaluating Jahia, we are here to help.

    Contact us

    Share this page