Files
backstage/plugins/search-backend-module-pg
Andre Wanlin b7de76ae72 Introduced version policy for PostgreSQL
Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Added changeset

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Updated API Report

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Updated references to use 12 and 16

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Attempt to fix tests

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Added back old Ids

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Fixed test

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Updated API Report and test

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Added new setDefaults static method and related changes

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Updated API Report

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Improved logic based on feedback

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Added missing changeset

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Changes based on feedback

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

API Report correction

Signed-off-by: Andre Wanlin <awanlin@spotify.com>

Updated to use new setDefaults

Signed-off-by: Andre Wanlin <awanlin@spotify.com>
2023-12-15 12:27:51 -06:00
..
2022-12-03 16:24:57 +01:00
2023-12-12 15:45:17 +00:00
2023-12-12 15:45:17 +00:00

search-backend-module-pg

This plugin provides an easy to use SearchEngine implementation to use with the @backstage/plugin-search-backend based on Postgres. Therefore it targets setups that want to avoid maintaining another external service like elastic search. The search provides decent results and performs well with ten thousands of indexed documents. The connection to postgres is established via the database manager also used by other plugins.

Important

: The search plugin requires at least Postgres 12!

Getting started

See Backstage documentation for details on how to setup Postgres based search for your Backstage instance.

Optional Configuration

The following is an example of the optional configuration that can be applied when using Postgres as the search backend. Currently this is mostly for just the highlight feature:

search:
  pg:
    highlightOptions:
      useHighlight: true # Used to enable to disable the highlight feature. The default value is true
      maxWord: 35 # Used to set the longest headlines to output. The default value is 35.
      minWord: 15 # Used to set the shortest headlines to output. The default value is 15.
      shortWord: 3 # Words of this length or less will be dropped at the start and end of a headline, unless they are query terms. The default value of three (3) eliminates common English articles.
      highlightAll: false # If true the whole document will be used as the headline, ignoring the preceding three parameters. The default is false.
      maxFragments: 0 # Maximum number of text fragments to display. The default value of zero selects a non-fragment-based headline generation method. A value greater than zero selects fragment-based headline generation (see the linked documentation above for more details).
      fragmentDelimiter: ' ... ' # Delimiter string used to concatenate fragments. Defaults to " ... ".

Note: the highlight search term feature uses ts_headline which has been known to potentially impact performance. You only need this minimal config to disable it should you have issues:

search:
  pg:
    highlightOptions:
      useHighlight: false

The Postgres documentation on Highlighting Results has more details.