cancel
Showing results for 
Search instead for 
Did you mean: 

Lucene search for nodes that DO NOT have Versionable aspect

bengrah
Champ on-the-rise
Champ on-the-rise
Hi guys,

Is it possible to run a Lucene search which returns a list of nodes which don't have the Versionable aspect applied?

We have a rule which automatically versions documents being added, but it looks like this doesn't work when documents are added via a Windows 7 WebDAV drive. I've been trying to write a Lucene query which gets all docs from within a folder that do not have the Versionable aspect, so that way I can retroactively apply it using Javascript:

PATH:"/Folder//*" AND NOT ASPECT:"cm:versionable"

But this tends to return nodes which have the Versionable aspect applied anyway. Anyone have any suggestions here?

Thanks,
ben.
3 REPLIES 3

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

Try using alfrecso FTS and/or try

+PATH:"/Folder//*"  -ASPECT:"cm:versionable"

There a re some bug in the lucene query parser we hhok into for some queries.
Using + - explicitly usually gets by …

Andy

bengrah
Champ on-the-rise
Champ on-the-rise
Hi

Try using alfrecso FTS and/or try

+PATH:"/Folder//*"  -ASPECT:"cm:versionable"

There a re some bug in the lucene query parser we hhok into for some queries.
Using + - explicitly usually gets by …

Andy

Hi Andy,

Thanks for that, I'll give it a shot. Is using FTS any quicker over Lucene any chance?

Cheers,
Ben.

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

The lucene query parser and AFTS query parser both generate lucene queries.
They will generate the same queries - AFTS generates more for you and allows macros etc - and is ours so easy to fix 🙂

As they do the same thing inteh end - the execution speed will be the same.
If you use SOLR they are also cached in the same way.

Andy