Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

  • Copy the server directory (without the “logs” subdirectory) to the new location and, optionally, change the name of the directory so that it indiates that it refers to the Index Server service. Further in the text, we will – for clarity’s sake –  call the original directory of the server SE and the copied catalog with the Index Server – IS.
  • Delete the SE/conf/is subdirectory.
  • Otwieramy plik SE/conf/server.xml i w sekcji <service-list> usuwamy wpis dotyczący usługi Index Server.
  • W podkatalogu IS/conf usuwamy wszystkie podkatalogi oprócz is, mx, wrapper.
  • Otwieramy plik IS/conf/server.xml i w sekcji <service-list> usuwamy wszystkie wpisy oprócz tych dotyczących usługi Index Server i interfejsu JMX. Oprócz tego zmieniamy parametr serverPort na wartość inną niż odpowiedni parametr w pliku SE/conf/server.xml (np. jeśli w SE/conf/server.xml parametr serverPort ma wartość 10051 to w pliku IS/conf/server.xml parametr ten można ustawić na wartość 11051). Jeśli sekcja <systemServicesUrl> jest zakomentowana, należy komentarz usunąć i wprowadzić URL do usługi System Services (adres i port serwera odpowiadają pierwotnemu serwerowi).
  • In the database, in table SYS_SERVICES, modify the entry pertaining to the Index Server service, by changing the value of column SER_PORT to the value set in file IS/conf/server.xml in the previous step.
  • In the same table, add a new tuple corresponding to the JMX interface for the new Index Server. Here is an example for the Oracle database:

    Code Block
    insert into SYS_SERVICES
    (SER_ID, SER_TYPE, SER_DESCRIPTION,
     SER_VERSION, SER_CONNECTED, SER_PASSWORD,
     SER_HOST, SER_PORT)
    values
    (SYS_SERVICES_SER_ID_SEQ.NEXTVAL, 'mx', 'dLibra JMX Management Service',
     '5.0', 0, '@ME_PASSWD@',
     '@SERVER_HOSTNAME@', @SERVER_PORT@);
    

    Parameters @ME_PASSWD@, @SERVER_HOSTNAME@, and @SERVER_PORT@ should be changed in accordance with the values in file IS/conf/server.xml.

  • Copy the directory which contains search indexes (the path to that directory is saved in file SE/conf/lucene.properties, in key indexDirectory). Enter the path to the new index location in key indexDirectory of file IS/conf/lucene.properties. Do the same for the directory which contains the backup copies of search indexes, taking into account the fact that the path to that directory is saved at key indexBackupDirectory.
  • Start up the dLibra server from the SE directory, and then from the IS directory. After the first startup of such a service configuration, file services.dat will be created in the directories of both servers. It should be used for generating new licenses.

 

Search Server

...

and Index Server

...

on Separate Machines

In that solution, the Search Server and Index Server services are located on separate physical machines and, consequently, operate within the framework of separate Java virtual machines. In order to obtain such a configuration, the user has to take the following steps:

  • Copy the server directory (without the “logs” subdirectory) to the new location on a separate machine and, optionally, change the name of the directory so that it indiates that it refers to the Index Server service. Further in the text, we will – for clarity’s sake –  call the original directory of the server SE and the copied catalog with the Index Server – IS.
  • Delete the SE/conf/is subdirectory

