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

PointFields ignore indexed="false"

    Details

    • Type: Bug
    • Status: Closed
    • Priority: Major
    • Resolution: Fixed
    • Affects Version/s: None
    • Fix Version/s: 6.5.1, 6.6, 7.0
    • Component/s: None
    • Security Level: Public (Default Security Level. Issues are Public)
    • Labels:
      None

      Description

      (NOTE: description below focuses on IntPointField, but problem seems to affect all PointField subclasses)

      There seems to be a disconnect between PointField.createFields -> IntPointField.createField -> PointField.isFieldUsed that results in an org.apache.lucene.document.IntPoint being created for each field value, even if field is indexed="false"

      Steps to reproduce...

      bin/solr -e techproducts
      ...
      curl -X POST -H 'Content-type:application/json' --data-binary '{
        "add-field":{
           "name":"hoss_points_check",
           "type":"pint",
           "stored":true,
           "docValues":false,
           "indexed":false}
      }' http://localhost:8983/solr/techproducts/schema
      ...
      curl -X POST -H 'Content-type:application/json' --data-binary '[{"id":"HOSS","hoss_points_check":42}]' 'http://localhost:8983/solr/techproducts/update/json?commit=true'
      ...
      curl 'http://localhost:8983/solr/techproducts/query?q=id:HOSS'
      {
        "responseHeader":{
          "status":0,
          "QTime":3,
          "params":{
            "q":"id:HOSS"}},
        "response":{"numFound":1,"start":0,"docs":[
            {
              "id":"HOSS",
              "hoss_points_check":42,
              "_version_":1563795876337418240}]
        }}
      curl 'http://localhost:8983/solr/techproducts/query?q=hoss_points_check:42'
      {
        "responseHeader":{
          "status":0,
          "QTime":2,
          "params":{
            "q":"hoss_points_check:42"}},
        "response":{"numFound":1,"start":0,"docs":[
            {
              "id":"HOSS",
              "hoss_points_check":42,
              "_version_":1563795876337418240}]
        }}
      

      Note that I can search on the doc using the "hoss_points_check" field even though it is docValues="false" indexed="false"

        Attachments

        1. SOLR-10425_hoss.patch
          26 kB
          Hoss Man
        2. SOLR-10425.patch
          57 kB
          Hoss Man
        3. SOLR-10425.patch
          51 kB
          Tomás Fernández Löbbe
        4. SOLR-10425.patch
          45 kB
          Tomás Fernández Löbbe
        5. SOLR-10425.patch
          26 kB
          Tomás Fernández Löbbe
        6. SOLR-10425.patch
          16 kB
          Tomás Fernández Löbbe

          Activity

            People

            • Assignee:
              tomasflobbe Tomás Fernández Löbbe
              Reporter:
              hossman Hoss Man
            • Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

              • Created:
                Updated:
                Resolved: