Solr
  1. Solr
  2. SOLR-3350

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

    Details

    • Type: Bug Bug
    • Status: Open
    • Priority: Minor Minor
    • Resolution: Unresolved
    • Affects Version/s: 3.5, 4.0-ALPHA
    • Fix Version/s: None
    • Component/s: Schema and Analysis
    • Labels:
      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));
        }
        ...
      

        Activity

          People

          • Assignee:
            Unassigned
            Reporter:
            Tommaso Teofili
          • Votes:
            0 Vote for this issue
            Watchers:
            1 Start watching this issue

            Dates

            • Created:
              Updated:

              Development