Uploaded image for project: 'Solr'
  1. Solr
  2. SOLR-3350

TextField's parseFieldQuery method not using analyzer's enablePosIncr parameter

    XMLWordPrintableJSON

Details

    • Bug
    • Status: Open
    • Minor
    • Resolution: Unresolved
    • 3.5, 4.0-ALPHA
    • None
    • Schema and Analysis
    • None

    Description

      parseFieldQuery method of TextField class just set

        ...
        boolean enablePositionIncrements = true;
        ...
      

      while that should be taken from Analyzer's configuration.
      The above condition is evaluated afterwards in two points:

        ...
        if (enablePositionIncrements) {
          mpq.add((Term[]) multiTerms.toArray(new Term[0]), position);
        } else {
          mpq.add((Term[]) multiTerms.toArray(new Term[0]));
        }
        return mpq;
        ...
        ...
        if (enablePositionIncrements) {
          position += positionIncrement;
          pq.add(new Term(field, term), position);
        } else {
           pq.add(new Term(field, term));
        }
        ...
      

      Attachments

        Activity

          People

            Unassigned Unassigned
            teofili Tommaso Teofili
            Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

              Created:
              Updated: