Skip to content

Commit

Permalink
feat: code review comments
Browse files Browse the repository at this point in the history
  • Loading branch information
jachro committed Mar 7, 2024
1 parent 91603ee commit 123a411
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 4 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -89,8 +89,8 @@ object SearchEntity:
FieldName(discriminatorField),
Schema.string,
List(
implicitly[Schema[Project]].name.map(SRef(_)).map("Project" -> _),
implicitly[Schema[User]].name.map(SRef(_)).map("User" -> _)
summon[Schema[Project]].name.map(SRef(_)).map("Project" -> _),
summon[Schema[User]].name.map(SRef(_)).map("User" -> _)
).flatten.toMap
)
)
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,7 @@ import cats.syntax.all.*
import io.renku.search.model.EntityType
import io.renku.search.model.projects.Visibility
import io.renku.search.query.{Comparison, Field}
import io.renku.search.solr.documents.{Entity, Project as SolrProject, User as SolrUser}
import io.renku.search.solr.documents.{Project as SolrProject, User as SolrUser}
import io.renku.search.solr.schema.EntityDocumentSchema.Fields as SolrField
import io.renku.solr.client.schema.FieldName

Expand Down Expand Up @@ -73,7 +73,7 @@ object SolrToken:
def dateLt(field: Field, date: Instant): SolrToken =
fieldIs(field, s"[* TO ${fromInstant(date)}]")

val allTypes: SolrToken = Entity.allTypes.map(fieldIs(Field.Type, _)).toList.combineAll
val allTypes: SolrToken = fieldIs(Field.Type, "*")

private def fieldOp(field: Field, op: Comparison, value: SolrToken): SolrToken =
val cmp = fromComparison(op)
Expand Down

0 comments on commit 123a411

Please sign in to comment.