-
Notifications
You must be signed in to change notification settings - Fork 1.1k
Open
Labels
Description
[REQUIRED] Environment info
firebase-tools: I used the console
Platform: macOS
[REQUIRED] Test case
Create the following table:
type Book @table(key: ["id"]) {
id: String!
title: String! @searchable
}
Mock Data:
id: "1", title: "Large book"
id: "2", title: "large_book_3"
id: "3", title: "large-book-4"
id: "4", title: "small-book"
Then query the titles this way:
query getBooks($search: String) {
books_search(
query: $search
) {
id
title
_metadata {
relevance
}
}
}
[REQUIRED] Steps to reproduce
- Deploy the schema above to a Firebase Data Connect instance.
- Insert the four "book" records listed in the test case.
- Execute the getBooks query using the search string: "Large book".
- Observe the _metadata.relevance field for all returned records.
[REQUIRED] Expected behavior
The record with the title "Large book" should have a higher relevance score than "large_book_3" or "large-book-4" because it is an exact case-insensitive match.
[REQUIRED] Actual behavior
All matching records return the exact same relevance value, making it impossible to rank results by quality.
tobiaschristensen and federicobaiocco