lucene-dev mailing list archives

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


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:
  if (fieldVal.binaryValue() == null && fieldVal.stringValue() == null) {
  return (fieldVal.stringValue() != null) ? new BytesRef(fieldVal.stringValue()) : fieldVal.binaryValue();

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

(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:
>             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:

This message was sent by Atlassian JIRA

To unsubscribe, e-mail:
For additional commands, e-mail:

View raw message