OnDemand User Group

Support Forums => OD/WEK & JAVA API => Topic started by: Anand on April 07, 2017, 02:11:26 AM

Title: Finding Segment date serach field in AG
Post by: Anand on April 07, 2017, 02:11:26 AM
Hi

Please help on how to find Segment (date) field for an AG which is having multiple date fields using ODWEK. Also the corresponding folder field to which the segment field is mapped. I have an idea like get all the AG fields and use the mask values to find the Segment Date field { mod(mask/4,2) = 1  }. Thanks in advance.

Title: Re: Finding Segment date serach field in AG
Post by: Justin Derrick on April 07, 2017, 04:37:43 PM
Hi.

Can you give us some more information about what you're trying to achieve?  Most of the time, you want to make this a required field in the folder configuration, so that end users are forced to enter a date (or date range) in order to send a query to the server.

-JD.
Title: Re: Finding Segment date serach field in AG
Post by: Anand on April 10, 2017, 12:58:08 AM
Hi JD

We have a common search portal which is to search across all the repositories (CMOD, P8 etc). Search portal holds GUID, Segment date and AG name in DB from CMOD. For retrieval, Search portal provides the above values (not field names) to CMOD. We have one to one folder AG mapping. GUID field name is same across all AGs & folders. Only difficulty is to find the Segment date field name in OD and corresponding mapping in folder to set the search criteria. Hope this explains the scenario better.

Thanks
Title: Re: Finding Segment date serach field in AG
Post by: rgator on July 10, 2017, 07:34:35 AM
Anand,
Did you ever figure out a way to query the appgroup to find out what field is marked as the segment field?
I need to do the same thing as we possibly might have to unload and then reload a bunch of reports..
When we do the reload we want to be sure to load the report back with the original date that was specified
in the segment field..  I'm guessing I'll have to query the appgroup to get the segment field.. than take that
field and query the application to get the proper format of that date...
If you figured out how to get the segment date field I'd appreciate it if you let me know... thanks

I found how to get the segment field by pulling from the arsag and arsagfld tables...
The segment field has a mask value of 6...
Title: Re: Finding Segment date serach field in AG
Post by: Justin Derrick on July 12, 2017, 09:27:16 AM
For future reference, check the wiki for details on IBM CMOD tables:  https://cmod.wiki/index.php?title=Content_Manager_OnDemand_Database_Tables

Also, individual values must be a power of 2 -- the "6" provided by rgator below represents both "Segment" and "Updatable".

Search for "bit masks" or "vectored fields" to understand how the arsasagfld table's mask field is formatted.

-JD.
Title: Re: Finding Segment date serach field in AG
Post by: Alessandro Perucchi on October 13, 2017, 03:06:11 PM
Just for info, until IBM doesn't change the format of the database, the field you search it the following for the segment field:

BITAND(MASK, 4)=4