Monday, October 06, 2008

FTSearch on empty field

I'm facing with problem where I should get collection of documents with empty field. It means that query should look like this
set col = db.FTSearch({[myField] = ""}, 0)
We know that it does not work at all, but there is a trick
set col = db.FTSearch({not [myField] is present}, 0)

2 comments :

Unknown said...

A very very useful piece of information.

Thank you for sharing it :).

Cheers,
JuanMi

Anonymous said...

Thanks!