Portal Engine Questions on portal engine and web parts.
Version 6.x > Portal Engine > Exclude linked documents from search View modes: 
User avatar
Certified Developer 11
Certified Developer 11
dfahy@ecentricarts.com - 10/19/2012 3:17:45 PM
   
Exclude linked documents from search
Hi,

I have created a custom web part that uses the SearchHelper.Search method to perform a search on an index that I have built. However I get linked documents returned in the results. I would like the search to not return linked documents. I have tried using -NodeLinkedNodeID:[0 TO 999999999] in the searchFor parameter but this doesn't work.

Any help is appreciated.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 10/21/2012 1:12:52 AM
   
RE:Exclude linked documents from search
Hi,

that term should be used in the Search condition property. Please, take a look on the Smart search results web part and how it passes the Search condition property value to the search control.

Best regards,
Juraj Ondrus

User avatar
Certified Developer 11
Certified Developer 11
dfahy@ecentricarts.com - 10/22/2012 7:48:47 AM
   
RE:Exclude linked documents from search
Thanks Juraj, that helped me figure it out

User avatar
Certified Developer 11
Certified Developer 11
dfahy@ecentricarts.com - 10/22/2012 10:23:50 AM
   
RE:Exclude linked documents from search
I have another search related question. I have a text field called BannerImage which contains the url of an image in the media library. I only want to return results where this field has a value i.e. not empty. I assume a search filter is the way to go but can't figure out the syntax for it. I have set the field to be searchable in the document type

User avatar
Certified Developer 11
Certified Developer 11
dfahy@ecentricarts.com - 10/23/2012 2:29:31 PM
   
RE:Exclude linked documents from search
Anyone?

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 10/24/2012 12:42:33 AM
   
RE:Exclude linked documents from search
Hi,

I am sorry but I am not getting it - if the field is empty, how it can return results? It is the same when you have a text box, which is empty and you search for some word, this text box is not the one which is returned in the search results.


Best regards,
Juraj Ondrus

User avatar
Certified Developer 11
Certified Developer 11
dfahy@ecentricarts.com - 10/24/2012 8:12:43 AM
   
RE:Exclude linked documents from search
Hi Juraj,

Sorry if I'm not clear. I have a doc type that has various fields Title, Description, BannerImage etc. The BannerImage field can be empty so when I do a search I only want doc type records where the BannerImage field is not empty. I'm displaying an image gallery based on search results so if that field is empty then I don't want it returned.

any help is appreciated.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 10/30/2012 8:24:29 AM
   
RE:Exclude linked documents from search
Hi,

What exactly is being saved in the image field? What value? (I am not sure which form control are you using).
It there is some fixed part of the value, it would be possible to use search expression if the field is set to be searchable and tokenized.

Best regards,
Juraj Ondrus

User avatar
Certified Developer 11
Certified Developer 11
dfahy@ecentricarts.com - 10/30/2012 8:27:32 AM
   
RE:Exclude linked documents from search
Hi Juraj,

The value being saved is a string. A url to the image in the media library.The image is selected when on the form tab for the doc type. It can be left empty though.

User avatar
Kentico Support
Kentico Support
kentico_jurajo - 10/30/2012 8:50:52 AM
   
RE:Exclude linked documents from search
Hi,

So, what form control are you using? Or, if you could let me know some sample value so I can give you some particular example on the search condition you should be using.

Best regards,
Juraj Ondrus