jackrabbit-users mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Gadbury <gadb...@googlemail.com>
Subject Faceted Search Implementation
Date Mon, 23 Aug 2010 11:08:29 GMT

Hi all,

I am trying to work out a good way to implement faceted search for products
in an ecommerce solution.  Please consider the following diagram which shows
the structure of my categories and products:


I have the following custom node types which implement mix:referenceable so
they eachhave a unique UUID:

- Category (i.e. hardware)
- FacetType (i.e. manufacturer, warranty)
- FacetValue (i.e. amd, intel, samsung, 1 year, 2 years, 3 years)

A product has a number of properties but of importance here are the
following properties which are weak references (a String representing the
UUID(s) ) to the nodes Category and FacetValue:

- categoryUUIDs
- facetvalueUUIDs

Currently I am tracking the facet type values the user has selected and
adding them to a query, which retrieves the relevant products.  This works
although it may be slow with many products!  Here is an example of the XPath

jpg:product)[@jpg:categoryUUIDs='d93681a3-8b4e-4c2a-9dcb-a219848f8f3a' and
((@jpg:facetvalueUUIDs='70588aa9-6cb1-4ee1-af95-a21f78968e74') and
(@jpg:facetvalueUUIDs='bec141e8-f4c5-41c5-9cef-560dab296750'))] order by

Once the query is executed, I am iterating over all products, and getting:

each unique facet type UUID and name
each unique facet value UUID and name
a count of each occurence of a facetValueUUID

This data is presented back to the user to offer them a selection of facets
to filter by.  For example:

amd [2]
intel [3]
samsung [5]

1 year [3]
3 years [7]

I know this works but I am sure there must be a more efficient / refined way
to do this... perhaps I am completely misunderstanding Jackrabbit and how to
get the most out of Lucene.  Is there another way that I should consider
doing this?  I would really appreciate any suggestions / improvements.

Thanks for reading and kind regards,

View this message in context: http://jackrabbit.510166.n4.nabble.com/Faceted-Search-Implementation-tp2334944p2334944.html
Sent from the Jackrabbit - Users mailing list archive at Nabble.com.

View raw message