Navigation:  How to... > How to configure… >

A Full-Text Search

Previous pageReturn to chapter overviewNext page

In WebOffice 10 R3 it is possible to use an indexed full-text search. Thereby you can execute an overall search covering the whole geodata used in the map services of WebOffice 10 R3 projects. From a technical point of view the full-text search index is based on the Solr Framework, which uses the technology of Apache Lucene. To use a full-text search you have to do the following configuration steps.

 

It is important to distinguish between the two notions search index and subindex. The search index for the full-text search is a separate web application called FTS-index and it is managed through the Solr framework. This search index is made up of several subindices, at which an extra subindex will be created for each (configured) search layer.

 

Installation of the Solr server (FTS-Index):

 

The search index is located in a web application called FTS-index. The installation of the web application is carried out by copying the directory and adapting the application context desctriptor (XML file) accordingly. The package to be installed can be found on the installation media (/Software/FTS-Index Web Application/unpackaged/FTS-Index.zip). Do not copy that folder to the application server directory, which is monitored for the automatic deployment functionality! The directories /Tomcat/webapps or /Tomcat/work are also not recommended. Create a new directory called “webapps_custom” in  /Tomcat and copy-paste the whole 'FTS-Index' folder into that folder.

 

Note: One search index application can only be used from one WebOffice 10 R3 application! If you want to use the full-text search for several WebOffice 10 R3 applications you have to install an own search index application for each WebOffice 10 R3 application. (e. g. FTS-Index1, FTS-Index2)

 

FTS-Index installation

FTS-Index installation

 

The next step is to adapt the context descriptor file FTS-Index.xml, and made available to Tomcat, so that Tomcat can locate and load the search index application (FTS-Index). An example for the configuration procedure can be found on the installation media (/Software/FTS-Index Web Application/unpackaged/FTS-Index.xml). Please use the supplied file and adapt it relating to docBase, workDir and environment. The XML file will ultimately be located and stored in Tomcat/conf/Catalina/Hostname/.

 

Caution: Try to avoid German umlauts or special characters! If a German umlaut or special characters (e.g. $, %, ...) get inserted into the FTS-Index.xml, the file has to be saved in UTF 8 encoding. In case the file was saved with ANSI encoding, the FTS-Index application cannot be loaded by Tomcat anymore, as it is not available in the Tomcat manager list of applications.

 

FTS-Index.xml configuration

FTS-Index.xml configuration

 

FTS-Index.xml stored

FTS-Index.xml stored

 

Note: If you want to use the full-text search for several WebOffice 10 R3 applications you have to create an application context descriptor file for each WebOffice 10 R3 application respectively for each search index application.

 

Note: After these steps a TomCat restart is recommended.

 

To validate the correct installation of the search index application, enter the URL like: http://[servername]:[tomcat-port]/search index application name. The filename of the application context descriptor file (without file extension) defines the application name of the search index application. In this case "FTS-Index".

 

Note: The name of the application context descriptor file (hence the name of the search index application) can be adapted. Thereby it is possible to use several search index applications on one server. (One search index application can only be used from one WebOffice 10 R3 application)

 

Applikation Solr

Applikation Solr

 

Additionally it is possible to make the following entry in the application context descriptor file:

<Valve className="org.apache.catalina.valves.RemoteAddrValve" allow="127.0.0.1"/>. The effect is, that the web application can only be used from localhost. Otherwise the interface http://[servername]:[tomcat-port]/search index application name/admin would be public accessible.

 

Note: To make the search index application also accessible for other hosts, you have to add the corresponding IP-addresses (comma separated).

 

Configuration of the full-text search (configuration of web application)

Configuration steps have to be done in the application configuration, on project level and on query-level.

 

Open the application configuration and add full-text search on node common. Enter the correct URL to your search index application at Searchindex address. The name of that application is also the name of the application context descriptor file (e. g. FTS-Index.xml) without file extension. For Details see chapter Full-text Search.

 

Note: Consider the following points to establish an active connection between the FTS-Index and WebOffice 10 R3 in a Single-Server-Deployment (i.e. WebOffice 10 R3 and FTS-Index are located on the same machine - standard scenario):

In case, a proxy is configured in the WebOffice 10 R3 application configuration, then the address of the FTS-Index (i.e. the local host name, respectively "localhost") has to be listed as exception or

the Tomcat port (typically port 8080) has to be unlocked for external connections in the local firewall.

 

Note: After the configuration of the web application you have to do a 'Reload application'.

 

full-text search - configuration of web application

full-text search - configuration of web application

 

Configuration of the full-text search (project level)

To configure the full-text search for a project, navigate in WebOffice author to Edit/Full-text search and enable the attribute "Use full-text search?".

 

Full-Text search - WebOffice Configuration

Full-Text search - WebOffice Configuration

 

Property

Description

Use full-text search?

Controls if the full-text search is available in the WebOffice 10 R3 Client or not.

GUI display in

Defines whether the search control of the full-text search is located in the toolbar ("Toolbar") or in the queries ("Queries") of the user interface.

Full-text search at start visible?

Specifies whether having the full-text search form at start visible ("Yes") or minimized ("No").

Note: This parameter is valid for WebOffice flex client.

Highlight full-text search control?

Specifies if the full-text search control gets highlighted with a glow effect ("Yes") or not ("No").

Max hits

Set maximum count of hits shown in result.

Note: If this attribute is not set, the corresponding value from "Defaults" will be used.

Maximum expanded results

Maximum size of a result list to be displayed automatically expanded in the "Result of Full-Text Search". A larger result list is displayed as a contracted node unless all results belong to the same layer.

Number of suggestions

Specifies the number of values given as suggestions for the full-text search. The suggestion elements are ordered by their search ranking (i.e. how precisely a result value fits the given search query). Elements with identical ranking are alphanumerically ordered.

Caution: The list of suggestion may not contain all resulting values, but only as many as configured here.

Note: If this attribute is not set, the corresponding value from "Defaults" will be used.

Max suggestion name length

The maximal length for displaying a suggestion value. Suggestion values of results with a longer object name are truncated and displayed with a trailing "..". If a layer is configured to show the layer name in the full-text search suggestion (to be configured under "Search result view -> Layer name in full-text suggestion?"), the layer name will occupy a portion of the length defined here).

Max suggestion layer name length

Maximally displayed length of the layer name when that is to be displayed as a part of the full-text search suggestion. Layer names that are too long are truncated and displayed with a trailing "..".

Note: Configuration under "Search result view -> Layer name in full-text suggestion?" See also chapter Search results.

Consider layer visibility

Specifies whether the layer visibility settings in the TOC (table of content) should be taken into account. If "Yes" is configured, full-text search results and suggestions will only be given for layers that are defined as visible.

Possible visibility scale ranges are not being taken into account.

Full-text search in WebOffice configuration

 

Configuration of the full-text search (Query)

As mentioned above the search index is made up of several subindices and an extra subindex will be created for each (configured) search layer (level query). Therefore you have to configure the attribute "Create index for full-text search?" with Yes (default). Thus the configuration of the query will be considered for the full-text search. The second parameter which can be defined for each search layer is the result weighting. Query results with a higher given weight will appear on top of the result list while lower weighted ones will show up rather at the bottom. For details see chapter Query.

 

Note: Currently the full-text search supports only feature classes, tables are not supported.

 

full-text search - Query

full-text search - Query

 

Only the configured search fields of the query are used for the full-text search (indexing). Following data types (of search fields) are supported: String, Integer, SmallInteger.

 

full-text search - searchfields

full-text search - searchfields

 

The result fields define (with the attribute Sort order/object name) the object name of a result record. Following data types (of result fields) are supported: String, Integer, SmallInteger, Double, GlobalID, GUID, OID.

 

full-text search - result fields

full-text search - result fields

 

Search fields and result fields of all queries and projects (for full-text search) will be aggregated. In case of conflicts in configurations (relating to a feature class), the aggregation of all configured elements will be used.

 

Generic search - project structure overall

Generic search - project structure overall

 

