Package com.liferay.portal.kernel.search

Examples of com.liferay.portal.kernel.search.Document


  @Override
  protected Document doGetDocument(Object obj) throws Exception {
   
    Guestbook guestbook = (Guestbook)obj;

    Document document = getBaseModelDocument(PORTLET_ID, guestbook);

    document.addDate(Field.MODIFIED_DATE, guestbook.getModifiedDate());
    document.addText(Field.TITLE, guestbook.getName());
    document.addKeyword(Field.GROUP_ID, getSiteGroupId(guestbook.getGroupId()));
    document.addKeyword(Field.SCOPE_GROUP_ID, guestbook.getGroupId());
   
    return document;
  }
View Full Code Here


  @Override
  protected void doReindex(Object obj) throws Exception {
   
    Guestbook guestbook = (Guestbook)obj;

    Document document = getDocument(guestbook);

    SearchEngineUtil.updateDocument(
      getSearchEngineId(), guestbook.getCompanyId(), document);
  }
View Full Code Here

      @Override
      protected void performAction(Object object) throws PortalException {
        Guestbook guestbook = (Guestbook) object;

        Document document = getDocument(guestbook);

        documents.add(document);
      }

    };
View Full Code Here

  @Override
  protected Document doGetDocument(Object obj) throws Exception {
   
    Entry entry = (Entry)obj;

    Document document = getBaseModelDocument(PORTLET_ID, entry);

    document.addDate(Field.MODIFIED_DATE, entry.getModifiedDate());
    document.addText(Field.CONTENT, entry.getMessage());
    document.addText(Field.TITLE, entry.getName());
    document.addText("email", entry.getEmail());
    document.addKeyword(Field.GROUP_ID, getSiteGroupId(entry.getGroupId()));
    document.addKeyword(Field.SCOPE_GROUP_ID, entry.getGroupId());
   
    return document;
  }
View Full Code Here

  @Override
  protected void doReindex(Object obj) throws Exception {
   
    Entry entry = (Entry)obj;

    Document document = getDocument(entry);

    SearchEngineUtil.updateDocument(
      getSearchEngineId(), entry.getCompanyId(), document);
  }
View Full Code Here

      @Override
      protected void performAction(Object object) throws PortalException {
        Entry entry = (Entry) object;

        Document document = getDocument(entry);

        documents.add(document);
      }

    };
View Full Code Here

TOP

Related Classes of com.liferay.portal.kernel.search.Document

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.