Example usage for com.liferay.portal.kernel.search Field CREATE_DATE

List of usage examples for com.liferay.portal.kernel.search Field CREATE_DATE

Introduction

In this page you can find the example usage for com.liferay.portal.kernel.search Field CREATE_DATE.

Prototype

String CREATE_DATE

To view the source code for com.liferay.portal.kernel.search Field CREATE_DATE.

Click Source Link

Usage

From source file:com.liferay.polls.internal.search.PollsQuestionIndexer.java

License:Open Source License

public PollsQuestionIndexer() {
    setDefaultSelectedFieldNames(Field.ASSET_TAG_NAMES, Field.CREATE_DATE, Field.COMPANY_ID, Field.DESCRIPTION,
            Field.ENTRY_CLASS_NAME, Field.ENTRY_CLASS_PK, Field.GROUP_ID, Field.SCOPE_GROUP_ID, Field.TITLE,
            Field.UID);//from w w  w .ja  v a2  s. com
    setFilterSearch(true);
}

From source file:com.liferay.polls.internal.search.PollsQuestionIndexer.java

License:Open Source License

@Override
protected Document doGetDocument(PollsQuestion pollsQuestion) throws Exception {

    Document document = getBaseModelDocument(CLASS_NAME, pollsQuestion);

    document.addDateSortable(Field.CREATE_DATE, pollsQuestion.getCreateDate());
    document.addText(Field.DESCRIPTION, getDescriptionField(pollsQuestion));
    document.addText(Field.TITLE, getTitleField(pollsQuestion));

    return document;
}