WebCenter Sites Query Content using API
Hi all,I have created a asset called "TVLContent" and for this asset, I created 2 attributes: "Question" and "Answer".
I need to create a query search using API, to get any content where "Question" or "Answer" attribute contains "Why".
I'm using the line code below, for searching, but doesn't work.
-----Code
Session ses = SessionFactory.getSession();
Condition c1 =ConditionFactory.createCondition("Question", OpTypeEnum.LIKE, "%Why%");
Condition c2 =ConditionFactory.createCondition("Answer", OpTypeEnum.LIKE, "%Why%" );
Query query = new SimpleQuery( "TVLContent", "FAQs", c1.or(c2) , Arrays.asList("name", "id", "Question", "Answer"));
query.getProperties().setIsBasicSearch(true);
AssetDataManager mgr = (AssetDataManager) ses.getManager(AssetDataManager.class.getName());
List<Long> firstResults = new ArrayList<Long>();
0