is it possible to make Lucene query in alfresco that finds nodes based on their parent/children properties? For example i want to find all the nodes that have the property "foo" set to '1' and have nodes associated to them by a child association with the property "baz" set to '2' (maybe specifing somehow the name of their child association)
something like
@crl\:numeroAtto:"6555" AND @crl\:firmatario:"Marco rossi"
Where "numeroAtto" is a property of the parent node and "firmatario" is a property of the child. The association type is "firmatari" (It's not in the query because i don't know how to use it)
To be even clearer i'm trying to tell lucene: "Find all nodes that have the property numeroAtto set to 6555 and that have children (association type with the children: firmatari) with the property "firmatario" set to Marco rossi.
Thanx in advance
You can't search on associations, so what we do is not to build slow queries. But add a new d:text property of the association on the parent Type.
So it's searchable through Lucune. To make it fully working, create a Java Behaviour which checks on content update. And when 'your' association is found it adds it to the d:text property.
This way lucene searches are very quick.
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With