Package org.apache.solr.client.solrj.response.LukeResponse

Examples of org.apache.solr.client.solrj.response.LukeResponse.FieldTypeInfo


                        query.addFilterQuery(name + ":*");
                    }
                    QueryResponse rsp = solrServer.query(query);
                    long founds = rsp.getResults().getNumFound();

                    FieldTypeInfo fty = processSchema.getFieldTypeInfo(type);
                    if (fty != null) {
                        Class<?> objType = SolrUtils.decodeSolrFieldType(fty.getClassName());
                        if (objType != null) {
                            ExtendedFieldSchemaInfo extendedFieldSchemaInfo = new SolrUtils.ExtendedFieldSchemaInfo(
                                    processSchema, processField, name);
                            SolrAttribute at = new SolrAttribute(name, objType);
                            if (extendedFieldSchemaInfo.getUniqueKey()) {
                                at.setPk(true);
                                at.setUse(true);
                            }
                            if (extendedFieldSchemaInfo.getMultivalued()
                                    && !Geometry.class.isAssignableFrom(at.getType())) {
                                at.setType(String.class);
                            }
                            at.setEmpty(founds == 0);
                            solrAttributes.add(at);
                        } else {
                            if (LOGGER.isLoggable(Level.FINE)) {
                                LOGGER.log(Level.FINE, "Skipping attribute " + fty.getName()
                                        + " as we don't know how to map its type to a java object "
                                        + fty.getClassName());
                            }
                        }
                    }
                }
                // Reorder fields: empty after
View Full Code Here

TOP

Related Classes of org.apache.solr.client.solrj.response.LukeResponse.FieldTypeInfo

Copyright © 2018 www.massapicom. All rights reserved.
All source code are property of their respective owners. Java is a trademark of Sun Microsystems, Inc and owned by ORACLE Inc. Contact coftware#gmail.com.