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

No way to enforce an nGram filter #53

Open
djpentz opened this issue Mar 17, 2013 · 0 comments
Open

No way to enforce an nGram filter #53

djpentz opened this issue Mar 17, 2013 · 0 comments

Comments

@djpentz
Copy link

djpentz commented Mar 17, 2013

I can't seem to get the plugin to enforce an ngram filter for one of my indexes. I must confess I'm still trying to completely figure out from stepping through the code how much control the Config.groovy file gives me, but I declared the following in it to no avail:

elasticSearch {
index {
analysis {
analyzer {
"my_analyzer" {
type = "custom"
tokenizer = "lowercase"
filter = ["my_ngram"]
}
}
filter {
"my_ngram" {
type = "nGram"
min_gram = 2
max_gram = 10
}
}
}
}
}

In the domain class I indicate:

static searchable = {
    name boost: 2.0, analyzer: "my_analyzer"
}

Basically I want to be able to search through a list of companies in response to a typeahead control and be able to provide the user with a list of suggestions based on substring matches. Is this possible currently with the plugin or would I need to fork and roll my own?

Many thanks for a superb plugin!

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

No branches or pull requests

1 participant