Press Ctrl / CMD + C to copy this to your clipboard.
This post will be reported to the moderators as potential spam to be looked at
Umbraco 7.
Current query looks like this.
var searchQuery = searchCriteria.Field("nodeName", query).Or().Field("bodyText", query).And().OrderByDescending("createDate");
which works fine but searches all node types. I want it to only search supportDoc doc type.
If I use this. still doesn't seem to work.
var searchQuery = searchCriteria.Field("nodeName", query).Or().Field("bodyText", query).And().Field("nodeTypeAlias", "supportDoc").And().OrderByDescending("createDate");
you can use
searchCriteria.NodeTypeAlias("supportDoc")
you query will be
var searchQuery = searchCriteria.Field("nodeName", query).Or().Field("bodyText", query).And().NodeTypeAlias("supportDoc").And().OrderByDescending("createDate");
is working on a reply...
Write your reply to:
Upload image
Image will be uploaded when post is submitted
Examime + Umbraco 7 Only Search single Node Type
Umbraco 7.
Current query looks like this.
var searchQuery = searchCriteria.Field("nodeName", query).Or().Field("bodyText", query).And().OrderByDescending("createDate");
which works fine but searches all node types. I want it to only search supportDoc doc type.
If I use this. still doesn't seem to work.
var searchQuery = searchCriteria.Field("nodeName", query).Or().Field("bodyText", query).And().Field("nodeTypeAlias", "supportDoc").And().OrderByDescending("createDate");
you can use
you query will be
is working on a reply...