[
https://issues.apache.org/jira/browse/SOLR-7264?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14367612#comment-14367612
]
Hoss Man commented on SOLR-7264:
--------------------------------
bq. So, are booleans just stored as in int in Lucene?
how lucene "stores" values is ambigiuous when talking about datatimes, and not
particularly relevant when talking about DocValues. I think the point rmuir
was making is that lucene doesn't have any special low level support for
boolean values in the DocValues api is because (if i remember correctly) there
isn't really any reason to do so -- when the DocValues for a field are all
small int values (like "0" and "1") then the automatic encoding/compression of
those values is just as efficient as if there was special single bit support.
So yes: if you patch BoolField to implement the appropriate methods for
supporting docValues and you do so by using (int)1 for true and (int)0 for
false that should work fine and be plenty efficient.
> DocValues should support BoolField
> ----------------------------------
>
> Key: SOLR-7264
> URL: https://issues.apache.org/jira/browse/SOLR-7264
> Project: Solr
> Issue Type: Improvement
> Affects Versions: 5.0
> Reporter: Kevin Osborn
>
> DocValues supports numerics and strings, but it currently does not support
> booleans. Please add this support.
> Here is the error message you get if you try to use DocValues with a
> BoolField.
> ERROR - 2015-03-18 00:49:54.041; org.apache.solr.common.SolrException;
> null:org.apache.solr.common.SolrException: SolrCore 'test' is not available
> due to init failure: Could not load conf for core test: F
> ield type
> boolean{class=org.apache.solr.schema.BoolField,analyzer=org.apache.solr.schema.FieldType$DefaultAnalyzer,args={sortMissingLast=true,
> class=solr.BoolField}} does not support doc values. Schema fi
> le is /Users/kosborn/solr/server/solr/test/conf/schema.xml
--
This message was sent by Atlassian JIRA
(v6.3.4#6332)
---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]