> From what I can tell on the generic skin, faceted search 
> for Solr is being done by specially-formatted query input. Are there 
> front-end components to allow for user-friendly faceted search? 

Indeed there are. And yes it's from additional query parameters making
it every request restful (and therefore more easily cachable).

Facets fall under the whole navigation umbrella which includes paging,
sorting, ranges, etc etc.

Our Navigation model is primarily the view domain functionality and
configuration. 

A simple navigation, from views.xml, is the paging example (which often
looks the same on every tab)

        <navigation>
            <navigation id="offset">
                <result-paging id="offset" command-name="globalSearch" 
page-size="10" number-of-pages="10"/>
            </navigation>
        </navigation>

At the end of the request (RunningQuery) all the navigations configured
are run from the hardcoded NavigationRunHandler. In this example this
runs the ResultPagingNavigationController. This class looks through the
command referenced (globalSearch) and creates a list NavigationItem
(which is much like a ResultItem) each representing a page with the
various information about the page including a link with the required
query parameters to display that page.

So all this "paging" information is available in the datamodel under
${DataModel.navigation.navigations['offset']}
You can see this in practice by looking at offsetPager.jsp in the
sesam.com skin.

How the link information is generated is dynamic inside each
NavigationController coming from the context with a UrlGenerator
instance. See inside NavigationRunHandler for how the specific
UrlGenerator is constructed. The default is BasicUrlGenerator but can be
configured in the navigation element. There's implementations also of
TreeUrlGenerator, and a complex specific example NewsCaseUrlGenerator.
BasicUrlGenerator just works with parameter key=value pairs inserting
them into the url.

NewsCaseUrlGenerator is an example that generates pretty urls (no query
string exists in the url). This works alongside "pretty url" rules in
urlerwrite.xml


But it gets a whole lot more complicated and flexible, if you want it
to. There's some good starting documentation here
http://sesat.no/navigation-documentation.html
It's old already, as documentation almost always is, so some minor
things may have changed. For example ExtendedNavigator is now a
NavigationItem.


> Is there a somewhat complete example of a Solr-supporting skin 
> available? Either deployed online somewhere or as code I can run?

Unfortunately not yet. I haven't yet had the time to, despite it often
coming up as the next valuable working example after sesam.com's yahoo
search (maybe alongside a google search).
The closest documentation we have is how to set up query evaluation with
a custom solr index. 

~mck


-- 
"If you want to know what a man's like, take a good look at how he
treats his inferiors, not his equals." J K Rowling 
| semb.wever.org | sesat.no | finn.no |
-- 
"Do not seek to follow in the footsteps of those of old - seek what they
sought." Matsuo Basho 
| semb.wever.org | sesat.no | finn.no |

Attachment: signature.asc
Description: This is a digitally signed message part

_______________________________________________
Kernel-development mailing list
[email protected]
http://sesat.no/mailman/listinfo/kernel-development

Reply via email to