cancel
Showing results for 
Search instead for 
Did you mean: 

assign range to content property and search using a value

alfredo
Champ in-the-making
Champ in-the-making
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,
2 REPLIES 2

sdavis
Champ in-the-making
Champ in-the-making
Interesting use case.  As you've already determined, there's nothing OOTB for this.

An aspect / web script is exactly the route I'd start with to prototype something.

jpfi
Champ in-the-making
Champ in-the-making
Hi,
perhaps it is nice way using categories here like teens, adult, toddlers… and just add the category to the document. In Alfresco 2.9 you get an category browser in the webclient or simply write a little category browser webscript: http://forge.alfresco.com/plugins/scmsvn/viewcvs.php/opsoro/trunk/source/web/webScripts/opsoro/categ...
Cheers, Jan