Commit Graph

46 Commits

Author SHA1 Message Date
github-actions[bot] 5a64fe7ea5 Version Packages 2021-06-24 09:58:38 +00:00
Eric Peterson c086a1cd92 Merge pull request #6134 from SDA-SE/feat/default-catalog-collator-error
Handle errors in collators and decorators and log them
2021-06-22 16:22:14 +02:00
Jesse Bye 3ec487502e Add test case; update changeset message
Signed-off-by: Jesse Bye <jbye@riskalyze.com>
2021-06-22 10:50:28 +02:00
Jesse Bye 7e7cec86ac Escape colons in Lunr search query filters
Signed-off-by: Jesse Bye <jbye@riskalyze.com>
2021-06-22 10:49:53 +02:00
Oliver Sand 9c8ea7e24e Handle errors in collators and decorators and log them.
Signed-off-by: Oliver Sand <oliver.sand@sda-se.com>
2021-06-21 18:22:30 +02:00
Fredrik Adelöw a88073c29a Update copyright headers
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2021-06-18 20:26:42 +02:00
Patrik Oldsberg 820de63018 Merge pull request #6076 from backstage/rugvip/allreports
scripts/api-extractor: create and check API reports for all(most) plugins
2021-06-17 15:46:11 +02:00
Patrik Oldsberg d8d7226fce plugins: generate api reports
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2021-06-17 13:30:06 +02:00
github-actions[bot] 36e5a82e9b Version Packages 2021-06-17 08:08:44 +00:00
Oliver Sand 6f0b0c1a33 Add tests for stemming and trimming
Signed-off-by: Oliver Sand <oliver.sand@sda-se.com>
2021-06-16 14:43:25 +02:00
Kevin facbe60532 fix: results are not accurate for search
Signed-off-by: Kevin <dl_xq@sina.com>
2021-06-16 15:36:04 +08:00
github-actions[bot] 4a93128245 Version Packages 2021-06-10 12:18:06 +00:00
Eric Peterson bbcd246cc8 Update search plugin READMEs to reflect new state of reality.
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-06-04 21:18:14 +02:00
Eric Peterson 0a032c55ce Fix bug causing search to be empty initially.
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-06-04 20:09:28 +02:00
Eric Peterson 8cb45d747a Make the QueryTranslator a more integral part of the SearchEngine API
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-06-03 16:28:05 +02:00
Eric Peterson 455b97b127 Make type(s) readonly properties of Collator/Decorator classes
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-06-03 16:28:05 +02:00
Eric Peterson b9b26ec572 Update decorator type-specific decorator test
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-06-03 16:28:05 +02:00
Eric Peterson f131c3de21 Fix Lunr tests to match new translation logic.
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-06-03 16:28:05 +02:00
Emma Indal 720fd2f360 prettier
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-06-03 16:28:04 +02:00
Eric Peterson 1f3e6dff88 Pass result type along from search engine.
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-06-03 16:28:04 +02:00
Emma Indal 8829e8228e wip composable result list
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-06-03 16:28:04 +02:00
Emma Indal 94d1d852e1 update lunr search query filters
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-06-03 16:28:04 +02:00
Emma Indal af6a718e82 change term presence in lunr query
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-06-03 16:28:04 +02:00
github-actions[bot] df31bdca8f Version Packages 2021-05-12 09:39:51 +00:00
github-actions[bot] d397eb470f Version Packages 2021-05-06 08:25:18 +00:00
github-actions[bot] 44abfaada6 Version Packages 2021-04-29 13:35:03 +02:00
Emma Indal 6c46febf63 Add tests for Scheduler
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
2021-04-27 11:08:37 +02:00
Emma Indal 4906a4c221 rename test file to be more specific to IndexBuilder
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
2021-04-27 11:07:55 +02:00
Emma Indal 266e46d3c3 switch from map to forEach
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
2021-04-27 11:07:08 +02:00
Emma Indal 50b15bfeb3 imports and exports
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
2021-04-26 16:44:32 +02:00
Emma Indal 9dff1a9839 use scheduler and fix tests
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
2021-04-26 16:43:58 +02:00
Emma Indal 0b9eac3a81 refactor build method in indexBuilder
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
2021-04-26 16:39:33 +02:00
Emma Indal da489d2cd3 add new Scheduler Class
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
2021-04-26 16:38:34 +02:00
Emma Indal 1c2d8436ab change log severity from info to debug
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
2021-04-26 13:38:15 +02:00
Emma Indal 8c0184a1c8 use timers in tests
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
2021-04-26 13:37:27 +02:00
Emma Indal cdda9c671d move refresh loop to builder and use configured refreshInterval
Signed-off-by: Emma Indal <emma.indahl@gmail.com>
2021-04-23 15:03:32 +02:00
github-actions[bot] 034998d537 Version Packages 2021-04-22 13:19:35 +00:00
Emma Indal b9b2b4b766 [Search] Lunr search engine support (#5290)
* add lunr package

Signed-off-by: Emma Indal <emma.indahl@gmail.com>

* add search translator type and search engine interface

Signed-off-by: Emma Indal <emma.indahl@gmail.com>

* (wip) add support for lunr search engine

Signed-off-by: Emma Indal <emma.indahl@gmail.com>

* lunr search engine support

Signed-off-by: Emma Indal <emma.indahl@gmail.com>

* clean up todo comments

Signed-off-by: Emma Indal <emma.indahl@gmail.com>

* typing and cleanups

Signed-off-by: Emma Indal <emma.indahl@gmail.com>

* move lunr type package from dev deps to deps

Signed-off-by: Emma Indal <emma.indahl@gmail.com>

* check if documents exist to index

Signed-off-by: Emma Indal <emma.indahl@gmail.com>

* test fixup

Signed-off-by: Emma Indal <emma.indahl@gmail.com>

* changeset

Signed-off-by: Emma Indal <emma.indahl@gmail.com>

* move LunrSearchEngine.ts to /engines and add tests

Signed-off-by: Emma Indal <emma.indahl@gmail.com>

* update imports

Signed-off-by: Emma Indal <emma.indahl@gmail.com>

* update error message

Signed-off-by: Emma Indal <emma.indahl@gmail.com>

* add comment to index rotation

Signed-off-by: Emma Indal <emma.indahl@gmail.com>

* Update plugins/search-backend-node/src/types.ts

Signed-off-by: Fredrik Adelöw freben@gmail.com

Co-authored-by: Fredrik Adelöw <freben@gmail.com>
Signed-off-by: Emma Indal <emma.indahl@gmail.com>

* Update plugins/search-backend-node/src/engines/LunrSearchEngine.ts

Signed-off-by: Emma Indal <emma.indahl@gmail.com>

Co-authored-by: Fredrik Adelöw <freben@gmail.com>

* Update plugins/search-backend-node/src/engines/LunrSearchEngine.ts

Signed-off-by: Emma Indal <emma.indahl@gmail.com>

Co-authored-by: Fredrik Adelöw <freben@gmail.com>

* fix imports

Signed-off-by: Emma Indal <emma.indahl@gmail.com>

* use type assertion to specify more specific ConcreteLunrQuery type

Signed-off-by: Emma Indal <emma.indahl@gmail.com>

* fix imports

Signed-off-by: Emma Indal <emma.indahl@gmail.com>

* consistent naming

Signed-off-by: Emma Indal <emma.indahl@gmail.com>

* change search engine to be parameter of constructor in indexBuilder

Signed-off-by: Emma Indal <emma.indahl@gmail.com>

* make engine required in router options and pass it through in createRouter used in standalone server

Signed-off-by: Emma Indal <emma.indahl@gmail.com>

* fix tests

Signed-off-by: Emma Indal <emma.indahl@gmail.com>

* delete import

Signed-off-by: Emma Indal <emma.indahl@gmail.com>

* add types to SearchQuery interface to make it possible to scope to specific index + test

Signed-off-by: Emma Indal <emma.indahl@gmail.com>

* clean up tests

Signed-off-by: Emma Indal <emma.indahl@gmail.com>

* handle case when a filter is added on a field that does not exist on all documents + test

Signed-off-by: Emma Indal <emma.indahl@gmail.com>

Co-authored-by: Fredrik Adelöw <freben@gmail.com>
2021-04-22 15:03:10 +02:00
github-actions[bot] 844da89090 Version Packages 2021-03-25 17:46:13 +00:00
Fredrik Adelöw 4d248725e6 detach the badges plugin from the catalog plugin
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2021-03-25 14:37:41 +01:00
Eric Peterson c491df119f Use void logger in test. 2021-03-19 09:42:49 +01:00
Eric Peterson fb2ff7dfb0 Provide useful logging in the IndexBuilder.
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-03-19 09:42:49 +01:00
Eric Peterson 3560405cab Call a builder a builder.
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-03-19 09:42:49 +01:00
Anders Näsman 5a045906c2 remove singleton pattern from indexer
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-03-19 09:42:49 +01:00
Anders Näsman 51fc8de48c Tweak Collator/Decorator to be classes instead of methods
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-03-19 09:42:48 +01:00
Anders Näsman 124b93bff4 rename plugin-search-indexer to plugin-search-backend-node
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-03-19 09:42:45 +01:00