Author Topic: Folder Search Spanning Multiple Indexes  (Read 3698 times)

Douglas

  • Jr. Member
  • **
  • Posts: 27
    • View Profile
Folder Search Spanning Multiple Indexes
« on: April 20, 2015, 11:13:33 AM »
Hello

I have a question about CMOD folder administration. I have a new Application Group that has a document that has 1 guaranteed index (let’s call it Name1) and a possible 15 additional indexes (let’s call these Aliases1 to Aliases15). Is it possible to set up a folder to search for the 1 guaranteed index, as well as the possible 15 additional indexes? 

I am aware to of the CMOD Folder functionally involving “Operator Or” but the documentation states it is limited to 2 fields. 

Any ideas?

Thanks

Operator Or (Folder field mapping type)
You can map the folder field to two fields in each application group that can be searched from the folder. The valid search operators for a field that uses the Operator Or mapping type depend on the field type. However, Between and Not Between are not supported.
You can use the Operator Or mapping type to create an either or search field. For example, assume the reports that you want to query can contain a major and minor account number. The Operator Or mapping type allows users to locate documents that contain either account number. Content Manager OnDemand queries the database by comparing the search value specified by the user to two database fields. If either database field contains the search value, then Content Manager OnDemand adds the document to the document list.

Justin Derrick

  • IBM Content Manager OnDemand Consultant
  • Administrator
  • Hero Member
  • *****
  • Posts: 2230
  • CMOD Guru for hire...
    • View Profile
    • Tenacious Consulting
Re: Folder Search Spanning Multiple Indexes
« Reply #1 on: April 21, 2015, 02:30:31 AM »
Can you describe your use case a little more?  I'm not sure what you're trying to accomplish.

-JD.
IBM CMOD Professional Services: http://TenaciousConsulting.com
Call:  +1-866-533-7742  or  eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/
FREE IBM CMOD Education & Webinars:  https://CMOD.Training/

Interests: #AIX #Linux #Multiplatforms #DB2 #TSM #SP #Performance #Security #Audits #Customizing #Availability #HA #DR

Douglas

  • Jr. Member
  • **
  • Posts: 27
    • View Profile
Re: Folder Search Spanning Multiple Indexes
« Reply #2 on: April 21, 2015, 05:30:50 AM »
Okay,

We have a batch of documents we want to store:

Document 1:

  Index1: 10001      Let’s call this primary ID
  (No indexes 2 - 15)   Let’s call these Aliases IDs

(Skip a bunch of documents)

Document 56:

  Index1: 10056
  Index2: 10001    (matches Document 1 primary ID)
  (No indexes 3 - 15)   
 
(Skip a bunch of documents)

Document 510:

  Index1: 10510
  Index2: 45754   
   …
  Index15: 10001 (matches Document 1 primary ID)

I would like to create a folder with the field called “ID,” and this field “ID” will be mapped to Index 1 through Index 15, so when the user searches for ID “10001” the hit list would return a list containing Document 1 (because its primary matched), Document 56 (because one of its Aliases matched) and Document 540 (because one of its Aliases matched)

I hope I explained it better thanks.

Justin Derrick

  • IBM Content Manager OnDemand Consultant
  • Administrator
  • Hero Member
  • *****
  • Posts: 2230
  • CMOD Guru for hire...
    • View Profile
    • Tenacious Consulting
Re: Folder Search Spanning Multiple Indexes
« Reply #3 on: April 21, 2015, 06:38:28 AM »
Hrm.  This sounds like the lottery problem...  You can choose six of 50 numbers, in any order.  How do you search a massive database of lottery tickets for the winners?  It's not easy, and as far as I know, there isn't a great solution.  Of course, your problem is made more difficult by the fact that you're choosing 15 'balls' instead of just 6.

It might be possible to solve this with 'views' in DB2, or maybe even with the new 'columnar' features in DB2 BLU -- but I'm not sure exactly how that would work.  I'm looking forward to hearing the insight from others on this issue.

-JD.
IBM CMOD Professional Services: http://TenaciousConsulting.com
Call:  +1-866-533-7742  or  eMail:  jd@justinderrick.com
IBM CMOD Wiki:  https://CMOD.wiki/
FREE IBM CMOD Education & Webinars:  https://CMOD.Training/

Interests: #AIX #Linux #Multiplatforms #DB2 #TSM #SP #Performance #Security #Audits #Customizing #Availability #HA #DR

Alessandro Perucchi

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1002
    • View Profile
Re: Folder Search Spanning Multiple Indexes
« Reply #4 on: April 24, 2015, 08:19:55 AM »
I've been reading this thread, and after thinking a moment I think there is a way to do it very easily. You need to use Generic Index for it.
Basically you need to reference the same document each time with different indexes, and in that case, CMOD will store the first document, and the following indexes are only reference to the first one (with same filename, same offset and same length).

It is important that all indexes that are related to the same document is regrouped together, otherwise CMOD will load X times all documents, which defeats the purpose to have it stored only once and have all wanted indexes pointing to it.

Basically taking your example, here is an example of what I'm trying to say:

Code: [Select]
CODEPAGE:1208
COMMENT:DOC #1
GROUP_FIELD_NAME:INDEX1
GROUP_FIELD_VALUE:10001
...
GROUP_OFFSET:0
GROUP_LENGTH:0
GROUP_FILENAME:file-1.pdf

COMMENT:DOC #56
COMMENT:   First Index
GROUP_FIELD_NAME:INDEX1
GROUP_FIELD_VALUE:10056
...
GROUP_OFFSET:0
GROUP_LENGTH:0
GROUP_FILENAME:file-56.pdf

COMMENT:   Alias for Doc 10001
GROUP_FIELD_NAME:INDEX1
GROUP_FIELD_VALUE:10001
...
GROUP_OFFSET:0
GROUP_LENGTH:0
GROUP_FILENAME:

COMMENT:DOC #510
COMMENT:   First Index
GROUP_FIELD_NAME:INDEX1
GROUP_FIELD_VALUE:10510
...
GROUP_OFFSET:0
GROUP_LENGTH:0
GROUP_FILENAME:file-510.pdf

COMMENT:   Alias for Doc 45754
GROUP_FIELD_NAME:INDEX1
GROUP_FIELD_VALUE:45754
...
GROUP_OFFSET:0
GROUP_LENGTH:0
GROUP_FILENAME:

COMMENT:   Alias for Doc 10001
GROUP_FIELD_NAME:INDEX1
GROUP_FIELD_VALUE:10001
...
GROUP_OFFSET:0
GROUP_LENGTH:0
GROUP_FILENAME:

In that small example the document 1, 56 and 510 are stored once, but they will have many indexes pointing to them.
Document 1, will have only 1 index
Document 56, will have 2 indexes
and document 510 will have three.

And if a user search INDEX 10001 it will find the three documents.

Is this method working for you?
If not, then maybe I haven't understood something!

Yours sincerely,
Alessandro
« Last Edit: April 24, 2015, 08:24:13 AM by Alessandro Perucchi »
Alessandro Perucchi

#Install #Migrations #Conversion #Educate #Repair #Upgrade #Migrate #Enhance #Optimize #AIX #Linux #Multiplatforms #DB2 #Windows #Oracle #TSM #Tivoli #Performance #Audits #Customizing #Availability #HA #DR #JavaApi #ContentNavigator #ICN #WEBi #ODWEK #Services #PDF #AFP #XML