Package org.apache.solr.common

Examples of org.apache.solr.common.SolrInputField


            }
          }
          if (value.length() > 0) {
            boolean bAdd = true;
            if (activeFieldName.endsWith("_ss")) {
              SolrInputField ss = solrDoc.getField(activeFieldName);
              if (ss != null) {
                for (Object obj: ss.getValues()) {
                  String s = (String)obj;
                  if (s.equals(value)) {
                    bAdd = false;
                    break;
                  }
View Full Code Here


    item.categories = new String[] { "aaa", "bbb", "ccc" };
    SolrInputDocument out = new SolrInputDocument();
    converter.write(item, out);

    Assert.assertEquals(item.id, out.getFieldValue("id"));
    SolrInputField catfield = out.getField("cat");
    Assert.assertEquals(3, catfield.getValueCount());

    List<String> catValues = (List<String>) catfield.getValue();
    Assert.assertEquals("aaa", catValues.get(0));
    Assert.assertEquals("bbb", catValues.get(1));
    Assert.assertEquals("ccc", catValues.get(2));
  }
View Full Code Here

                addFieldsToDocument(doc, fields);
               
                List<String> syntheticField = new ArrayList<String>();
                for (Map.Entry<String, SolrInputField> entry : doc.entrySet())
                {
                    SolrInputField field = entry.getValue();
                    Object value = field.getFirstValue();
                   
                    if (value != null)
                    {
                        syntheticField.add(value.toString());
                    }
View Full Code Here

TOP

Related Classes of org.apache.solr.common.SolrInputField

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.