Christian Gram

Hi

We are creating a custom webpart for searching specific content types.
The content type contains several yes/no site columns. Our search webpart contains checkboxes to filter on the yes/no columns.

But when I apply a when statement like ¡° WHEN SmokingAllowed=true¡± the result set is empty.
The values are there because the query returns results, without the when statement like this:
¡°SELECT title, URL, SmokingAllowed FROM scope()¡±
Results:
¡°Test, http://testserver/pages/test.aspx, True¡±
¡°Test2, http://testserver/pages/test2.aspx, False¡±

Does anyoneknow how to solve this
Using contains don¡¯t do the trick.

Cheers
Christian


Re: SharePoint - Search Boolean search in FullTextSqlQuery

Christian Gram

I found the sloution

This dont not return any results

¡°SELECT title, URL, SmokingAllowed FROM scope() where SmokingAllowed=true¡±

But this does

¡°SELECT title, URL, SmokingAllowed FROM scope() where SmokingAllowed!=false¡±

in fact onlye expressing using false works

¡°SELECT title, URL, SmokingAllowed FROM scope() where SmokingAllowed=false¡±

statements using =true or !=true do not return the correct results

Hmm I dont understand why Smile







Re: SharePoint - Search Boolean search in FullTextSqlQuery

Will Seitz

I don't know much about Sharepoint, but I think this is because the data model is using a 3 values for a boolean: true, false, and unset (null). Looks like your 'true' values are in fact set to null while your false values are actually false. I have run into code where != false is not the same as =true for this reason.