apache / apache/lucene

Pass token types to QueryBuilder.newSynonymQuery() [LUCENE-8644]

Open
#9,690 4 comments 0 reactions 1 assignee Claimed by @romseygeek View on GitHub
legacy-jira-priority:Major type:enhancement
Dominant language
Java
Stars
3.6k
Forks
1.4k
Avg merge
2d 11h
Merged PRs (30d)
88

Description

SynonymGraphFilter distinguishes between input tokens and tokens that it injects into the token stream by setting the TypeAttribute to SYNONYM.  QueryBuilder currently ignores this information, but it would be useful to pass it through to the newSynonymQuery() method, as this would allow queryparsers to apply differential boosts to synonyms and original terms.

---
Migrated from [LUCENE-8644](https://issues.apache.org/jira/browse/LUCENE-8644) by Alan Woodward (@romseygeek), updated Jan 18 2019
Attachments: [LUCENE-8644.patch](https://apache.github.io/lucene-jira-archive/attachments/LUCENE-8644/LUCENE-8644.patch) (versions: 2)

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.