7

I have a search query, in which I want certain a field to return results where its value is empty :

(contentclass:sts_listitem OR IsDocument:True) SPSiteUrl:http://sharepoint2013b:41000/sites/Catalog ListId:e56dfdd7-4f96-4fa5-b4d5-da75fd56aefd (wstaxidMetadataRegion:**EMPTY**) 

How do I do that? Could not see any option from : http://msdn.microsoft.com/en-us/library/ee558911.aspx

3
  • 1
    Do you find any solution ? I search similar query like (StartDate>={Today} or StartDate:EMPTY) Commented Mar 18, 2013 at 13:48
  • No, I just added a default value for my field(that cannot be any possible value for that field in real scenario) and checked with that. Commented Mar 20, 2013 at 5:15
  • Same problem here I want to have (PublishingStartDate <= {Today} OR PublishingStartDate:EMPTY).
    – Marlou
    Commented Jan 15, 2015 at 9:52

3 Answers 3

4

Agnes Molnar has your answer.

http://www.itunity.com/article/filter-empty-values-search-693

For example, I wanted to exclude all expired items without excluding items that have no expiration date.

So based on the referenced example, I added:

-ExpirationTime:1900-01-01..{Today-1}

So any result that does have an expiration date, and whose expiration date is less than today, does not get returned.

3

Something based off whats here already, but put together fully for how I needed it and in case anyone else needs this.

Where a start date is blank or before now and an end date is blank or after now is as follows.

-EndDate:1900-01-01..{Today} -StartDate:{Today}..3000-12-31
2

The only option I found was to do a search as so:

NOT (MetadataProperty:"ABC" OR MetadataProperty:"DEF" OR MetadataProperty:"GHI") and send it Search Query JSON using window.location.href or entering it in the search box

http://MyServer/site/Searchpage.aspx?Default={"k":"NOT (MetadataProperty:\"ABC\" OR MetadataProperty:\"DEF\" OR MetadataProperty:\"GHI\")","r":[]}

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.