我正在使用非常老的Umbraco version 4
,通过检查创建搜索条件,我应该在其中跳过或删除具有null
或0
值的记录。我对此很陌生,所以想知道如何做到这一点。
我正在使用
var query = _searchProvider.CreateSearchCriteria() .NodeTypeAlias(DocTypes.CloudTrigger.ToLowerInvariant()) .And() .Field("regionId", regionId.ToString());
我的检查索引器是
<IndexSet SetName="CloudTriggerIndexSet" IndexPath="~/App_Data/TEMP/ExamineIndexes/CloudTrigger/">
<IndexAttributeFields>
<add Name="id" />
<add Name="nodeName" />
<add Name="updateDate" EnableSorting="true" />
<add Name="writerName" />
<add Name="path" />
<add Name="nodeTypeAlias" />
<add Name="parentID" />
<add Name="level" />
<add Name="sortOrder" EnableSorting="true" />
</IndexAttributeFields>
<IndexUserFields>
<add Name="regionId" />
<add Name="channelId" />
<add Name="channelName" />
<add Name="triggerImage" />
<add Name="triggerImageUrl" />
<add Name="width" />
<add Name="active" />
<add Name="sticky" />
<add Name="keyword" />
<add Name="keywordSplit" />
<add Name="categories" />
<add Name="categorySplit" />
<add Name="vuforiaTargetId" />
<add Name="historyTitle" />
<add Name="historyDescription" />
<add Name="historyImage" />
<add Name="historyImageUrl" />
<add Name="historyIcon" />
<add Name="historyIconUrl" />
<add Name="dontRecordHistory" />
<add Name="umbracoNaviHide" />
<add Name="responseTitles" />
<add Name="responseDescriptions" />
</IndexUserFields>
<IncludeNodeTypes>
<add Name="CloudTrigger" />
</IncludeNodeTypes>
<ExcludeNodeTypes></ExcludeNodeTypes>
</IndexSet>
运行上述查询后,我得到51条记录,其中45条记录没有用,因为它们没有数据。
有人可以帮助我在其中添加任何null或零检查吗?
谢谢。