Ok, the following approach should work then:
var searchText = SearchSyntaxHelper.CombineSearchCondition("foo bar",
new SearchCondition
{
DocumentCondition = new DocumentSearchCondition
{ClassNames = "custom.mypagetype", Culture = "en-US"},
ExtraConditions =
SearchSyntaxHelper.GetRequiredCondition(
SearchSyntaxHelper.GetFilterCondition("MyField", "foo something"))
});
SearchParameters searchParameters = SearchParameters.PrepareForPages(searchText, searchIndexes, pageNumber, pageSize, searchUser, cultureCode, combineWithDefaultCulture);
The code above will search for:
- all documents of "custom.mypagetype" page type AND "en-US" culture
- AND have something of "foo bar" in CONTENT field (you may leave this string empty for your case)
- AND "foo something" in "MyField" field (you may need to try
"\"foo something\""
instead)