Portal Engine Questions on portal engine and web parts.
Version 5.x > Portal Engine > Smart Search filter empty fields View modes: 
User avatar
Certified Developer 11
Certified Developer 11
felix.planjer-yellowred - 9/27/2010 4:14:07 AM
   
Smart Search filter empty fields
Hi,

I'm trying to configure Smart Search Results so that if a specific field is empty, the document will not show up in the results. So far I have not been successful.

I've tried to add +fieldname:[* TO *] to the Search condition field , but this does not work . No results are shown.

How can I configure this

regards, Felix

User avatar
Kentico Consulting
Kentico Consulting
kentico_mirekr - 9/29/2010 8:54:01 AM
   
RE:Smart Search filter empty fields
Hi,

It seems that this is not supported in Lucene search engine (used in smart search module), so you would need to use some workaround.

You can set some pre-defined value to your document type field if the field is empty (for example XXXemptyXXX) automatically.

You can achieve this in custom tree node handler in OnBeforeUpdate or OnBeforeInsert events:

http://devnet.kentico.com/docs/devguide/treenode_handler.htm

Then your smart search condition would look like this:

-documentfieldname:XXXemptyXXX

Best regards,
Miroslav Remias.