Hi folks, I'm using a Lucene picker to select items of a specific document type. Using Lucene instead of XPath so that I can select from unpublished nodes as well as those in the publish cache.
Just wondering if its possible with RawQuery to exclude the current node from the selection.
IE. My Raw query is "+nodeTypeAlias:MyDocumentType"
All of my nodes are of type "MyDocumentType", so I'd like to be able to populate my nuPickers list with all items of type "MyDocumentType" except for the node I'm currently editing.
I was able to do it in an XPath picker with "//MyDocumentType[not(@id=$ancestorOrSelf/@id)]" Is this possible with lucene?
Hmm if not with a Lucene picker then how about with a dotnet picker? Haven't looked into them yet but assuming I can use it to populate the list using ContentService. Can I work out what my current node is from there so I can exclude it?
Lucene picker syntax question
Hi folks, I'm using a Lucene picker to select items of a specific document type. Using Lucene instead of XPath so that I can select from unpublished nodes as well as those in the publish cache.
Just wondering if its possible with RawQuery to exclude the current node from the selection.
IE. My Raw query is "+nodeTypeAlias:MyDocumentType"
All of my nodes are of type "MyDocumentType", so I'd like to be able to populate my nuPickers list with all items of type "MyDocumentType" except for the node I'm currently editing.
I was able to do it in an XPath picker with "//MyDocumentType[not(@id=$ancestorOrSelf/@id)]" Is this possible with lucene?
There is an enhancement ticket #103 from 2015 on the nuPicker github for this. However, I don't think its been implemented.
Ver
Hmm if not with a Lucene picker then how about with a dotnet picker? Haven't looked into them yet but assuming I can use it to populate the list using ContentService. Can I work out what my current node is from there so I can exclude it?
Ok so answered my own question.. looks like the ContextID passed into DotNetDataSource is the current node ID. yay!
is working on a reply...