Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Entity property in multiple fulltext searches #457

Open
ondratra opened this issue Sep 14, 2021 · 1 comment
Open

Entity property in multiple fulltext searches #457

ondratra opened this issue Sep 14, 2021 · 1 comment

Comments

@ondratra
Copy link
Contributor

It seems that we can't include one entity property in multiple fulltext searches at the moment. An example scenario when this is needed is if we want to have one fulltext search searching exclusively in forum posts texts. And in the same time, have a second, more general fulltext search searching in forum posts' text, videos' and channels' descriptions, etc.

This schema is working:

type ForumPost @entity {
  title: String @fulltext(query: "forumPostSearch") 
} 

This schema is not supported:

type ForumPost @entity {
  # one possible definition
  title: String @fulltext(query: "forumPostSearch") @fulltext(query: "globalSearch")

  # possible alternative definition
  title: String @fulltext(query: ["forumPostSearch", "globalSearch"])
} 

type Video @entity {
  description: @fulltext(query: "globalSearch")
}
@dzhelezov
Copy link
Contributor

Perhaps we can replace the field-level @query with an object-level directive (e. g. '@FullTextQuery' similarly to how TheGraph does that). The rationale is that there will be extra parameters to tune in the future (e.g. language, strict/partial matches etc) that'd translate to different Postgres full-text searches.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

3 participants