Sharepoint Forum

Ask Question   UnAnswered
Home » Forum » Sharepoint       RSS Feeds

One Doubton CAML!!

  Asked By: Bob    Date: Jan 28    Category: Sharepoint    Views: 796

I have a small doubt. I am having approximately 60 List (Announcement, Events, and Discussion) located on the entire portal areas and various sub areas. I am trying to get some of the items from each of these list on a web part. But since the number is list and areas on which it reside is huge it takes time to load the page. I am literally no idea about CAML. Can I use it to directly iterate all the list items based on some criteria which I can set on every list.



7 Answers Found

Answer #1    Answered By: Annie Norris     Answered On: Jan 28

You should have a doubt. I don't think that CAML will help you. Querying
60 lists on multiple Areas will perform poorly within a Web Part unless
you centrally cache the data somewhere. This means that you must decide
between performance and freshness of data.

As a side note, lists belong in Webs not Areas.

Answer #2    Answered By: Chadd Hahn     Answered On: Jan 28

I think I have no other option than to implement it…

Answer #3    Answered By: Cheryl Kelley     Answered On: Jan 28

You could write a batch job that crawls the lists and centralizes
the data. That way your Web Part only displays the redundant data real-time.
Much more efficient

Answer #4    Answered By: Kalyan Pujari     Answered On: Jan 28

Just a second thought! Can I use Sharepoint Search API to search top 5 latest List items though all 60 list and display it on the web part at run time? So in this case I don’t need to iterate though all the Areas. What do u suggest on that???

Answer #5    Answered By: Jagdish Joshi     Answered On: Jan 28

If you can return what you are looking for using search, that is certainly a
proven approach.

Answer #6    Answered By: Shara Johnson     Answered On: Jan 28

That would be my option if I am not able to use the Search API to get the list items from the Web. I am looking into the Sharepoint Search API option now!

Answer #7    Answered By: Christop Mcfadden     Answered On: Jan 28

First you have to configure your Portal_content Index's Include and Exclude content to include List items in search results. By default only document library items are indexed. The list is indexed as a whole.

then under "Manage properties of crawled docuemnts" expand urn:......:office and under that select the column(s) you want to be able to search on.

in that page you have to select "Include item details in search results", "Include in Advanced search options" etc.

once you have done this run Full update.

Then in your webpart you can write an SQL like query (you will be querying the content index) for a specific column(s). It will return you all items that match your query in a dataset.

I implemented it in our company and it works fine.

Didn't find what you were looking for? Find more on One Doubton CAML!! Or get search suggestion and latest updates.