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

Add article_case property to IElisionTokenFilter #3570

Closed
cgbeutler opened this issue Feb 12, 2019 · 2 comments
Closed

Add article_case property to IElisionTokenFilter #3570

cgbeutler opened this issue Feb 12, 2019 · 2 comments

Comments

@cgbeutler
Copy link

Describe the feature:
ElasticSearch allows for an elision filter to have a property called "article_case"

"french_elision": {
  "type": "elision",
  "articles_case": true,
  "articles": [
    "l", "m", "t", "qu", "n", "s", "j", "d", "c", "jusqu", "quoiqu", "lorsqu", "puisqu"
  ]
}

This property appears to be missing from the fluent definitions for Nest. It would be nice to have that added so one could truly recreate the default french filter as elastic search has it internally. This would probably involve adding ArticleCase to the IElisionTokenFilter.
Something like:

.Elision("french_elision", f => f
  .ArticlesCase(true)
  .Articles("l", "m", "t", "qu", "n", "s", "j", "d", "c", "jusqu", "quoiqu", "lorsqu", "puisqu"))
@cgbeutler cgbeutler changed the title Add article_case property to ElisionTokenFilterDescriptor Add article_case property to IElisionTokenFilter Feb 12, 2019
@russcam
Copy link
Contributor

russcam commented Feb 13, 2019

Thanks for opening @cgbeutler, this is missing. We'll add it into the next release.

In the meantime, you can add it by deriving from ElisionTokenFilter and add the property e.g.

public class MyElisionTokenFilter : ElisionTokenFilter 
{
    [PropertyName("articles_case")]
    public bool? ArticlesCase { get; set; }
}

and use this in your settings using .UserDefined("french_elision", <instance of MyElisionTokenFilter>)

@russcam
Copy link
Contributor

russcam commented Feb 13, 2019

Added #3572 to address

russcam added a commit that referenced this issue Mar 6, 2019
russcam added a commit that referenced this issue Mar 6, 2019
russcam added a commit that referenced this issue Mar 6, 2019
SukharevAndrey pushed a commit to SukharevAndrey/elasticsearch-net that referenced this issue Mar 13, 2019
russcam added a commit that referenced this issue Apr 3, 2019
Closes #3570

(cherry picked from commit 08025cd)
(cherry picked from commit e4ae292)
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

3 participants