Logo 
Search:

Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

How to restrict users from searching a folder

  Asked By: Nirmal    Date: Sep 12    Category: Sharepoint    Views: 2411

I need some suggestion and help on the following issues, which I tried a
lot and as yet not luck:-(



1. I want the search to be restricted to only one group of users
who can search the documents in a particular folder and should not be
searchable to no other user.
2. Is there any way to customize the search page in a way like the
search pages come with a check box in front of it and can there should
be a button , clicking on which will save the checked documents in the
hardisk.
3. I want to customize the search page and use the searching
capabilities of the SPS 2003 with the given parameters through my
controls like, textbox and dropdowns.



Guys I know, seems like too many points I listed above, but these are
the 3 issues for which I have been struggling a lot.

Share: 

 

4 Answers Found

 
Answer #1    Answered By: Rosalie Buckner     Answered On: Sep 12

1) When searching  the results are only returned for files you have
access to. If you don't want certain files returned in the results put
them in a list that the users  don't have access to.

2) & 3) You can develop your own page  and use the SPS Object model to
do a search.

 
Answer #2    Answered By: Carrie Ross     Answered On: Sep 12

but hate to tell you that unfortunately still not
been able to do that..

Can you send some sample code to get the create my own search  web part
and get the output to my own formatted page.



I want to link the search to CVs in the database and on shorlisting of
the searched CVs want to link them to a Job Postion and get upload to a
specific folder.



I can do the rest just want some sample to create my own search webpart
and output of the search on othe my own webpart only.

 
Answer #3    Answered By: Lisa Hill     Answered On: Sep 12

I am looking for the Document Approval routing system in SPS 2003.. I
tried a lot but found nothing..

Can anybody guide me how to do it?

 
Answer #4    Answered By: Bret Warner     Answered On: Sep 12

1. You can change the search  - page  within Frontpage... there you will find the
query... and add the checkBox...


