public void WriteNamedList(NamedList nl) { WriteTag(nl is SimpleOrderedMap ? ORDERED_MAP : NAMED_LST, nl.Count); for (int i = 0; i < nl.Count; i++) { String name = nl.GetName(i); WriteExternString(name); Object val = nl.GetVal(i); WriteVal(val); } }
public SolrDocument ReadSolrDocument(FastInputStream dis) { NamedList nl = (NamedList)ReadVal(dis); SolrDocument doc = new SolrDocument(); for (int i = 0; i < nl.Count; i++) { String name = nl.GetName(i); Object val = nl.GetVal(i); doc.SetField(name, val); } return(doc); }
public void WriteNamedList(NamedList nl) { WriteTag(nl is SimpleOrderedMap ? ORDERED_MAP : NAMED_LST, nl.Count); for (int i = 0; i < nl.Count; i++) { String name = nl.GetName(i); WriteExternString(name); Object val = nl.GetVal(i); WriteVal(val); } }