none
SharePoint Search to Only Include List Items RRS feed

  • Question

  • Hi all,

    Was wondering if anyone new a way to only include list items when searching. Currently search returns list items and lists that contain a keyword.

    I know i will have to create a custom scope but not much after that.

    Any help at all would be greatly appreciated.

    -C

    • Moved by Mike Walsh FIN Wednesday, November 24, 2010 3:37 AM search q (From:SharePoint - General Question and Answers and Discussion (pre-SharePoint 2010))
    Tuesday, November 23, 2010 9:58 PM

Answers

  • hi Florin,

    I was able to return only list items by using the following:

    EXCLUDE:            contentclass = STS_List_GenericList

     

    However, on one of my site collections now the search seems to be returning duplicate entries for the same item. The same item seems to be returning different modified dates as shown below 

     

    New Client Relationships - Know Your Intermediary "KYI"

    KYC completed

    http://testing.net/Lists/Execution Handbook/DispForm.aspx?ID=30 - Florin Duca (12345) - 20/11/2010

    New Client Relationships - Know Your Intermediary "KYI"

    KYC completed

    http://testing.net/sites/spqpcjjd/Lists/Execution Handbook/DispForm.aspx?ID=30 - Florin Duca (12345) - 21/11/2010

     When I click on the item's link the modified date being returned is

    Last modified at 11/11/2010 14:02  by John Smith (12346)

     

    Any ideas on why this might be or how to resolve?

     

    Thanks so much as always!

     

    -Chris  

    • Marked as answer by CHRISHERN Wednesday, January 12, 2011 4:18 PM
    Friday, November 26, 2010 3:49 PM

All replies

  • After that you must create include rule base on the content class. Here is a guide that should help you http://blog.3i-solutions.nl/2008/01/creating-search-scopes-based-on.html. If you only want list items, you shoudl use the content class STS_ListItem but also STS_ListItem_DocumentLibrary if you want to see document also.

    To really see the content class of items in the search results, what I used to do is simply add contentclass (or content_class can't remember exactly) in the display of the core results web part. It simplifies the task of identifying the items to keep/exclude.


    Florin DUCA - MCSE 2003 +Sec,MCTS conf/dev WSS3/MOSS, MCITP/MCPD SP 2010, MCPD ASP.Net 3.5, MCTS ISA 2006 - Logica Business Consulting, France
    Tuesday, November 23, 2010 10:49 PM
  • hi florin,

    thanks for the response...i have implemented the STS_ListItem and included it...it still is returning the complete list in search results...i am trying to just include list entries..

    any ideas?

    thannks again

    -C

    Wednesday, November 24, 2010 5:29 PM
  • Hello,

    Are you sure that you use the correct search scope?

    What do you use to see the search results (the standard _layouts page (osssearchresults...) or a search center)?

    You could use a tool like SPSearchBench (http://spsearchbench.codeplex.com/) to test queries (so to be sure you use the correct scope).


    Florin DUCA - MCSE 2003 +Sec,MCTS conf/dev WSS3/MOSS, MCITP/MCPD SP 2010, MCPD ASP.Net 3.5, MCTS ISA 2006 - Logica Business Consulting, France
    Thursday, November 25, 2010 9:44 AM
  • hi Florin,

    I was able to return only list items by using the following:

    EXCLUDE:            contentclass = STS_List_GenericList

     

    However, on one of my site collections now the search seems to be returning duplicate entries for the same item. The same item seems to be returning different modified dates as shown below 

     

    New Client Relationships - Know Your Intermediary "KYI"

    KYC completed

    http://testing.net/Lists/Execution Handbook/DispForm.aspx?ID=30 - Florin Duca (12345) - 20/11/2010

    New Client Relationships - Know Your Intermediary "KYI"

    KYC completed

    http://testing.net/sites/spqpcjjd/Lists/Execution Handbook/DispForm.aspx?ID=30 - Florin Duca (12345) - 21/11/2010

     When I click on the item's link the modified date being returned is

    Last modified at 11/11/2010 14:02  by John Smith (12346)

     

    Any ideas on why this might be or how to resolve?

     

    Thanks so much as always!

     

    -Chris  

    • Marked as answer by CHRISHERN Wednesday, January 12, 2011 4:18 PM
    Friday, November 26, 2010 3:49 PM
  • Maybe you should launch a crawl ot ensure the index is up to date.

    If this doesn't solve things, you could try using this debug XSL to view the XML with the search results http://msdn.microsoft.com/en-us/library/ms546985(office.12).aspx. (if you changed the XSL of the results web part)

    You could also look with SPSearchBench to see waht items are in the index.

    PS:Changing the scope will have no effect on the managed metadata.


    Florin DUCA - MCSE 2003 +Sec,MCTS conf/dev WSS3/MOSS, MCITP/MCPD SP 2010, MCPD ASP.Net 3.5, MCTS ISA 2006 - Logica Business Consulting, France
    Friday, November 26, 2010 3:57 PM
  • Hi CHRISHERN,

     

    I tired to return perticular list items in enterprise search.

    but not able to do that..

     

    Please help.

     

    Thanks in advance..


    Accept Pain, life will be easy !!
    Monday, November 21, 2011 9:30 AM