Currently, we have a simple Content Search web part which pulls data from ListA, but also want to pull data from ListB, so in this Content Search web part, the result will show data from ListA+ListB.

I did some research, it looks like feasible. I am new to SharePoint, not sure if this is the right approach. Right now we have this in the web part's query text:

contentclass:"STS_ListItem" ListID:"ListA ID"

I am guessing the combined query would be something like:

contentclass:"STS_ListItem" ListID:"ListA ID" OR ListID:"ListB ID"

Am I on the right track? Any suggestions?

Thank you.


Yes, you are on the right track. Just write you search query carefully. Write your query something like this:

contentclass:STS_ListItem AND (path:http://SiteURL/sites/hub/Lists/List1 OR path:http://SiteURL/sites/hub/Lists/List2 OR path:http://SiteURL/sites/hub/Lists/List3 OR path:http://SiteURL/sites/hub/Lists/List4)

For more information, you can refer this link: How to get data from multiple table or list in SharePoint 2013?.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.