lucene-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Michael McCandless (JIRA)" <j...@apache.org>
Subject [jira] [Commented] (LUCENE-5833) Suggestor Version 2 doesn't support multiValued fields
Date Fri, 26 Sep 2014 15:41:34 GMT

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

Michael McCandless commented on LUCENE-5833:
--------------------------------------------

Thanks Varun.

Maybe instead of currentFieldsPosition name it nextFieldsPosition?
I.e, it's the index for the next value the iterator should return?

Maybe simplify this:
{noformat}
  if (fieldVal.binaryValue() == null && fieldVal.stringValue() == null) {
    continue;
  }
  return (fieldVal.stringValue() != null) ? new BytesRef(fieldVal.stringValue()) : fieldVal.binaryValue();
{noformat}

to something like this:
{noformat}
  if (fieldVal.binaryValue() != null) {
    return fieldVal.binaryValue();
  } else if (fieldValue.stringValue() != null) {
    return new BytesRef(fieldValue.stringValue());
  } else {
    continue;
  }
{noformat}

(And also where this pattern is used again towards the end of the
while loop).  And I think also fix the similarly confusing
pre-existing payload null checking?

Can we move the {{BytesRef tempTerm}} type declaration down to where
we actually assign it?

Can you pull out the {{atLeast(N)}} from the for loops,
e.g. {{for(int j=0; j<atLeast(2); j++)}}?  That is eval'd on each loop
iteration, so it's ... strange to call it over and over.


> Suggestor Version 2 doesn't support multiValued fields
> ------------------------------------------------------
>
>                 Key: LUCENE-5833
>                 URL: https://issues.apache.org/jira/browse/LUCENE-5833
>             Project: Lucene - Core
>          Issue Type: Bug
>          Components: modules/other
>    Affects Versions: 4.8.1
>            Reporter: Greg Harris
>            Assignee: Steve Rowe
>         Attachments: LUCENE-5833.patch, LUCENE-5833.patch, SOLR-6210.patch
>
>
> So if you use a multiValued field in the new suggestor it will not pick up terms for
any term after the first one. So it treats the first term as the only term it will make it's
dictionary from. 
> This is the suggestor I'm talking about:
> https://issues.apache.org/jira/browse/SOLR-5378



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

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


Mime
View raw message