ILIAS icon indicating copy to clipboard operation
ILIAS copied to clipboard

RPC Server: adjust JAVA RPC Server code as following... (40751)

Open lukastocker opened this issue 1 year ago • 2 comments

  1. Adjust components and plugin paths in ObjectDefinitionReader.java file.
  2. Adjust path references to components in LuceneObjectDefinition XML files.
  3. Adjust the JAVA RPC Server README for ILIAS 10.

https://mantis.ilias.de/view.php?id=40751


I tested the changes on my local machine (ILIAS 10 / trunk, PHP 8.2). Some of the results/examples can be viewed in the following lines.

Creating a new Lucene index

  1. create some examples in 'Customizing/global/plugins' and 'components/CAT' directories
  2. create some examples in 'Services' directory
  3. create some examples in 'Modules' directory
  4. create Lucene index with following command:
java -jar /var/ilias/data/target/ilServer.jar /var/ilias/data/ilServer.ini createIndex ilias_0

Result:

2024-04-18T15:11:51,858 INFO  XML-RPC-1 (RPCIndexHandler.java:154) - Checking if indexer is > running for client: ilias_0
2024-04-18T15:11:51,861 INFO  XML-RPC-1 (IndexHolder.java:90) - Deleted index directory: /var/> www/html/public/data/ilias_0
2024-04-18T15:11:51,867 INFO  XML-RPC-1 (ObjectDefinitionReader.java:172) - Found: /var/www/html/Modules/TestModule/LuceneObjectDefinition.xml
2024-04-18T15:11:51,868 INFO  XML-RPC-1 (ObjectDefinitionReader.java:172) - Found: /var/www/html/Services/TestService/LuceneObjectDefinition.xml
2024-04-18T15:11:51,869 INFO  XML-RPC-1 (ObjectDefinitionReader.java:172) - Found: /var/www/html/Customizing/global/plugins/TestPluginOne/LuceneObjectDefinition.xml
2024-04-18T15:11:51,913 INFO  XML-RPC-1 (ObjectDefinitionReader.java:172) - Found: /var/www/html/components/ILIAS/RemoteCourse/LuceneObjectDefinition.xml
2024-04-18T15:11:51,914 INFO  XML-RPC-1 (ObjectDefinitionReader.java:172) - Found: /var/www/html/components/ILIAS/Group/LuceneObjectDefinition.xml
[...]
2024-04-18T15:20:35,195 INFO  XML-RPC-0 (ObjectDefinitionReader.java:174) - Found: /var/www/html/components/CAT/CatTestPluginOne/LuceneObjectDefinition.xml
[...]

Doing a search after creating a new Lucene index

java -jar /var/ilias/data/target/ilServer.jar /var/ilias/data/ilServer.ini search ilias_0 "ilias"

Result:

<?xml version="1.0" encoding="UTF-8"?>
<Hits totalHits="1" maxScore="1.2719502449035645" limit="100"><Object id="1" absoluteScore="1.2719502449035645" /></Hits>

Updating the lucene index

  1. created two wiki objects on my local instance
  2. updated the lucene index with following command:
java -jar /var/ilias/data/target/ilServer.jar /var/ilias/data/ilServer.ini updateIndex ilias_0

Result:

INFO  main (ilServer.java:189) - Finished indexing
  1. Starting a new search for the newly created wiki objects with following command:
java -jar /var/ilias/data/target/ilServer.jar /var/ilias/data/ilServer.ini search ilias_0 "wiki"

Result:

<?xml version="1.0" encoding="UTF-8"?>
<Hits totalHits="2" maxScore="0.8550350069999695" limit="100"><Object id="316" absoluteScore="0.8550350069999695" /><Object id="324" absoluteScore="0.8550350069999695" /></Hits>

lukastocker avatar Apr 18 '24 14:04 lukastocker

@smeyer-ilias or @schmitz-ilias : Any chance you have a look at this soon? This now starts to become important.

kergomard avatar Dec 16 '24 07:12 kergomard

Hi @smeyer-ilias , we stumbled over this PR while checking old PRs in our TB meeting. Should the author fix the conflicts, or do you have any objections (maybe you reject the PR completely)? Providing feedback for the author is highly appreciated.

mjansenDatabay avatar May 27 '25 10:05 mjansenDatabay