Don't miss out Virtual Happy Hour this Friday (April 26).

Try our conversational search powered by Generative AI!

File search in specific folder - SearchLocations

Vote:
 

Is there any way I can get the EPiServer search (SearchDataSource) to search only in a specific "PageFiles" folder? I've tried to set the SearchDataSource.SearchLocations = "~/PageFiles/112/", but then I get an "Object not set to an instance..." error when I try to bind the result.

Any suggestions?

#42608
Aug 27, 2010 9:46
Vote:
 

I don't think that is possible, but you could filter the result collection and delete unwanted PageFiles links. But that is maybe not the best performance optimisation advice this year :-)

#42609
Aug 27, 2010 9:57
Vote:
 

Hm, I would rather avoid filtering the whole collection afterwards, but maybe there's no other option using the SearchDataSource... :-)

#42641
Aug 27, 2010 15:21
Vote:
 

Well, you can always add some timers in the code and find out actually how much time the filtering takes...

How much traffic is it on the site and how many searches are executed per hour etc,

The best thing, I guess, would be not use that pagefile folder at all, but instead create a new dedicated vpp for these douments you want to search for....

In any case, good luck :-)

#42660
Aug 27, 2010 18:22
Vote:
 

Finally we've decided to create a new vpp folder for the uploads, thanx for the advice!

 

 

#42779
Edited, Sep 01, 2010 9:52
* You are NOT allowed to include any hyperlinks in the post because your account hasn't associated to your company. User profile should be updated.