[ 
https://issues.apache.org/jira/browse/SOLR-10425?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15957686#comment-15957686
 ] 

Tomás Fernández Löbbe commented on SOLR-10425:
----------------------------------------------

thanks Hoss. 
bq. the test schema explicitly declares many fields as 
useDocValuesAsStored="true" but that's actually the default based on the schema 
version=1.6 – making me suspicious of tests that are depending on that, or 
tests assuming that other fields don't have that.
Good point. Maybe we can explicitly set useDocValuesAsStored="true" in other 
fields?
bq. when i tried to write a testNonReturnable it fails for fields that have 
docvalues – even using new fields that i explicitly put 
useDocValuesAsStored=false on.
I'll take a look. In the {{testInternals}} method I just added I included this 
code:
{code:java}
for (LeafReaderContext leave : ir.leaves()) {
        LeafReader reader = leave.reader();
        for (int i = 0; i < reader.numDocs(); i++) {
          Document doc = reader.document(i, Collections.singleton(field));
          if (sf.stored()) {
            assertNotNull(doc.get(field));
          } else {
            assertNull(doc.get(field));
          }
        }
      }
{code}
That passes the tests...

> PointFields ignore indexed="false"
> ----------------------------------
>
>                 Key: SOLR-10425
>                 URL: https://issues.apache.org/jira/browse/SOLR-10425
>             Project: Solr
>          Issue Type: Bug
>      Security Level: Public(Default Security Level. Issues are Public) 
>            Reporter: Hoss Man
>         Attachments: SOLR-10425_hoss.patch, SOLR-10425.patch, SOLR-10425.patch
>
>
> (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...
> {noformat}
> 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}]
>   }}
> {noformat}
> Note that I can search on the doc using the  "hoss_points_check" field even 
> though it is {{docValues="false" indexed="false"}}



--
This message was sent by Atlassian JIRA
(v6.3.15#6346)

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to