In menu "Extras" the node Generic search - value list behavior contains the parameter to define the minimum user input length for full-text search and the wait time before server request is submitted.

 

Full-text search in WebOffice Administration

If the full-text search is configured correctly in the application configuration, you get in synadmin an overview of the full-text search configuration. As you can see there is a new tab called 'Full text Search'. If you made the above mentioned configuration steps for the first time, there won't be any search index/sub indices (yellow exclamation mark).

full-text search synadmin

full-text search synadmin

 

In synadmin, as illustrated above, each configured subindex will be listed with the corresponding layer name and related information. It is important, that all projects (configured for the full-text search) are initialized.

The relevancy of each of the subindices and their information regarding their state is illustrated in synadmin (Explanations for column "state"). The blue arrow symbol, which exists for each layer individually, allows the user to generate a subindex. The user can also select the desired layers by ticking them, and create new subindices using the button "Recreate checked subindices". If the Subindices were successfully created, the information regarding their state will be displayed with "created" and the search layers are applied for the full-text search. The indices can be deleted with the buttons, which are located next to the buttons to create the subindices, or by clicking the "Delete checked subindices" button. Regardless of the state of the subindex the column "Weigh." shows the configured result weight of every subindex of the list.

 

full-text search - synadmin - index creation

full-text search - synadmin - index creation

 

In synadmin there is for each subindex an info-Button (right hand side) concerning details for subindices. The details include (amongst others) the name of the subindex (map service/layer), indexed search fields, indexed result names and the result weight.

 

Note: If objects are added, edited or deleted using edit functions of WebOffice, the concerning subindex will be updated automatically only if these objects are in the same WebOffice application as the full text search is configured in.

Pay attention to the following scenario: If objects of another WebOffice application (or on desktop) are edited, the subindex will not be updated automatically. In this case, the subindex has to be newly calculated by the administrator.

The calculation of specific (or all) subindices can be done using batch-able Admin Requests.

 

Note: If Lookups are configured subsequently on a search or result field that has already been indexed, you have to recreate the subindex so the lookups will be used also for the full-text search. Lookups will also be considered if the project is to be published in more than one language. Therefore, the correspondent tool has to be configured (Tool Change Language) in order to make a language change possible.

 

Note: If using WebOffice usermanagement you have to mind the following points: Restrictions for layers as well as attributive filters are considered for indexing of the full-text search. After changes in WebOffice usermanagement the affected subindices are marked as "out of date" and have to be recreated.

 

Note: After an uncontrolled termination of Tomcat, it could happen, that the file which regulates the write access to the search index, is not correctly deleted and so the creation of subindices isn't possible. The error message "Indexing not possible. Delete the file 'write.lock' in the solr/data/index directory of the FTS-Index." will be displayed. After manually deleting the file 'write.lock' (in FTS-Index/solr/data/index) and a restart of TomCat the problem will be solved.

 

Note: The amount of needed disk space of a subindex (and therefore the necessary time to create it) is directly coincident with the number of features of a layer. With very large data (approx. 1 million features or more) the creation of a subindex may take some time and requires a large amount of disk space (directory FTS-Index/solr/data).

During creation of a subindex the temporary needed disk space may exceed the finally required disk space by twice. The administrator has to make sure that enough free disk space is available for subindex creation.

full-text search - synadmin - subindex details

full-text search - synadmin - subindex details

 

In the tabular list of the subindex-details the queries which use a specified subindex are displayed. If there are queries in different projects, which use the same layers (feature classes), you can see here the aggregation of the configurations.

 

full-text search - detail list

full-text search - detail list

 

Note: Fields that have been configured hidden in the map service cannot be used for index creation. In the details of a selected subindex, hidden fields are displayed in [[double square brackets]].

 

Hidden fields cannot be used for the full-text search

Hidden fields cannot be used for the full-text search

 

Note: Fields that have been configured for external calls only will not be used for the full-text search. In the details of a selected subindex, search fields for external calls only are displayed in [~square bracket and tilde~].

Search fields to be used in external calls only will be ignored for the full-text search

Search fields to be used in external calls only will be ignored for the full-text search