You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "Alan Woodward (JIRA)" <ji...@apache.org> on 2019/01/16 11:05:00 UTC

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

    [ https://issues.apache.org/jira/browse/LUCENE-8644?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16743871#comment-16743871 ] 

Alan Woodward commented on LUCENE-8644:
---------------------------------------

This patch changes the signature of newSynonymQuery from `(Term[)]` to `(Map<Term, String>)`, a map of terms to their types.  It also makes some changes to GraphTokenStreamFiniteStrings to keep track of the type attribute.  It doesn't make any changes to query parser behaviour - this is purely to make the information available. 

> Pass token types to QueryBuilder.newSynonymQuery()
> --------------------------------------------------
>
>                 Key: LUCENE-8644
>                 URL: https://issues.apache.org/jira/browse/LUCENE-8644
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Alan Woodward
>            Assignee: Alan Woodward
>            Priority: Major
>         Attachments: LUCENE-8644.patch
>
>
> 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.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org