0

I need to achieve a query where RefinableDate00 must be earlier than today

RefinableDate00:1900-01-01..{Today}

but also should not be null since if it is null, the result I want does not appear in the search. RefinableDate00 has mapped property that is a custom column and the column doesn't exists in some lists so the value return null I believe ANDNOT operator is what I need or it would be good if we can create something like if condition

(contentclass:STS_List OR contentclass:STS_List_DocumentLibrary OR contentclass:STS_List_PictureLibrary) {SearchBoxQuery} AND (-RefinableDate00:1900-01-01..{Today}) AND (RefinableString00=True)

I expect results earlier than today, and results that RefinableDate00 might be equal

2
  • it would be helpful if you provide a sample input table using the datatable operator and the expected output.
    – rony l
    Commented Sep 15, 2021 at 16:14
  • I am pretty noob here, but I added my query, I only want results earlier than today but since not all lists have that date field, items don't have that column don't return
    – Ozan Mudul
    Commented Sep 15, 2021 at 16:19

1 Answer 1

1

Maybe you mean this operator: <>

3
  • Isn't this not equal operator?
    – Ozan Mudul
    Commented Sep 17, 2021 at 10:50
  • I think Yes. <> - Returns search results where the property value does not equal the value specified in the property restriction. github.com/SharePoint/sp-dev-docs/blob/master/docs/… Commented Sep 20, 2021 at 8:14
  • 1
    Though it doesn't work if the value is null. I made a workaround like this: -RefinableDate00:{Today}..3000-12-12, this means if not in between today and 3000 so I can show null values and days before today. Still if you have better solutions I would like to hear cuz this looks brute force
    – Ozan Mudul
    Commented Sep 20, 2021 at 11:33

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.