cancel
Showing results for 
Search instead for 
Did you mean: 

Searching for nodes with out a property

zezom
Champ in-the-making
Champ in-the-making
I've been trying to return all nodes that don't have a specific property assigned. I've tried all of the combinations below with out the results that I'm after.

model.test = search.luceneSearch("+@custom\\:lifeCycle\\:");
model.test = search.luceneSearch("+@custom\\:lifeCycle:*");
model.test = search.luceneSearch("+ISNULL:\"custom:lifeCycle\"");
model.test = search.luceneSearch("+ISUNSET\\:\"custom:lifeCycle\"");
model.test = search.luceneSearch("ISNULL:\"custom:lifeCycle\"");
model.test = search.luceneSearch("ISNOTNULL:\"cm:lifeCycle\"");
model.test = search.luceneSearch("ISNOTNULL:\"custom:lifeCycle\"");
model.test = search.luceneSearch("ISNULL:\"\@{custom.model\}lifeCycle\"");
model.test = search.luceneSearch("ISNULL:\"custom:lifeCycle\"");
model.test = search.luceneSearch("(ISNOTNULL\\:\"custom\\:lifeCycle\")");
model.test = search.luceneSearch("(ISUNSET\\:\"custom\\:lifeCycle\")");

So to recap, what I want is to find all nodes that doesn't have node.properties['custom:lifeCycle'] value defined.

Thanks,
Ryan Thorburn.
1 REPLY 1

andy
Champ on-the-rise
Champ on-the-rise
Hi

ISNULL will check for no value
ISUNSET will check for no value and that the type/aspect is present

You should be able to use

ISUNSET:"prefix:localname"
ISNULL:"{uri}localname"

Both QName forms are supported for both methods.

Are you sure your model is loaded? If the property is unknown to the DD then it will not find it.

Are you trying to find a node that does not have an aspect defined? You would have to look for one of its mandatory properties.