Ask Questions and Find Answers
Important:
Ask is now read-only. You can review any existing questions and answers, but not add anything new.
But - don't panic! While ask is no more, we've replaced it with discuss - the new Liferay Discussion Forum! Read more here here or just visit the site here:
discuss.liferay.com
Liferay 7.2 - Hits query is returning the DDMStructure default value
Hi,
I am doing some queries to my "STRUCTURE_KEY" Web Contents with a Hits query:
The problem is that I was testing the DDMStructure default values, and by mistake I hit save and saved the default values. Now the Hits query is returning the DDMStructure default values as a Web Content. Is there any way to exclude this DDMStructure default values from the query? I thought that by setting "JournalArticleConstants.CLASSNAME_ID_DEFAULT" as a param, would return only the JournalArticle objects and not the DDMStructure default values also. Am I missing something here?
I am doing some queries to my "STRUCTURE_KEY" Web Contents with a Hits query:
Hits hits = JournalArticleLocalServiceUtil.search(
myGroup.getCompanyId(),
myGroup.getGroupId(),
Arrays.asList(JournalFolderConstants.DEFAULT_PARENT_FOLDER_ID),
JournalArticleConstants.CLASSNAME_ID_DEFAULT,
"STRUCTURE_KEY",
null,
null,
null,
0,
16,
SortFactoryUtil.create(Field.MODIFIED_DATE, Sort.DOUBLE_TYPE, true)
);The problem is that I was testing the DDMStructure default values, and by mistake I hit save and saved the default values. Now the Hits query is returning the DDMStructure default values as a Web Content. Is there any way to exclude this DDMStructure default values from the query? I thought that by setting "JournalArticleConstants.CLASSNAME_ID_DEFAULT" as a param, would return only the JournalArticle objects and not the DDMStructure default values also. Am I missing something here?