.NET Tutorials, Forums, Interview Questions And Answers
Welcome :Guest
Sign In
Win Surprise Gifts!!!

Top 5 Contributors of the Month
Gaurav Pal
Post New Web Links

Search multiple document library in Query

Posted By:      Posted Date: December 04, 2010    Points: 0   Category :SharePoint

How to search multiple document library in a sitecollection. these document library has same named : DocLib1, DocLib2, DocLib3 ... they all in a same sitecollection.

How to search document via FullTextSqlQuery or other Search Objects?

If there is another sitecollection structured similiary with this one, how to search all these document library? Can we search all sites documents then use url for filter ?

Thanks a lot.


View Complete Post

More Related Resource Links

Search does not find text in Word document stored in document library on a Report Center site within



We have a document library on a site created off of the Report Center site template. We uploaded a Word 2007 document with the word zebra in the text. Using the search bar at the top of the page we selected This list: Our document library and searched for zebra. We received no results.

We tested the same thing on another site (site template Team site) within the same site collection and search worked fine.

Does the Report Center search function differently then the search functionality on the Team site?

Tamara Bredemus SharePoint Minion...working up to Maven

Content Query Web Part (CQWP) fails to show picture items from a document/picture library in an anon

I have a Picture Library and am trying to use the CQWP to display a list of items in the library.  The web part shows the items fine in authenticated mode, but it fails to show the items to anonymous users. The error log message is: Error while executing web part: System.NullReferenceException: Object reference not set to an instance of an object.     at Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart.SetDocumentIconUrlAndOnClickString(SPWeb web, DataRow row, String strDefaultItemOpen, Boolean fSetDocIcon, Boolean fSetOnClick, String fileRefColumnRef, String progIdColumnRef, String fsobjTypeColumnRef, String permMaskColumnRef)     at Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart.PreProcessForDocumentIconAndOnClickAttribute()     at Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart.AddContentQueryData()     at Microsoft.SharePoint.Publishing.WebControls.ContentByQueryWebPart.GetXPathNavigator(String viewPath)     at Microsoft.SharePoint.WebPartPages.DataFormWebPart.PrepareAndPerformTransform(Boolean bDeferExecuteTransform) I'm running SP 2010.  I've tried various scenarios including: 1. Using the default publishing template. 2. Using the blank site template with publishing and lock down features enabled. 3. Us

How can I get search to work for a Custom Document Library with a few third-party field types?

Hi, Using WSS 3.0 with SQL Server 2008 for Workgroups I have created a Custom Document Library (2,462 files - copied from folder into Explorer view and then renamed using Batch Update in web services i.e. "BaseName" field) - basically it uses three fields that are of "Filtered Lookup" (a field type from a third party). The document library is included in the search (i.e. Advanced Settings), but it displays none of the files - bascially not included in search at all with all testing I have done. I created a new Document Library called "Test" and uploaded a document and it is included in the search. Is there any way I can debug this. Is there a log file? Is there something in the Search Database that might help? Your help would be really appreciated as this is my last issue - and its soooo important to the deliverable. Thanks. John.

How to search documents from the particular document library using FullTextSqlQuery in sharepoint?

Hi, I want search (wildcard search) the document from the particular document library using FullTextSqlQuery class. Thanks Srikanth Reddy

Targeting search to the certain document library in the Advanced Search Box

Advanced Search box have properties fields. How to add there document libraries. I would like to make search to only 1 document library? How to customize?Kenny_I

Search results are not displaying the results related to a particular document library


While using the search box in a site, the search results are not displaying the results related to a particular document library.

What is the reason for this? How can this be solved?

WildCard Search using document library column


Hi there ,is there any step by step instructions on how to make search using custom columns with wildcard i mean ability to make user fill fields for column like

Registration code [and the user type something]

ItemName[and type another word]

then finally press search

what i have did for now is

created custom columns for document library

created a scope for this specific document library

created managed property mapped to crawled property of these columns

edited properties xml and added propertyDef and PropertyRef

installed DotNetMafia wildcard webpart and activated feature and added this webpart to page.

then no searchbox appeart ,what am i missing?


Adding multiple users to a document library column by web service


I'm attempting to create some VB code to call a SharePoint Web Service to add a document and associated metadata to a document library. I can successfully add metadata to a text column but I'm having some problems getting multiple entries into a column which is specified to take multiple users (and does so when they are added manually) although I can get a single user in using the following snippet.

Dim info2 As MySharePoint.FieldInformation = New MySharePoint.FieldInformation()
info2.DisplayName = "Authors"
info2.InternalName = "Authors"
info2.Type = MySharePoint.FieldType.User
info2.Value = "1"

I'm hoping that someone will be able to advise me of the approach or syntax necessary to add multiple users to this Authors column e.g. Users 1 and 74. I note that

