How to create DOES NOT CONTAIN string using llblgen Filter predicates?

Posts   
 
    
Posts: 15
Joined: 16-May-2012
# Posted on: 24-Aug-2012 11:32:18   

Hello guys, the question would, how to create DOES NOT CONTAIN string condition using llblgen Filter predicates?

i found how to create CONTAINS

return new FieldFullTextSearchPredicate(filterField, FullTextSearchOperator.Contains, filter.Condition.ConditionValue);

AND

return new FieldLikePredicate(filterField, null, "%" + filter.Condition.ConditionValue + "%");

by the way which one is faster from methods listed above? FieldFullTextSearchPredicate this one? simple_smile

was not able to find any DOES NOT CONTAIN in documentation or i just dont understand something.

any help? thank you!

Otis avatar
Otis
LLBLGen Pro Team
Posts: 39749
Joined: 17-Aug-2003
# Posted on: 24-Aug-2012 12:40:49   

Use the overload which accepts a boolean in the 'negate' parameter and specify true for negate:

return new FieldFullTextSearchPredicate(filterField, FullTextSearchOperator.Contains, filter.Condition.ConditionValue, true);

(selfservicing)

fulltextsearch uses the full text search engine in sql server so will be faster than Like which will do a table scan (or an index scan if you have an index on the field, but still is slower than full text search)

Frans Bouma | Lead developer LLBLGen Pro