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

Hoss Man commented on SOLR-10425:
---------------------------------


At first glance, I thought maybe this may have been an intentional design 
choice that tomas made with the mindset of:
* users should not declare a "Point" field unless they definitely wanted a BKD 
Point structure on disk
* the {{"indexed"}} should only apply to creating the {{Terms}} based inverted 
index files, not the BKD points files

But this doesn't jive with the existing test configs (such as 
{{schema-point.xml}}) where many point fields explicitly use {{indexed="true"}}

It's also really important to ensure we have _some_ way to support users who 
want an "integer" type field that is {{stored="true"}} but don't care about it 
being searchable/sortable w/o wasting disk space -- even once/if we 
deprecate/remove {{TrieIntField}}}


----

I believe the fix here is a pretty straight forward: 
{{IntPointField.createField}} should ignore {{isFieldUsed()}} and just check 
{{field.indexed()}} -- allthough some other tweaks/null-checks may be needed in 
{{PointField.createFields}} & obviously we should get a lot more tests of these 
edge cases to smoke those out.

i'm hoping [~tomasflobbe]  will chime in with a sanity check that i'm not 
missing some major reason why things work this way before i go too deep down 
hte rabit hole of writting new 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
>
> (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