info2.Value = "1,74" or info2.Value = "1;74"

don't appear to work.

filter search results to specific document library


Hi all.  I have a sharepoint 2007 subsite, which is a small part of a large corporate sharepoint 2007 system.  I only have admin rights on my chunk.

I would like to limit a search to a specific document library within my subsite, and further would like the search results to return additional non-standard meta-data from this library.

Is this something that I can do without creating a new search scope? 

Why is Sharepoint 2010 standard search no searching within Document library columns



Environment : SharePoint 2010 Enterprise version, using regular search and NOT Fast Search

Standard search is configured and running succesfully and returns results by searching in documents and columns of lists\ calendars and everything else except for Document librarie's columns may it be text or lookup datatype, any clue?



Custom search to document library to find specific document



I have a document library with having multiple folders approx 100 (001 to 100) , each folder is having multiple document ,Every folder in that document library contains 50000 documents , Document library has some fileds like Fname, Lname,Document Type [Look up field] having value(Genral,Average,Advance) . now the problem is to search these documents with using custom search as per requirement

the user wants a webpart where it has 2 textbox [FName and LName] and a dropdown [Document type] and a button , using this the user can enter the first name , last name and selecting document type from the dropdown and finally clicking the search button filters the document library. 

my problem is with that how the value of this search criteria can be passed to the Document library.How these webpart can be connected with custom search or do we have any other way to search.




query to get Items from sub folders in a document library




i am having a document library  MY LIBRARY with SUB Folders SUB 1, SUB 2,SUB 3 ,SUB 4


i need to retreive documents in SUB 1, SUB 2 only

How can i write CAML query for this?

If need to retreive from one sub folder, i am using


qry.Folder = list.ParentWeb.GetFolder("MY LIBRARY /SUB 1");


Thanks and Regards,




External Data Fields in a Word Template saved as a content type in a document library with multiple


I have created a Word Template for a Document Library that has an External Data Column in it of Client Name which also adds Client Address1, Client Address2, Client City, Client State, & Client Zip.  Now this works fine for a Document library with that template as the Template.dotx file. 

I want to be able to make a bunch of Templates and have them all as Content Types in one Library.  When I do this I cannot get the External Data Quick Parts to work.

Anyone have any ideas?

Search query with multiple search feilds



I have a search page with four fields. Each field belongs to columns in the database. None of these fields are mandatory, so user can choose which field/feilds they want to enter. I want the search results to be more specific as they enter values in more than one field.

For example.

First name, Last name, Pin code and Mobile are the 4 search fields.


Any help will be appreciated.

Thank you


failed to upload multiple files to a document library!


I have a document library. I have upload a lots of files by upload multiple documents function several days ago. When I tried to upload some files today. It always failed if I drag a folder into the upload multiple documents dialog.

Drag a folder with any number of files in it to the upload multiple documents dialog. Failed.
Drag files into the upload multiple documents dialog. Sucess.
Create a folder manually, then upload files into the new folder. success.

Anybody have some clues for this problem. Why today I always failed to upload files when I drag a folder?

Thanks very much.

Filter document library based on multiple lookup values



I have a very unique requirement for MOSS 2007.
Lets say there is a list of projects; A, B, C, etc.
Then there are phases of the project: Design, Develop, QA, etc.
When the documents are uploaded to a document library, a project and phase is selected at the time of check-in.
I want to create a project page to show project documents by showing documents for each phase in a different web part: eg. Design web part, Develop web part, etc. all bringing documents from the document library.
So far, all good. This can be created by using web parts, views and filters, etc.
Now, I want to create a custom list with Username, Project, Phase. like this:
User1, Project A, Design
User1, Project A, Develop
User1, Project A, QA
User1, Project B, QA

Now, if User1 goes to this project page for Project A - the user sees documents in all 3 phases.
if user1 goes to Project B - the user sees only QA documents.
I will be ok with just showing and hiding web parts completely.
or showing the web parts, but filtering out the documents. either is fine.

I have tried a combination of filters, CAML, etc. but getting values from a custom list to apply the filter is where I am stumped. I want the custom list as it will be easier for the end user to manage permissions for each user for each project for each phas

Content Query Web Part - Filter Contents of Document Library



I would like to display selective content of document library using content query web part. My document library has multiple folders. I would like to have the content query web part display the contents of one particular folder. And also another content query should display the contents based on a column in the document library. I don't see these options when customizing the query for the content query web part. If this is not possible by default, what is the potentail alternative solution ?



Srikanth Reddy

ASP.NetWindows Application  .NET Framework  C#  VB.Net  ADO.Net  
Sql Server  SharePoint  Silverlight  Others  All   

Hall of Fame    Twitter   Terms of Service    Privacy Policy    Contact Us    Archives   Tell A Friend