Examples of NamedList


Examples of org.apache.solr.common.util.NamedList

  }

  private List<NamedList> solrInputDocumentToList(SolrInputDocument doc) {
    List<NamedList> l = new ArrayList<NamedList>();
    NamedList nl = new NamedList();
    nl.add("boost", doc.getDocumentBoost() == 1.0f ? null : doc.getDocumentBoost());
    l.add(nl);
    Iterator<SolrInputField> it = doc.iterator();
    while (it.hasNext()) {
      nl = new NamedList();
      SolrInputField field = it.next();
      nl.add("name", field.getName());
      nl.add("val", field.getValue());
      nl.add("boost", field.getBoost() == 1.0f ? null : field.getBoost());
      l.add(nl);
    }
    return l;
  }
View Full Code Here

Examples of org.apache.solr.util.NamedList

      if (qs.startsWith("values")) {
        rsp.add("testname1","testval1");

        rsp.add("testarr1",new String[]{"my val 1","my val 2"});

        NamedList nl = new NamedList();
        nl.add("myInt", 333);
        nl.add("myNullVal", null);
        nl.add("myFloat",1.414213562f);
        nl.add("myDouble", 1e100d);
        nl.add("myBool", false);
        nl.add("myLong",999999999999L);

        Document doc = new Document();
        doc.add(new Field("id","55",Field.Store.YES, Field.Index.UN_TOKENIZED));
        nl.add("myDoc",doc);

        nl.add("myResult",results);
        nl.add("myStr","&wow! test escaping: a&b<c&");
        nl.add(null, "this value had a null name...");
        nl.add("myIntArray", new Integer[] { 100, 5, -10, 42 });
        nl.add("epoch", new Date(0));
        nl.add("currDate", new Date(System.currentTimeMillis()));
        rsp.add("myNamedList", nl);
      } else if (qs.startsWith("fields")) {
        NamedList nl = new NamedList();
        Collection flst;
        flst = searcher.getReader().getFieldNames(IndexReader.FieldOption.INDEXED);
        nl.add("indexed",flst);
        flst = searcher.getReader().getFieldNames(IndexReader.FieldOption.UNINDEXED);
        nl.add("unindexed",flst);
        rsp.add("fields", nl);
      }

      test(results.size() <= limit);
      test(results.size() <= results.matches());
View Full Code Here

Examples of ptolemy.kernel.util.NamedList

     *  The object is added to the workspace directory.
     *  Increment the version number of the workspace.
     */
    public GenericJNIActor() {
        super();
        _argumentsList = new NamedList(this);
    }
View Full Code Here
TOP
Copyright © 2018 www.massapi.com. 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.