<QueryTemplateSelectPart
xmlns="urn:schemas-microsoft-com:sharepoint:QueryResultBase">SELECT
"DAV:href",
"DAV:displayname",
"DAV:contentclass",
"DAV:getlastmodified",
"DAV:getcontentlength",
"DAV:iscollection",
"urn:schemas-microsoft-com:sharepoint:portal:profile:WorkPhone",
"urn:schemas-microsoft-com:sharepoint:portal:profile:WorkEmail",
"urn:schemas-microsoft-com:sharepoint:portal:profile:Title",
"urn:schemas-microsoft-com:sharepoint:portal:profile:Department",
"urn:schemas.microsoft.com:fulltextqueryinfo:PictureURL",
"urn:schemas-microsoft-com:office:office#Author",
"urn:schemas.microsoft.com:fulltextqueryinfo:description",
"urn:schemas.microsoft.com:fulltextqueryinfo:rank",
"urn:schemas.microsoft.com:fulltextqueryinfo:sitename",
"urn:schemas.microsoft.com:fulltextqueryinfo:displaytitle",
"urn:schemas-microsoft-com:publishing:Category",
"urn:schemas-microsoft-com:office:office#ows_CrawlType",
"urn:schemas-microsoft-com:office:office#ows_ListTemplate",
"urn:schemas-microsoft-com:office:office#ows_SiteName",
"urn:schemas-microsoft-com:office:office#ows_ImageWidth",
"urn:schemas-microsoft-com:office:office#ows_ImageHeight",
"DAV:getcontenttype",
"urn:schemas-microsoft-com:sharepoint:portal:area:Path",
"urn:schemas-microsoft-com:sharepoint:portal:area:CategoryUrlNavigation",
"urn:schemas-microsoft-com:publishing:CategoryTitle",
"urn:schemas.microsoft.com:fulltextqueryinfo:sdid",
"urn:schemas-microsoft-com:sharepoint:portal:objectid"
</QueryTemplateSelectPart>
<QueryTemplateFromPart
xmlns="urn:schemas-microsoft-com:sharepoint:QueryResultBase">
%__scopecatalogs__%</QueryTemplateFromPart>
<QueryTemplateWherePart
xmlns="urn:schemas-microsoft-com:sharepoint:QueryResultBase">where WITH
("DAV:contentclass":0,"urn:schemas.microsoft.com:fulltextqueryinfo:description":\
0,"urn:schemas.microsoft.com:fulltextqueryinfo:sourcegroup":0,"urn:schemas.micro\
soft.com:fulltextqueryinfo:cataloggroup":0,"urn:schemas-microsoft-com:office:off\
ice#Keywords":1.0,"urn:schemas-microsoft-com:office:office#Title":0.9,"DAV:displ\
ayname":0.9,"urn:schemas-microsoft-com:publishing:Category":0.8,"urn:schemas-mic\
rosoft-com:office:office#Subject":0.8,"urn:schemas-microsoft-com:office:office#A\
uthor":0.7,"urn:schemas-microsoft-com:office:office#Description":0.5,"urn:schema\
s-microsoft-com:sharepoint:portal:profile:PreferredName":0.2,contents:0.1,*:0.05\
) AS #WeightedProps
(("urn:schemas-microsoft-com:publishing:HomeBestBetKeywords"= some array
['%__keywordinputnoboundaryquote__%'] RANK BY COERCION(absolute, 999))
OR
(FREETEXT("urn:schemas-microsoft-com:sharepoint:portal:profile:PreferredName",
'%__keywordinput__%') RANK BY COERCION(multiply, 0.01))
OR FREETEXT(#WeightedProps, '%__keywordinput__%') )
AND (%__sourcegroups__%) %__morewhereCondition__%
</QueryTemplateWherePart>


2.) Some query-examples are part of the SDK for Version 2003 like

"The Query method is the entry point for the Web service. The query request
includes a query string. If the query string is a simple list of search terms,
the provider includes those terms in the query. If the query string is specified
with the MSSQLFT dialect, the string is interpreted per the specification for
the Microsoft SQL Syntax for Full-text Search.

Query results are returned in order of relevance rank, descending from most
relevant to least relevant. To specify other sort orders, you must use MSSQLFT
queries and use the SQL SELECT response format.


Example

The following code example shows how to invoke the Query method. This example
assumes that you have established a connection and provided credentials to the
Web service. The queryService variable represents a reference to the Web
service. For an example of how to register with and pass credentials to the Web
service, see the Registration method

const string keywordQueryTemplate = "<?xml version=\"1.0\" encoding=\"utf-8\"
?><QueryPacket xmlns=\"urn:Microsoft.Search.Query\" Revision=\"1000\"><Query
domain=\"QDomain\"><SupportedFormats><Format>urn:Microsoft.Search.Response.Docum\
ent.Document</Format></SupportedFormats><Context><QueryText language=\"en-US\"
type=\"STRING\">query_text_placeholder</QueryText></Context></Query></QueryPacke\
t>";

const string SQLQueryTemplate = "<?xml version=\"1.0\" encoding=\"utf-8\"
?><QueryPacket xmlns=\"urn:Microsoft.Search.Query\" Revision=\"1000\"><Query
domain=\"QDomain\"><SupportedFormats><Format>urn:Microsoft.Search.Response.Docum\
ent.Document</Format></SupportedFormats><Context><QueryText language=\"en-US\"
type=\"MSSQLFT\">query_text_placeholder
</QueryText></Context><Range><StartAt>1</StartAt><Count>5</Count></Range></Query\
></QueryPacket>";

string queryString = SQLQueryTemplate.Replace("query_text_placeholder",
query_text);

// Execute query
string queryResults = null;

try
{
queryResults = queryService.Query(queryString);
}

catch (Exception exp)
{
// Handle exception
}
"

You can find Information about the Query itself in the SPS SDK for Version
2001...

 
Didn't find what you were looking for? Find more on How to restrict users from searching a folder Or get search suggestion and latest updates.




Tagged: