Closed valencik closed 1 year ago
Had to revert the mapping style construction, as it only works nicely in Scala 3.
In Scala 2.13 we get:
too many arguments (found 2, expected 1) for method ->: (y: B): (String, B)
[error] "title" -> (_.title, analyzer),
And if you throw more parens around the tuple you lose type inference:
missing parameter type for expanded function ((<x$2: error>) => x$2.title)
[error] "title" -> ((_.title, analyzer)),
This PR adds a minor new class
SearchSchema
It allows search applications like RepoSearch to specify the mapping of field names to getters and analyzers only once. This is a pretty minor addition that I'd like to keep tweaking, but I figured I'd keep the PRs small and moving instead.