You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 10 Next »

Abstract

This concept page explains how it would be possible to add solr's faceting possibilities to Magnolia.

Enhancing the existing search with SolR's faceting possibilities

Use Cases

Enabling this, the following use cases could be answered.

 

  • Easy Configuration, adding facets is easy through access to solr fields and teh possibility to facet on evrything that is indexed.
  • Facet/Categorize on all fields submitted to the index and for all content inside the index ( DMS/DATA, WEBSITE, Third party )

  • Do keyword based searches in faceted content, get the current facets for a specific keyword search.
    • The above keyword search gives the associated categories that are available for teh specific search, refining is possible by clicking again on one of the items, for instance  clicking on IT Systems will give us teh only result matching IT-Systems and "Magnolia Presentation".
  • Do range faceting ( price/dates) propose a general search interface for product/e-commerce sites.
  • Be able to provide user context content paths, a diagram on how to use this is available below.

Proposed architecture

We will try to make things as generic as possible, to be able to use as well other search providers, we extend the ExtSearchResultModel Class with the FacetedSearchResultModel Class which will only contain the specific getters/setters for faceting.

 

How do we push the categories to the index ?

Two things have to be distinguished here, content from the website and assets like documents, movies and other stuff.

Content from the website is already picked up by the Heritrix crawler that calls the provider instance through the Extended Search configuration and pushes urls to the solr server which will extract all content and index it.

To add categorization tags, we can add categories to a meta field in the page by adding a script in the HtmlHeader template as follows.

[#assign categories = pageModel.categories!]
[#assign hasCategories = categories?has_content]

[#function getCats itemlist]
    [#-- Assigns: Get Content from List Item--]
    [#local cats = ""]
    [#list itemlist as item]
       [#local itemName = item.@name]
       [#local itemDisplayName = item.displayName!itemName]
       [#local cats = itemDisplayName + "," + cats]
    [/#list]
    [#return cats]
[/#function]


[#if hasCategories]
<meta name="categories" content="${getCats(categories)}"/>
[/#if]


 

 

 

 

 

 

 

 

 

  • No labels