Rozwiązanie to zakłada, że usługi Search Server i Index Server będą umieszczone na osobnych fizycznych maszynach, więc naturalnie będą działać w ramach oddzielnych maszyn wirtualnych Java. W celu uzyskania takiej konfiguracji należy wykonać następujące kroki:

  • Kopiujemy katalog serwera (bez podkatalogu logs) do nowej lokalizacji na osobnej maszynie i opcjonalnie zmieniamy nazwę katalogu w taki sposób, by wskazywała, że dotyczy usługi Index Server. Dalej na potrzebę przejrzystości opisu pierwotny katalog serwera nazywać będziemy SE natomiast skopiowany katalog z usługą Index Server nazywać będziemy IS.
  • Usuwamy podkatalog SE/conf/is.
  • Otwieramy plik SE/conf/server.xml i w sekcji <service-list> usuwamy wpis dotyczący usługi Index Server.
  • W podkatalogu IS/conf usuwamy wszystkie podkatalogi oprócz is, mx, wrapper.
  • Otwieramy plik IS/conf/server.xml i w sekcji <service-list> usuwamy wszystkie wpisy oprócz tych dotyczących usługi Index Server i interfejsu JMX. Oprócz tego zmieniamy parametr serverHost na wartość odpowiadającą adresowi IP maszyny, na której umieszczono Index Server, wartość parametru serverPort może pozostać bez zmian. Jeśli sekcja <systemServicesUrl> jest zakomentowana, należy komentarz usunąć i wprowadzić URL do usługi System Services (adres i port serwera odpowiadają pierwotnemu serwerowi).
  • W bazie danych modyfikujemy w tabeli SYS_SERVICES wpis dotyczący usługi Index Server zmieniając wartości kolumn SER_HOST i SER_PORT na takie, jakie ustawione zostały w pliku IS/conf/server.xml w poprzednim kroku.
  • W tej samej tabeli dopisujemy nową krotkę odpowiadającą interfejsowi JMX dla nowego Index Servera. Przykład dla bazy danych Oracle:

    Code Block
    insert into SYS_SERVICES
    (SER_ID, SER_TYPE, SER_DESCRIPTION,
     SER_VERSION, SER_CONNECTED, SER_PASSWORD,
     SER_HOST, SER_PORT)
    values
    (SYS_SERVICES_SER_ID_SEQ.NEXTVAL, 'mx', 'dLibra JMX Management Service',
     '5.0', 0, '@ME_PASSWD@',
     '@SERVER_HOSTNAME@', @SERVER_PORT@);
    

    Parametry @ME_PASSWD@, @SERVER_HOSTNAME@ i @SERVER_PORT@ należy zamienić zgodnie z wartościami umieszczonymi w pliku IS/conf/server.xml.

  • Kopiujemy katalog zawierający indeksy wyszukiwawcze (ścieżka do tego katalogu zapisana jest w pliku SE/conf/lucene.properties w kluczu indexDirectory) na maszynę z usługą Index Server. Ścieżkę do nowej lokalizacji indeksów wpisujemy do klucza indexDirectory pliku IS/conf/lucene.properties. Podobnie postępujemy z katalogiem zawierającym kopie zapasowe indeksów wyszukiwawczych, przy czym należy uwzględnić fakt, iż ścieżka do tego katalogu zapisana jest pod kluczem indexBackupDirectory.
  • Uruchamiamy serwer dLibra z katalogu SE, następnie z katalogu IS. Po pierwszym uruchomieniu takiej konfiguracji usług w katalogach obu serwerów powstanie plik services.dat, który należy wykorzystać do wygenerowania nowych licencji.

 

Konfiguracja synchronizacji indeksów wyszukiwawczych

Configuring the Synchronization of Search Indexes

The separation of the indexing and searching services makes them operate on independent search indexes. As a result, the index used for searching is not always current, and it has to be periodically refreshed. The dLibra server has a mechanism for synchronizing the indexes between the Index Server and Search Server services. The synchronization is run in accordance with the settings of the periodic task defined in file Rozdzielenie usług indeksującej i wyszukującej powoduje, że działają one na niezależnych od siebie indeksach wyszukiwawczych. Konsekwencją tego jest fakt, iż indeks wykorzystywany do wyszukiwania nie zawsze jest aktualny i wymaga okresowego odświeżania. Serwer dLibry wyposażony jest w mechanizm synchronizacji indeksów pomiędzy usługami Index Server i Search Server. Synchronizacja uruchamiana jest zgodnie z ustawieniami zadania okresowego zdefiniowanego w pliku SE/conf/se/jobs.xml. Domyślny plan synchronizacji zakłada, że indeks treści (a także indeksy słownikowe *_spell) z racji swojego rozmiaru będzie synchronizowany oddzielnie od indeksów metadanych. Plan ten można dostosować do własnych potrzeb modyfikując wyrażenia CRON dla poszczególnych zadań. Możliwe jest również utworzenie dodatkowych zadań okresowych związanych z konkretnym typem indeksów.

 

Uwagi

  • Oba rozwiązania zakładają, że wydzielenie usługi Index Server odbywa się z konfiguracji umieszczonej na 1 maszynie. W zwiazku z tym usługa Search Server jest umieszczona razem z pozostałymi usługami, ale w miarę możliwości można ją wydzielić na osobną maszynę podobnie jak Index Server.

In the default synchronization plan, the content index (as well as the _spell dictionary indexes) is synchronized separately from metadata indexes because of its size. The plan can be adjusted to individual needs, by modifying the CRON expressions for particular tasks. Additional periodic tasks related to particular index types can also be created.

 

Notes

  • In both solutions, the Index Server service is separated from a configuration placed on one machine. For that reason, the Search Server is placed together with the remaining services, but it can be separated and placed on another machine, just like the Index Server.
  • Since index synchronization makes use of the system temporary directory, there should be enough free space on the drive. During a synchronization, a mechanism for creating backup copies which operates on ZIP archives is used, so the amount of free space should be sufficient for storing both the ZIP archive of all indexes and their unpacked versions, as well as the current version of search indexesZ uwagi na to, iż synchronizacja indeksów wykorzystuje systemowy katalog tymczasowy należy zapewnić odpowiednią ilość wolnego miejsca na dysku. W czasie synchronizacji wykorzystywany jest mechanizm kopii zapasowych operujący na archiwach ZIP, należy więc tak dostosować ilość wolnego miejsca, aby było możliwe jednoczesne przechowywanie archiwum ZIP wszystkich indeksów oraz ich postaci niespakowanych równolegle z bieżącą wersją indeksów wyszukiwawczych.