You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@lucene.apache.org by "David Smiley (JIRA)" <ji...@apache.org> on 2018/10/25 16:14:00 UTC
[jira] [Commented] (SOLR-10198) EmbeddedSolrServer embedded
behavior different from HttpSolrClient
[ https://issues.apache.org/jira/browse/SOLR-10198?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16663957#comment-16663957 ]
David Smiley commented on SOLR-10198:
-------------------------------------
Agreed this is a bug (usability). Solr ought to convert the types from Lucene Field subclasses to whatever the object types ought to be. Solr's already doing this sort of thing in other places; it'd be nice to standardize this.
> EmbeddedSolrServer embedded behavior different from HttpSolrClient
> ------------------------------------------------------------------
>
> Key: SOLR-10198
> URL: https://issues.apache.org/jira/browse/SOLR-10198
> Project: Solr
> Issue Type: Bug
> Security Level: Public(Default Security Level. Issues are Public)
> Components: SolrJ
> Affects Versions: 6.4.1
> Reporter: Bert Summers
> Priority: Major
>
> When retrieving the value of a field the object type is different depending on the server type.
> If I have a schema which has <field name="id" type="int" indexed="true" stored="true" required="true" />
> If I do
> solrClient.queryAndStreamResponse("test", new SolrQuery("*:*"), new StreamingResponseCallback {
> @Override
> public void streamSolrDocument(final SolrDocument doc) {
> Object idField = doc.getFieldValue("id");
> }
> @Override
> public void streamDocListInfo(final long numFound, final long start, final Float maxScore) {
> System.out.println("Found " + numFound + " documents");
> }
> });
> in streamSolrDocument the Object type is Integer if the server is http but StoredField if embedded.
> Both the server and embedded use the same schema.xml and solrconfig.xml
> In version 5.1.0 both connections would return the same type (Integer)
--
This message was sent by Atlassian JIRA
(v7.6.3#76005)
---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org
For additional commands, e-mail: dev-help@lucene.apache.org