Hi all,

I'm trying adding a FileDataStore together with mongodb as persistence 
NodeStore, without considering indexing I did some tests and datastore works as 
expected.

But if I add indexing and then a query, what I've noticed is that with 
BlobStore the indexing doesn't happen, no log about tika text extraction and 
query fails telling no index found.

*** If I simply comment setBlobStore in MongoDocumentNodeStoreBuilder then 
indexing happen and query found results ***
Here it is how I initialize repository:

       OakFileDataStore fds = new OakFileDataStore();
       fds.setPath(datastoreFolder.toString());
       fds.init(null);
       DataStoreBlobStore blobStore = new DataStoreBlobStore(fds);

       // Configura il DocumentNodeStore per l'archiviazione persistente (con 
MongoDB, per esempio)
       MongoDocumentNodeStoreBuilder nodeStoreBuilder = new 
MongoDocumentNodeStoreBuilder()
               .setMongoDB(new MongoClient(new 
MongoClientURI("mongodb://root:root@localhost:27017")), "test");
       .setBlobStore(blobStore); // Commenting this line indexing works fine, 
query uses index and results are found

       DocumentNodeStore nodeStore = nodeStoreBuilder.build();

       LuceneIndexProvider provider = new LuceneIndexProvider();
       LuceneIndexEditorProvider editorProvider = new 
LuceneIndexEditorProvider();

       // Configura e inizializza il repository Oak
       Oak oak = new Oak(nodeStore).with((QueryIndexProvider) provider)
               .with((Observer) provider)
               .with(editorProvider);

       repository = new Jcr(oak).createRepository();

I've tried to set minRecordLenght to 1 to check if index is stored in datastore 
but I can't see it anyway.

Thanks

Cordiali saluti / Best regards,

Raffaele Gambelli
Senior Java Developer
E  [email protected]<mailto:[email protected]>

[CEGEKA]        Via Ettore Cristoni, 84
IT-40033 Bologna (IT),Italy
T +39 02 2544271
WWW.CEGEKA.COM<https://www.cegeka.com>

[https://2655225.fs1.hubspotusercontent-na1.net/hubfs/2655225/0.0%20Cegeka%20(new)/1.%20Visuals/Email%20Signatures/Annual_Report_Visuals_2023_Email%20Banner%201.png]<https://www.cegeka.com/it/annual-report-2023?utm_campaign=[EN]%20-%20Annual%20Report%202023&utm_source=email%20signature%20banner&utm_medium=email%20signature%20banner%20annual%20report%202023>
Dichiarazione di Riservatezza
Le informazioni contenute nella mail sono riservate. Se si rende conto di non 
essere il destinatario corretto della mail, la preghiamo di segnalare l'errore 
al mittente e di cancellare immediatamente il messaggio. L’utilizzo improprio 
di informazioni riservate può comportare sanzioni.
Protezione dei dati personali
La informiamo che i suoi dati saranno trattati da Cegeka nel rispetto delle 
disposizioni di legge applicabili (D. Lgs 196/2003 e Regolamento UE 679/2016). 
Per maggiori dettagli può consultare le nostre informative privacy al link 
https://www.cegeka.com/it/informazioni-sulla-privacy.<https://www.cegeka.com/it/informazioni-sulla-privacy>


Reply via email to