Github user alessandrobenedetti commented on a diff in the pull request:

    https://github.com/apache/lucene-solr/pull/398#discussion_r195689810
  
    --- Diff: 
lucene/suggest/src/java/org/apache/lucene/search/suggest/InputIterator.java ---
    @@ -34,7 +34,7 @@
     public interface InputIterator extends BytesRefIterator {
     
       /** A term's weight, higher numbers mean better suggestions. */
    --- End diff --
    
    Hi Michael,
    The reason to allow for null at the InputIterator level is to distinguish 
it from an explicit 0 weight.
    In the DocumentDictionary this translates in differentiating when  the 
weight field was missing for the original document ( NULL ) in opposition to 
when the weight field was present and with 0 value.
    At this level we just want to ensure that the same behavior is maintained 
when we build the auxiliary index : 
    i.e. if the weight field was missing for the original document, I want it 
to be null for the auxiliary index as well.
    How the different suggesters implementation will use this to return a 
suggestion score, I think will depend on a case by case scenario.
    Did I misunderstand anything here ?


---

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

Reply via email to