Commit Graph

21 Commits

Author SHA1 Message Date
Patrik Oldsberg 8142a8ecb2 packages,plugins: add package documentation
Signed-off-by: Patrik Oldsberg <poldsberg@gmail.com>
2021-09-14 18:47:53 +02:00
Oliver Sand 532b4cc656 Rework search paging based on cursors
Signed-off-by: Oliver Sand <oliver.sand@sda-se.com>
2021-09-02 10:22:41 +02:00
Oliver Sand eb81a5fdfb Implement offset and limit based paging in search API
Signed-off-by: Oliver Sand <oliver.sand@sda-se.com>
2021-09-02 10:19:32 +02:00
Adam Harvey 5fd7316f5d Improve search logging
Signed-off-by: Adam Harvey <adaharve@cisco.com>
2021-08-05 21:19:51 -04: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
Fredrik Adelöw 3108ff7bfd Make yarn dev for backends respect the PLUGIN_PORT env var
Signed-off-by: Fredrik Adelöw <freben@gmail.com>
2021-06-14 14:46:19 +02: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
Anders Näsman 5e70312d67 unwind dependencies
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-03-19 09:42:04 +01:00
Anders Näsman 4abd922fb5 moved types from search-backend to search-common
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-03-19 09:42:04 +01:00
Anders Näsman f9b203e07e cursor pagination
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-03-19 09:42:03 +01:00
Anders Näsman b7cb59dd7b standard TODO syntax
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-03-19 09:42:03 +01:00
Eric Peterson 2c759b452a Clean up query types, ensure we've got room to expand on the result items.
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-03-19 09:42:03 +01:00
Eric Peterson ed6508d06c Clean up error handling.
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-03-19 09:42:03 +01:00
Eric Peterson ca74761fce Add a simple sanity test to the search-backend plugin.
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-03-19 09:42:03 +01:00
Eric Peterson 0c04830e8b (C)*
Co-authored-by: Adam Harvey <adam.harvey@dxc.com>
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-03-19 09:42:02 +01:00
Eric Peterson a9c1a72016 (C)*
Co-authored-by: Adam Harvey <adam.harvey@dxc.com>
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-03-19 09:42:02 +01:00
Eric Peterson b7b4cc319c Wire up search backend to app backend testbed.
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-03-19 09:41:15 +01:00
Eric Peterson e0854f10d5 Set up an unused method to illustrate type usage / communication between search frontend and backend
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-03-19 09:39:59 +01:00
Eric Peterson 04b492d404 Use IndexableDocument in search result set.
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-03-19 09:38:45 +01:00
Anders Näsman 7f4d402226 add types
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-03-19 09:38:45 +01:00
Anders Näsman 2c58ccaeee initial search-backend setup
Signed-off-by: Eric Peterson <ericpeterson@spotify.com>
2021-03-19 09:38:44 +01:00