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

[prototype] natural content filtering #68

Closed
wants to merge 9 commits into from

Conversation

bdunogier
Copy link
Owner

@bdunogier bdunogier commented Nov 12, 2018

The collection field for a type (articles, blogPosts) will expose an argument
for each searchable field:

{
  media {
    images(name: "~norway") {
      _name
    }
  }
  content {
    products(price: "> 20", gluten: false) {
      _name
    }
  }
}

Supported operators (as first characters of the string): ~ (like, with automatic wildcards), <, >, <=, >=).

TODO

  • Add syntax for not (!~norway)
  • Accept array of values arguments where at least one value has an operator as a OR.
  • Handle date fields (publicationDate: "< 2018/11/10")
  • Refactor fields filters processing, and ideally unit test it.
  • Figure out what's "searchable" when the LSE is used. It is actually detected when converting the criteria using the LegacyConverter's getIndexColumn() method, that returns false for these fields. It may have to be taken into account at schema generation's time, but the schema will then depend on the environment / search engine.
  • Reintroduce non-field filters (fulltext, parent location...), probably prefixed with _
  • Add fields to sortBy as well

Bertrand Dunogier added 3 commits November 12, 2018 16:50
The collection field for a type (`articles`, `blogPosts`) will expose an argument
for each searchable field:

```
{
  media {
    images(name: "~norway") {
      name
      uri
    }
  }
}
```

Supported operators (as first characters of the string): ~ (like, with automatic wildcards), <, >, <=, >=).
@bdunogier bdunogier added this to the 0.4 milestone Nov 12, 2018
@bdunogier bdunogier changed the title Prototyped an improved way to filter content [prototype] natural content filtering Jan 18, 2019
@bdunogier bdunogier closed this Jan 24, 2019
@bdunogier
Copy link
Owner Author

Moved to ezsystems/ezplatform-graphql#5.

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

Successfully merging this pull request may close these issues.

1 participant