Skip to content

Add ngram updates #189

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

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open

Conversation

matthewmcneely
Copy link
Member

No description provided.

@Copilot Copilot AI review requested due to automatic review settings August 21, 2025 21:39
@matthewmcneely matthewmcneely requested a review from a team as a code owner August 21, 2025 21:39
Copy link
Contributor

@Copilot Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull Request Overview

This PR adds support for the ngram search index type across Dgraph documentation, including comprehensive documentation of its functionality and usage patterns.

  • Adds ngram index support to GraphQL and DQL documentation
  • Updates existing documentation for consistency and clarity improvements
  • Provides detailed examples of ngram search functionality for contiguous sequence matching

Reviewed Changes

Copilot reviewed 5 out of 5 changed files in this pull request and generated 3 comments.

Show a summary per file
File Description
dgraph/graphql/schema/directives/search.mdx Adds ngram search documentation with examples and updates terminology consistency
dgraph/graphql/schema/dgraph-schema.mdx Adds ngram to DgraphIndex enum
dgraph/dql/indexes.mdx Documents ngram index in the string indexes table
dgraph/dql/functions.mdx Adds comprehensive ngram function documentation with usage examples
dgraph/concepts/index-tokenize.mdx Fixes spelling error in "Similarly"

Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.

@@ -85,15 +85,13 @@ contain the term "GraphQL".

```graphql
queryAuthor(filter: { name: { eq: "Diggy" } } ) {
posts(filter: { title: { anyofterms: "GraphQL" }}) {
title
}
Copy link
Preview

Copilot AI Aug 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The code block is incomplete - it's missing the closing brace and content. The removal of lines 88-89 appears to have left this query example broken.

Copilot uses AI. Check for mistakes.


`fulltext` search is Google-stye text search with stop words, stemming. etc. So
`alloftext: "run woman"` would match "run" as well as "running", etc. For
example, to find posts that talk about fantastic GraphQL tutorials:
Copy link
Preview

Copilot AI Aug 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The removal of the explanation about allofterms vs anyofterms behavior (lines 284-286) leaves the term search section incomplete. The documentation should explain the difference between these two important search operations.

Copilot uses AI. Check for mistakes.


`fulltext` search is Google-stye text search with stop words, stemming. etc. So
`alloftext: "run woman"` would match "run" as well as "running", etc. For
example, to find posts that talk about fantastic GraphQL tutorials:
Copy link
Preview

Copilot AI Aug 21, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The removal of the explanation about fulltext search behavior (lines 286-288) removes important context about how fulltext search differs from term search, including stemming and stop word handling.

Suggested change
example, to find posts that talk about fantastic GraphQL tutorials:
Fulltext search differs from term search in that it supports stemming and stop word removal. This means that queries using fulltext search will match words with similar roots (e.g., "tutorial" and "tutorials") and ignore common stop words (e.g., "the", "and", "is"). For example, to find posts that talk about fantastic GraphQL tutorials:

Copilot uses AI. Check for mistakes.

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

Successfully merging this pull request may close these issues.

1 participant