Indexer

esc.index.Indexer
class Indexer(val indexWriter: IndexWriter, val similarityConfig: SimilarityConfig)

Class that provides the necessary functions to index individuals and organisations. As a help you can create an instance of the class using the IndexFactory (recommended).

Value parameters

indexWriter

Lucene IndexWriter.

similarityConfig

Optional. A SimilarityConfiguration.

Attributes

Graph
Supertypes
class Object
trait Matchable
class Any

Members list

Value members

Concrete methods

def addOrganisation(organisation: IndexOrganisation): Boolean

Add an organisation to the index. If an organisation has several names (e.g. alternative spellings, abbreviations etc.), the organisation must be added several times. You can add the same id several times. But this is not recommended! You get problems when updating the person by id. Recommended solution: Add different ids (e.g. with post-fix) and use the externalId as your unique id. You can configure (SimilarityConfig) whether the best match is selected/grouped by id oder externalId.

Add an organisation to the index. If an organisation has several names (e.g. alternative spellings, abbreviations etc.), the organisation must be added several times. You can add the same id several times. But this is not recommended! You get problems when updating the person by id. Recommended solution: Add different ids (e.g. with post-fix) and use the externalId as your unique id. You can configure (SimilarityConfig) whether the best match is selected/grouped by id oder externalId.

Value parameters

organisation

The organisation object for adding to the index.

Attributes

def addPerson(person: IndexPerson): Boolean

Add a person to the index. If a person has several names (e.g. alternative spellings, abbreviations or artist names etc.), the person must be added several times. You can add the same id several times. But this is not recommended! You get problems when updating the person by id. Recommended solution: Add different ids (e.g. with post-fix) and use the externalId as your unique id. You can configure (SimilarityConfig) whether the best match is selected/grouped by id oder externalId.

Add a person to the index. If a person has several names (e.g. alternative spellings, abbreviations or artist names etc.), the person must be added several times. You can add the same id several times. But this is not recommended! You get problems when updating the person by id. Recommended solution: Add different ids (e.g. with post-fix) and use the externalId as your unique id. You can configure (SimilarityConfig) whether the best match is selected/grouped by id oder externalId.

Value parameters

person

The person object for adding to the index.

Attributes

def close(): Boolean

Close the index.

Close the index.

Attributes

def commit(): Boolean

Commit the changes to the index.

Commit the changes to the index.

Attributes

def removeOrganisation(organisationId: String): Boolean

Removes an organisation from the index.

Removes an organisation from the index.

Value parameters

organisationId

The id of the organisation (the IndexOrganisation.id attribute when added).

Attributes

def removePerson(personId: String): Boolean

Removes a person from the index.

Removes a person from the index.

Value parameters

personId

The id of the person (the IndexPerson.id attribute when added).

Attributes

def updateOrganisation(organisation: IndexOrganisation): Boolean

Update an organisation.

Update an organisation.

Value parameters

organisation

IndexOrganisation with the new values. The id is relevant for selection the person to update.

Attributes

def updatePerson(person: IndexPerson): Boolean

Update a person.

Update a person.

Value parameters

person

IndexPerson with the new values. The id is relevant for selection the person to update.

Attributes

Concrete fields

val indexWriter: IndexWriter