Home > Default > Query Based Taxonomy - Dynamic Creation of a Query Problem

Query Based Taxonomy - Dynamic Creation of a Query Problem

October 11Hits:0
Advertisement
Hi,
I'm trying to create new category nodes in a taxonomy and to assing them queries. I know how to do this, but I encountered a strange behavior. Here is the situation:
I have a string property DocumentType. When manualy creating a query, it looks like:
DocumentType CONTAINS "Some string"
But when I do the same using code I get:
DocumentType IS "Some string"
And as a result of this, the taxanomy is not working properly.
Here is the code:
     indexService =
     (IIndexService) ResourceFactory
     .getInstance()
     .getServiceFactory()
     .getService(
     IServiceTypesConst.INDEX_SERVICE);
     //        This kind of classification index offers functionality working with query based taxonomies
     qbcIndex = (IQBClassificationIndex) indexService.getIndex(indexId);
     //        Get a query folder - a query folder is a representation of a query based taxonomies category
     queryFolder = qbcIndex.getQueryFolder(RID.getRID(folder));
     //        List of IQueryEntry objects for the query folder
     queryEntryList = queryFolder.getQuery(context);
     //        Cast the IQBClassificationIndex into a ISearchIndex object
     searchIndex = (ISearchIndex) qbcIndex;
     queryEntry = searchIndex.getNewQueryEntry();
     queryEntry.setRowType(IQueryEntry.ROW_TYPE_ATTRIBUTE);
     queryEntry.setPropertyName(propertyName);
     queryEntry.setPropertyOperator(IQueryEntry.PROPERTY_OPERATOR_EQUAL);
     queryEntry.setValue(propertyValue);
     queryEntry.setTermAction(IQueryEntry.TERM_ACTION_EXACT);
     queryEntryList.add(queryEntry);
     //        Set the query for the query folder
     queryFolder.setQuery(queryEntryList, context);
     qbcIndex.updateCategoryContents("Document_Types", false, context);
Can somebody tell me what am I doing wrong please. Isn't it because of IQueryEntry.PROPERTY_OPERATOR_EQUAL? Is there any substring operator?
Thanks a lot.

Answers

Hi, Robert
  In this moment, I have a problem with Query Based Taxonomy, maybe could you help me. I insert the query in to the taxonomy from code, but when i use the method
  qbcIndex.updateCategoryContents("/taxonomies/borrame5/Prueba2", false, context);
  I got the next exception:
#1.5#0014C210F3D1002A000001200000565B000431CC93AD5979#1180654627543#System.err#sap.com/irj#System.err#dummy01#10241#####SAPEngine_Application_Thread[impl:3]_17##0#0#Error##Plain###     at com.sap.engine.core.thread.impl3.SingleThread.run(SingleThread.java:170)#
#1.5#0014C210F3D100310000012B0000565B000431CCC47166AB#1180655445698#System.err#sap.com/irj#System.err#dummy01#10241#####SAPEngine_Application_Thread[impl:3]_18##0#0#Error##Plain###com.sapportals.wcm.service.indexmanagement.IndexNotReadyException: Some documents are not included in this update because indexing has not been finished yet.#
#1.5#0014C210F3D100310000012C0000565B000431CCC4717417#1180655445701#System.err#sap.com/irj#System.err#dummy01#10241#####SAPEngine_Application_Thread[impl:3]_18##0#0#Error##Plain###     at com.sapportals.wcm.service.indexmanagement.retrieval.trex.AbstractTrexIndex.updateCategoryContents(AbstractTrexIndex.java:2493)#
  I have doubt what parameters i need to pass to the method updateCategoryContents,
  Let me give some information:
taxonomy:
   /taxonomies/borrame5/Prueba2
repository:
   /documents/Portal_KOF/KM/Pruebas1/Pruebas Versionamiento
classification and search index:
   borrame5
   I can't classify automatically, when i insert the query from code. When I manually insert the query from the portal, automatic classification run perfectly.
Thanks
Greetings
JARO.

Read other 2 answers

Tags:

Related Articles

  • Query Based Taxonomy - Dynamic Creation of a Query ProblemOctober 11

    Hi, I'm trying to create new category nodes in a taxonomy and to assing them queries. I know how to do this, but I encountered a strange behavior. Here is the situation: I have a string property DocumentType. When manualy creating a query, it looks l

  • Query based taxonomy from scratch gives NoSuchMethodError...October 11

    I'm trying to create a query based taxonomy following the instuctions specified in the help docs: KM Platform -> Admin Guide -> Content Mgmt -> Taxonomies and Classification -> Creating a QBT -> from scratch. I created an index on a newly c

  • Error while creating Query based taxonomy.October 11

    Hi, I have created an index and trying to build a query based taxonomy though Taxonomy Query Builder in content management. Earlier I have created another index but after that I have deleted it but still while trying to build a query based taxonomy i

  • Documents in Query-based Taxonomy are not AutoindexingOctober 11

    Hello experts! I am on EP6.14 with Trex 6.  I have a repository with a query-based taxonomy on it and is also part of a regular search index.  I have autoclassification on.  On each document I have a couple of properties that are used to match docume

  • Query-based taxonomy doesn't workNovember 30

    Hi, I created a query-based taxonomy in the index of a folder. Then in Content Management - Classification I set the Category and query of the taxonomy. However, documents that meet the query cannot be classified into that category - they are still i

  • Query Based Taxonomy and Searching Problem!November 30

    Hi all, Ive an urgent problem to solve .... I create some customs properties with dependent values, for example, if I put Country: Germany, I ve three options, (Waldorf,Munchen,Berlin) and so on ... Then, I create a Query Based Taxonomy, where in som

  • Cannot train an example based taxonomy in trexNovember 30

    Hi friends,    I have created an index in index administration.And attached a data source also.Then i create a new example based taxonomy and also i create folders for categories.Then in content management i go to taxonomy trainner.There is no choice

  • Create graph based on dynamic table dataNovember 30

    Hi experts ; i have JDeve Version 11.1.2.2.0 , i'm create dynamic table based on dynamic SQL query this query return by function in database by based on passing parameter . My question :- 1- How create graph based on dynamic table and contral it at r

  • Dynamic creation of ComponentUsageOctober 11

    Hi people, I want to reuse a view (ViewA) in different views (ViewB, ViewC, ViewD).ViewA has a quite complex logic, so it is necessary to outsource this view.  Not only the logic, but also the count of UIElements and contextelements is quite large, f

  • Dynamic Creation of UI in adobe forms??October 11

    Hi Experts, I need to create a dynamic interactive form and dynamic UI elements in the interactive form. As per my requirement I need to display a pdf and I will be getting values from the RFC's. I need to show the form segments and the UI elements o

Copyright (C) 2019 wisumpire.com, All Rights Reserved. webmaster#wisumpire.com 14 q. 0.591 s.