Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

Searching Limit

  Asked By: Bhagavati    Date: Sep 19    Category: Sharepoint    Views: 1025

Is it possible to limit the search.Is ther any resource available for
SQL query syntax help and sample code



4 Answers Found

Answer #1    Answered By: Divyesh Hurkadli     Answered On: Sep 19

You can look in the help  file and techNet also has an a few articles.
The online MSDN library has complete documentation.

When you say "limit the search", do you mean limit  the number of items

When using DAV to submit the query  via an xml document,
xmldoc.SetRequestHeader "MS-SEARCH-MAXROWS", "200
will limit the search  to 200 matches.

If you are using the ADO provider, I don't believe there is anyway to limit
the resultset.

After switching to DAV, I found this approach to be faster and more powerful
than ADO.

Answer #2    Answered By: Darryl Nguyen     Answered On: Sep 19

Actually, you can do it with the MSDAIPP.DSO ADO provider with a little

Just set the PageSize property on the RecordSet like this:

With objRecordSet
.Source = strSQL
.ActiveConnection = objConnection
.PageSize = 25

But I agree with Terry that XML & WebDAV is the way to go. Especially
with .NET if you want to stay in managed code.

Answer #3    Answered By: Tom Pruitt     Answered On: Sep 19

Actually my requirement is like this :

I have created five content source index.
some indexex are for Exchange server.And only admin users can see
those links while searching.

My problem is that when a general user queries a word..he also gets
the links for those exchange server files.That I want to restrict.

Is there any method in ADO query  ..so that I can change the query is
such a way that the query itself will exclude the restricted index
links . I mean the query will not return any links for Exchange
server files( or any other resticted folder, Internal web sites etc

Answer #4    Answered By: Sammie Lancaster     Answered On: Sep 19

You'll have to configure each content source's search
scope. (web folders -> content source properties ->
advanced tab). Then you have to configure the search
string's "where" part, so as to search  only within
that scope. The property that stores the scope is ,I

Didn't find what you were looking for? Find more on Searching Limit Or get search suggestion and latest updates.