Dear BaseX Team,
I am using BaseX to store XML. This XML DB will get updated regularly through net. After updating, I will need to create Full-Text, Text and Attribute Indexes.
Below is the Java Code I am using -
str = "http://www.abcd.com/updates/data.xml"; qry = "for $c in doc('"+ str +"')//Doc return insert node $c into doc('myDoc')/Docs";
try { query(qry); } catch(Exception e) { System.out.println(e); }
try { System.out.println("Opening the Database....."); new Open("myDocs").execute(CONTEXT); System.out.println("Database opened....."); System.out.println("Indexing started....."); new CreateIndex("FULLTEXT").execute(CONTEXT); new CreateIndex("TEXT").execute(CONTEXT); new CreateIndex("ATTRIBUTE").execute(CONTEXT); System.out.println("Indexing done....."); } catch(Exception e) { System.out.println("Exception while creating Index " + e); }
In the above code, I am doing 2 things- first is updating the "myDocs" database and after that Indexing... The first part, updation is not working.
I tried to execute the query directly in BaseX, but its not working there too. *But when I open the said DB and run the same query, its updating the DB*.. !!