I want to check for null or empty field in fql query , I want to add condition to retrieve result when is column not equal empty or null, I've tried these ways :
<Context>
<QueryText language='en-US' type='FQL'>and(string("Text"),not(Column_Name:equals(" ")))
</QueryText>
</Context>
<Context>
<QueryText language='en-US' type='FQL'>and(string("Text"),filter(Column_Name:not(" ")))
</QueryText>
</Context>
I also tried "^$" regular expression instead of empty string , but doesn't work .
any ideas ??
Think of the index as a key/value lookup. If you check the index of a regular (paper) book, there are no blank entries. I.e. there is no entry in the index that gives you all the pages containing . The search index works the same way. There is no way to query for an empty value.
A common technique is to initialize your fields with some default value like, NODATA. If the field is never written to, it contains NODATA and you know it is empty.