Hello Nuxeo Gurus,
I have a question related to document structure configuration: I have a use case where I have to import documents from a relational database to Nuxeo. In my documents I have fields that are foreign keys from related tables (ex: DOCS.CUSTOMER_ID pointing to CUSTOMERS table). The documents table from the database will be abandoned and the documents will only be stored in Nuxeo, but all the other related tables will be accesible from the DB.
I want to be able to search documents only in Nuxeo (using Nuxeo API) by customer names for ex. (exact match, starting with, containing etc.) so I have to create the correct document structure in Nuxeo. For this,I imagined 2 ways :
- denormalize the structure of Nuxeo docs and add a customer name string field - I don't like this for obvoius reasons (customers can change)
- create a vocabulary in Nuxeo based on a database table (via jdbc data source) and configure a customer field in Nuxeo documents based on this vocabulary. The problem with this approach is that I haven't foand a way to search documents in Nuxeo by customer name. For ex. I'm looking for a way to write an NXQL query with a "join" beetwen Nuxeo documents and the "customers" directory. Is this possible?
Which way would you choose? Or do you have another suggestion?
Thank you.