AnsweredAssumed Answered

assign range to content property and search using a value

Question asked by alfredo on May 2, 2008
Latest reply on May 3, 2008 by jpfi
I know there is a way to assign a concrete value to content's property and perform a search for contents that fall within a given range (range queries).

However, I need to be able to do the reverse.  Store a range as content's property and given a value, perform a search of all contents that are applicable.

for example.

I have bunch of content fragments that are targeted specifically to a range of age.  I need to be able to perform a search where given an age (e.g.   age = 19), I can search for all contents that are applicable for that age.

The range of age varies greatly such that a simple taxonomy of age brackets (teens,adult,toddlers, …) would be too limiting and exhaustive list of all variations (0-5, 0-10, 0-16, 18-above, …) would be too daunting. 

I've thought of different ways to solve this problem, but was wondering if Alfresco provides out-of-the-box solution similar to range queries to support this use case.

One solution that I'm contemplating is to utilize an Aspect called "Rangeable" that captures both lower boundary and upper boundary and create a web script that would parse a given value and translate it into a query composed of conditions against the lower boundary AND upper boundary.

Am I heading in the right direction?  Or is there an already provided solution that would meet this use case?  Any other ideas?

Thanks,

Outcomes