2012-06-13 4 views
5

Ngay bây giờ chúng tôi đang sử dụng SDL Tridion 5.3 sớm, chúng tôi sẽ nâng cấp lên Tridion 2011 SP1. Trong khi nâng cấp lên Tridion 2011 SP1, chúng tôi cũng muốn sử dụng công cụ tìm kiếm FAST FISE (SP 4) để thực hiện tìm kiếm trên trang web đã xuất bản.Làm thế nào chúng ta có thể tích hợp Microsoft FAST với SDL Tridion 2011 SP1?

Bất kỳ ai cũng có thể giúp chúng tôi hiểu cách thực hiện điều này liên quan đến phạm vi của người triển khai cũng như thay đổi về bên cung cấp nội dung (chúng tôi có triển khai .NET). Có bất kỳ tài liệu tham khảo hoặc triển khai API nào có sẵn không?

Trả lời

9

Tôi không có kinh nghiệm cụ thể với FAST, nhưng không thể khác với nhiều công cụ tìm kiếm khác khi tích hợp công việc.

Cách dễ dàng: - Không làm gì cả, hãy nhanh chóng thu thập thông tin trang web của bạn và thu thập tất cả thông tin cần thiết. Đây là cách hiệu quả nhất về cách tích hợp tìm kiếm và nhiều người quên rằng vào cuối ngày, điều này thường bao gồm ~ 98% yêu cầu của họ.

Cách thời gian thực: Viết mô đun Deployer để thông báo FAST mỗi khi có thứ gì đó (un) được xuất bản để chỉ số có thể được cập nhật (xem ở cuối mô-đun mẫu có thể giúp bạn bắt đầu).

Các quá thiết kế cách: Viết một phần mở rộng JPA tuân thủ kho cho Tridion: http://www.sdltridionworld.com/articles/sdltridion2011/tutorials/extending-content-delivery-storage-sdltridion-2011-1.aspx

Mẫu mã cho một phần mở rộng Deployer:

import java.util.Iterator; 

import com.tridion.configuration.Configuration; 
import com.tridion.configuration.ConfigurationException; 
import com.tridion.deployer.Module; 
import com.tridion.deployer.ProcessingException; 
import com.tridion.deployer.Processor; 

import com.tridion.transport.transportpackage.Binary; 
import com.tridion.transport.transportpackage.BinaryKey; 
import com.tridion.transport.transportpackage.Component; 
import com.tridion.transport.transportpackage.ComponentKey; 
import com.tridion.transport.transportpackage.MetaData; 
import com.tridion.transport.transportpackage.MetaDataFile; 
import com.tridion.transport.transportpackage.Page; 
import com.tridion.transport.transportpackage.PageKey; 
import com.tridion.transport.transportpackage.ProcessorInstructions; 
import com.tridion.transport.transportpackage.Section; 
import com.tridion.transport.transportpackage.TransportPackage; 

import org.slf4j.LoggerFactory; 
import org.slf4j.Logger; 


public class CustomCacheNotificationDeploy extends Module { 

    String action = null; 
    Logger log = null; 
    MetaDataFile pageMeta = null; 
    MetaDataFile componentMeta = null; 
    MetaDataFile binaryMeta = null; 
    public CustomCacheNotificationDeploy(Configuration config, Processor processor) 
      throws ConfigurationException { 
     super(config, processor); 
     log = LoggerFactory.getLogger(getClass()); 
     // TODO Auto-generated constructor stub 
    } 

    @SuppressWarnings("deprecation") 
    public void process(TransportPackage data) throws ProcessingException{ 
     ProcessorInstructions instructions = data.getProcessorInstructions(); 
     action = instructions.getAction(); 
     MetaData pageMetaInfo = instructions.getMetaData("Pages"); 
     MetaData componentMetaInfo = instructions.getMetaData("Components"); 
     MetaData binaryMetaInfo = instructions.getMetaData("Binaries"); 
     pageMeta = data.getMetaData("Pages", pageMetaInfo.getName()); 
     componentMeta = data.getMetaData("Components", componentMetaInfo.getName()); 
     binaryMeta = data.getMetaData("Binaries", binaryMetaInfo.getName()); 

     log.debug("Action " + action + " started for publication " + instructions.getPublicationId()); 

     Section section = null; 
     Iterator<Section> Sections = instructions.getSections(); 
     for(; Sections.hasNext(); processSection(section)) 
     { 
      section = Sections.next(); 
     } 

    } 

    protected void processSection(Section section) 
    { 
     log.debug("Processing Section " + section.getName()); 
     Iterator iterator = section.getFileItems(); 
     Object item; 
     for(; iterator.hasNext(); processItem(item, section)) 
     { 
      item = iterator.next(); 
     } 
     Section subSection; 
     for(Iterator i$ = section.getSubSections().iterator(); i$.hasNext(); processSection(subSection)) 
      subSection = (Section)i$.next(); 
    } 

    protected void processItem(Object obj, Section section) 
    { 
     if(obj instanceof PageKey) 
     { 
      log.debug("Object is Page"); 
      PageKey key = (PageKey) obj; 
      Page page = (Page)pageMeta.getMetaData(key); 
      log.debug("Page being deployed is " + page.getId() + " with URL " + page.getURLPath()); 
     } 
     if(obj instanceof ComponentKey) 
     { 
      log.debug("Object is Component"); 
      ComponentKey key = (ComponentKey) obj; 
      Component component = (Component)componentMeta.getMetaData(key); 
      log.debug("Component being deployed is " + component.getId()); 
     } 
     if(obj instanceof BinaryKey) 
     { 
      log.debug("Object is Binary"); 
      BinaryKey key = (BinaryKey) obj; 
      Binary binary = (Binary)binaryMeta.getMetaData(key); 
      log.debug("Binary being deployed is " + binary.getId() + " with URL " + binary.getURLPath()); 
     } 
    } 
} 
+0

Cảm ơn Nuno trả lời nhanh chóng. Chúng tôi sẽ sử dụng phần mở rộng triển khai, vì vậy trong khi xuất bản trang, thành phần, nội dung nhị phân, chúng tôi sẽ đẩy nội dung/nội dung siêu dữ liệu lên FAST. Ở bên cung cấp Nội dung, chúng tôi muốn sử dụng một số API FAST, những API này sẽ tìm nạp nội dung từ bộ sưu tập FAST (cơ sở dữ liệu hoặc hệ thống tệp). Tôi không có kinh nghiệm thực hiện FAST. – user1453602

+0

@Nuno mới hơn trong tridion. bạn có thể giải thích cách sử dụng mã này không? các bước cần làm theo để sử dụng phần mở rộng triển khai là gì? tôi đã tạo các trang. bây giờ muốn cung cấp chức năng tìm kiếm trong các trang. một hộp văn bản có nút tìm kiếm sẽ cung cấp chức năng này.như trang web này có quyền cực đỉnh. – Coder

+2

Lời khuyên mạnh mẽ nhất từ ​​trước đến nay - trước tiên hãy tìm hiểu cách thực hiện nó mà không cần Tridion. Sau đó di chuyển nó thành một phần của mẫu đầu ra của bạn. Nghiêm túc, quên Tridion và thử nó trước. Phần mở rộng triển khai này chỉ là một ví dụ về cách bạn có thể chạy mã trong khi triển khai, không có gì để làm với chức năng tìm kiếm hoặc tìm kiếm. –