문제

새로운 교차 사이트 게시 및 검색 기능을 사용하여 SharePoint 2013 웹 사이트를 구축하고 있습니다. 우리는 모든 페이지 콘텐츠 형식에있는 관리되는 메타 데이터 필드가있는 관리되는 메타 데이터 필드를 사용하여 컨텐츠 검색 웹 파트를 사용하여 "관련 항목"기능을 구현하려고합니다. 따라서 콘텐츠 (카탈로그 항목)는 콘텐츠 항목의 지리적 관련성을 설명하기 위해 "위치"필드로 태그 될 수 있습니다.

콘텐츠 검색 웹 파트 (및 콘텐츠 재사용 웹 파트)를 사용하는 카탈로그 항목 페이지가있는 경우 기본 페이지 정보를 표시하는 것이 가능 한 다음 다른 콘텐츠 검색 웹 파트를 페이지에 추가하는 페이지에 데이터를 사용하는 페이지에 추가합니다. 주요 쿼리 (즉, 위치 필드의 내용)를 사용하여 다른 검색을 실행하여 동일한 위치와 일치하는 다른 모든 컨텐츠를 가져옵니다. 우리의 컨텍스트에서 위치 필드는 여러 값을 허용하므로 여러 항목에도 이상적으로 일치시킬 수 있습니다.

콘텐츠 쿼리 웹 파트를 사용하여 2010 년 단일 값 메타 데이터 필드가 가능했지만 콘텐츠 검색 웹 파트에서 복제 된이 기능은 가능합니다.

태그에서 일치 할 수 있지만 웹 파트의 값을 하드 코딩하는 것이 사용자가 다른 값을 기반으로 동적으로 사용하도록합니다. "현재 페이지"에서 "현재 페이지"에서 컨텐츠 검색 웹 파트의 속성 필터로 "필드"값을 사용할 수 있음을 알 수 있습니다. 내 이해는 검색에서 가져온 항목이 "페이지의 필드"가 아니라는 것입니다.

SharePoint 2013 검색 기능을 사용 하여이 기능을 구현하는 방법을 알고 있습니까? 또는이 프로세스의 설명서에 대한 링크를 제공합니까?

감사합니다.

도움이 되었습니까?

해결책

I've found a way to accomplish this given a situation where the managed property value I need to make the secondary/related CSWP lookup happens to be exposed in the URL of the primary catalog item.

I.e., a People Catalog with a catalog item URL of (/directory/Last, First) --- I want to show activities related to that person (from an Activities Catalog at /activities/Activity Title) on the person's catalog item page.

So in the Activities Catalog I created a site column 'Credit' and populated it with values of 'Last, First' - then on the People Catalog individual item page I went into edit mode, added a CSWP, and leveraged the "value of a token from URL" advanced query parameter to search the Activities list:

(contentclass:sts_listitem OR IsDocument:True) SPSiteUrl:http://authsite.organization.com ListId:6b291282-99e7-4d97-a5ff-activitieslistGUID CreditOWSTEXT:{URLToken.1}

I have not yet found a way to directly pass a value retrieved from one CSWP to another CSWP as a query filter parameter, though my brain sort of expects that capability to be there somewhere, and it might just be a case of my overlooking something obvious or under-documented (or maybe just my glazing over while reading documentation.)

I also have not yet found a good way to work this relationship in reverse. In other words, the Activities Catalog item URLs look like /activities/ActivityTitle so I'm not able to add a second CSWP on an individual activity page and have it query the person, since their name isn't exposed in the URL, and I don't want to add a column to a person which contains the titles of all activities related to them (though I suppose that could work.)

Though the Credit column I created above is a Single Line of Text field, it is populated on the authoring site through an on-modify workflow that copies the value from a lookup field. (In other words, the content manager on the authoring site selects the value from a Lookup field, and a workflow populates the text field with the lookup value.) I did this since it's so much easier to work with text fields in CSWP than lookup fields, though I expect that as I become more capable this might not prove necessary.

If you want to know more about the solution described above, just let me know... happy to discuss. Relating information between lists continues to feel more an art than a science, especially on opposite sides of the search service, and I continue to learn better techniques everyday!

PS - I haven't played much with web API services, but rather than nesting a CSWP in the individual catalog item page, I'd assume if the DOM output produced is solid, you could use client-side JavaScript to read a field value from the rendered CSWP page (based on ID or name or something) and run a subsequent AJAX query against another list to retrieve related values.

Peace and Joy!

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 sharepoint.stackexchange
scroll top