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

Robert Muir commented on LUCENE-6466:
-------------------------------------

Can we replace methods like this one in SpanTermQuery with calls to 
Collections.singletonMap?

{code}
  protected static Map<Term, TermContext> toMap(Term term, TermContext 
termContext) {
    Map<Term, TermContext> map = new HashMap<>();
    map.put(term, termContext);
    return map;
  }
{code}

> Move SpanQuery.getSpans() to SpanWeight
> ---------------------------------------
>
>                 Key: LUCENE-6466
>                 URL: https://issues.apache.org/jira/browse/LUCENE-6466
>             Project: Lucene - Core
>          Issue Type: Improvement
>            Reporter: Alan Woodward
>            Priority: Minor
>             Fix For: Trunk, 5.3
>
>         Attachments: LUCENE-6466-2.patch, LUCENE-6466-2.patch, 
> LUCENE-6466.patch, LUCENE-6466.patch, LUCENE-6466.patch, LUCENE-6466.patch, 
> LUCENE-6466.patch
>
>
> SpanQuery.getSpans() should only be called on rewritten queries, so it seems 
> to make more sense to have this being called from SpanWeight



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)

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

Reply via email to