github appbaseio/reactivesearch-api 8.24.0

11 hours ago

Enhancements

  • Adds support for approximate KNN (ANN) for Elasticsearch and OpenSearch in ReactiveSearch API. The same search endpoint allows faceting and text filtering alongside kNN vector search. Note: For OpenSearch, ANN requires lucene or faiss engines for use with faceting and text filtering.
  • When AI preferences are configured, setting queryVector in the API is optional

Example with ReactiveSearch API:

{
    "query": [
        {
            "id": "term",
            "type": "term",
            "dataField": "tags.keyword",
            "value": "Fashion",
            "execute": false
        },
        {
            "id": "one-line-search",
            "type": "search",
            "dataField": "one_liner",
            "value": "dresses",
            "execute": false
        },
        {
            "id": "search",
            "vectorDataField": "vector_data", // instead of "dataField" to indicate kNN search type
            "includeFields": [
                "name",
                "one_liner",
                "tags"
            ],
            "react": {
                "and": [
                    "term",
                    "one-line-search"
                ]
            },
            "value": "personalise"
        }
    ],
    "settings": {
        "useCache": false
    }
}

Using KNN when AI preferences are configured is as simple as setting vectorDataField instead of dataField. ReactiveSearch uses the AI preferences (embedding model configured, currently supports OpenAI) to generate a query vector from the user passed value. If AI preferences are not configured, queryVector is expected to be passed alongside.

Chore

  • Updates to Go 1.23.5 (latest current version)
  • Removes use of Sentry for remote error tracking

Don't miss a new reactivesearch-api release

NewReleases is sending notifications on new releases.