Skip to content

Instantly share code, notes, and snippets.

@rzezeski
Created April 4, 2013 18:06
Show Gist options
  • Select an option

  • Save rzezeski/5312653 to your computer and use it in GitHub Desktop.

Select an option

Save rzezeski/5312653 to your computer and use it in GitHub Desktop.
where's my comments?
23> rp(R).
{xmlDocument,[{xmlElement,schema,schema,[],
{xmlNamespace,[],[]},
[],1,
[{xmlAttribute,name,[],[],[],
[{schema,1}],
1,[],"default",false},
{xmlAttribute,version,[],[],[],
[{schema,1}],
2,[],"1.5",false}],
[{xmlText,[{schema,1}],1,[],"\n ",text},
{xmlElement,fields,fields,[],
{xmlNamespace,[],[]},
[{schema,1}],
2,[],
[{xmlText,[{fields,2},{schema,1}],1,[],"\n\n ",text},
{xmlComment,[{fields,2},{schema,1}],
2,[]," TODO: is this needed? "},
{xmlElement,field,field,[],
{xmlNamespace,[],[]},
[{fields,2},{schema,1}],
3,
[{xmlAttribute,name,[],[],[],
[{field,3},{fields,2},{schema,1}],
1,[],"_version_",false},
{xmlAttribute,type,[],[],[],
[{field,3},{fields,2},{schema,1}],
2,[],"long",false},
{xmlAttribute,indexed,[],[],[],
[{field,3},{fields,2},{schema,1}],
3,[],"true",false},
{xmlAttribute,stored,[],[],[],
[{field,3},{fields,2},{schema,1}],
4,[],"true",false}],
[],[],"/home/rzezeski/code/basho/yokozuna",undeclared},
{xmlText,[{fields,2},{schema,1}],4,[],"\n ",text},
{xmlText,[{fields,2},{schema,1}],6,[],"\n\n ",text},
{xmlElement,field,field,[],
{xmlNamespace,[],[]},
[{fields,2},{schema,1}],
7,
[{xmlAttribute,name,[],[],[],
[{field,7},{fields,2},{schema,1}],
1,[],"text",false},
{xmlAttribute,type,[],[],[],
[{field,7},{fields,2},{schema,1}],
2,[],"text_general",false},
{xmlAttribute,indexed,[],[],[],
[{field,7},{fields,2},{schema,1}],
3,[],"true",false},
{xmlAttribute,stored,[],[],[],
[{field,7},{fields,2},{schema,1}],
4,[],"false",false},
{xmlAttribute,multiValued,[],[],[],
[{field,7},{fields,2},{schema,1}],
5,[],"true",false}],
[],[],"/home/rzezeski/code/basho/yokozuna",undeclared},
{xmlText,[{fields,2},{schema,1}],8,[],"\n\n ",text},
{xmlElement,dynamicField,dynamicField,[],
{xmlNamespace,[],[]},
[{fields,2},{schema,1}],
9,
[{xmlAttribute,name,[],[],[],
[{dynamicField,9},{fields,2},{schema,1}],
1,[],"*_i",false},
{xmlAttribute,type,[],[],[],
[{dynamicField,9},{fields,2},{schema,1}],
2,[],"int",false},
{xmlAttribute,indexed,[],[],[],
[{dynamicField,9},{fields,2},{schema,1}],
3,[],"true",false},
{xmlAttribute,stored,[],[],[],
[{dynamicField,9},{fields,2},{schema,1}],
4,[],"true",false}],
[],[],"/home/rzezeski/code/basho/yokozuna",undeclared},
{xmlText,[{fields,2},{schema,1}],10,[],"\n ",text},
{xmlElement,dynamicField,dynamicField,[],
{xmlNamespace,[],[]},
[{fields,2},{schema,1}],
11,
[{xmlAttribute,name,[],[],[],
[{dynamicField,11},{fields,2},{schema,1}],
1,[],"*_is",false},
{xmlAttribute,type,[],[],[],
[{dynamicField,11},{fields,2},{schema,1}],
2,[],"int",false},
{xmlAttribute,indexed,[],[],[],
[{dynamicField,11},{fields,2},{schema,1}],
3,[],"true",false},
{xmlAttribute,stored,[],[],[],
[{dynamicField,11},{fields,2},{schema,1}],
4,[],"true",false},
{xmlAttribute,multiValued,[],[],[],
[{dynamicField,11},{fields,2},{schema,1}],
5,[],"true",false}],
[],[],"/home/rzezeski/code/basho/yokozuna",undeclared},
{xmlText,[{fields,2},{schema,1}],12,[],"\n ",text},
{xmlElement,dynamicField,dynamicField,[],
{xmlNamespace,[],[]},
[{fields,2},{schema,1}],
13,
[{xmlAttribute,name,[],[],[],
[{dynamicField,13},{fields,2},{schema,1}],
1,[],"*_l",false},
{xmlAttribute,type,[],[],[],
[{dynamicField,13},{fields,2},{schema,1}],
2,[],"long",false},
{xmlAttribute,indexed,[],[],[],
[{dynamicField,13},{fields,2},{schema,1}],
3,[],"true",false},
{xmlAttribute,stored,[],[],[],
[{dynamicField,13},{fields,2},{schema,1}],
4,[],"true",false}],
[],[],"/home/rzezeski/code/basho/yokozuna",undeclared},
{xmlText,[{fields,2},{schema,1}],14,[],"\n ",text}],
[],"/home/rzezeski/code/basho/yokozuna",undeclared},
{xmlText,[{schema,1}],3,[],"\n\n ",text},
{xmlElement,uniqueKey,uniqueKey,[],
{xmlNamespace,[],[]},
[{schema,1}],
4,[],
[{xmlText,[{uniqueKey,4},{schema,1}],1,[],"_yz_id",text}],
[],"/home/rzezeski/code/basho/yokozuna",undeclared},
{xmlText,[{schema,1}],5,[],"\n\n ",text},
{xmlElement,types,types,[],
{xmlNamespace,[],[]},
[{schema,1}],
6,[],
[{xmlText,[{types,6},{schema,1}],1,[],"\n ",text},
{xmlElement,fieldType,fieldType,[],
{xmlNamespace,[],[]},
[{types,6},{schema,1}],
2,
[{xmlAttribute,name,[],[],[],
[{fieldType,2},{types,6},{schema,1}],
1,[],"string",false},
{xmlAttribute,class,[],[],[],
[{fieldType,2},{types,6},{schema,1}],
2,[],"solr.StrField",false},
{xmlAttribute,sortMissingLast,[],[],[],
[{fieldType,2},{types,6},{schema,1}],
3,[],"true",false}],
[],[],"/home/rzezeski/code/basho/yokozuna",undeclared},
{xmlText,[{types,6},{schema,1}],3,[],"\n ",text},
{xmlElement,fieldType,fieldType,[],
{xmlNamespace,[],[]},
[{types,6},{schema,1}],
4,
[{xmlAttribute,name,[],[],[],
[{fieldType,4},{types,6},{schema,1}],
1,[],"boolean",false},
{xmlAttribute,class,[],[],[],
[{fieldType,4},{types,6},{schema,1}],
2,[],"solr.BoolField",false},
{xmlAttribute,sortMissingLast,[],[],[],
[{fieldType,4},{types,6},{schema,1}],
3,[],"true",false}],
[],[],"/home/rzezeski/code/basho/yokozuna",undeclared},
{xmlText,[{types,6},{schema,1}],5,[],"\n ",text}],
[],"/home/rzezeski/code/basho/yokozuna",undeclared},
{xmlText,[{schema,1}],7,[],"\n\n",text}],
[],"/home/rzezeski/code/basho/yokozuna",undeclared}]}
ok
24>
24>
24> rp(xmerl:export(element(2,R), xmerl_xml)).
["<?xml version=\"1.0\"?>",
[[["<","schema",
[[" ","name","=\"","default","\""],
[" ","version","=\"","1.5","\""]],
">"],
["\n ",
[["<","fields",">"],
["\n\n ",
["<","field",
[[" ","name","=\"","_version_","\""],
[" ","type","=\"","long","\""],
[" ","indexed","=\"","true","\""],
[" ","stored","=\"","true","\""]],
"/>"],
"\n ","\n\n ",
["<","field",
[[" ","name","=\"","text","\""],
[" ","type","=\"","text_general","\""],
[" ","indexed","=\"","true","\""],
[" ","stored","=\"","false","\""],
[" ","multiValued","=\"","true","\""]],
"/>"],
"\n\n ",
["<","dynamicField",
[[" ","name","=\"","*_i","\""],
[" ","type","=\"","int","\""],
[" ","indexed","=\"","true","\""],
[" ","stored","=\"","true","\""]],
"/>"],
"\n ",
["<","dynamicField",
[[" ","name","=\"","*_is","\""],
[" ","type","=\"","int","\""],
[" ","indexed","=\"","true","\""],
[" ","stored","=\"","true","\""],
[" ","multiValued","=\"","true","\""]],
"/>"],
"\n ",
["<","dynamicField",
[[" ","name","=\"","*_l","\""],
[" ","type","=\"","long","\""],
[" ","indexed","=\"","true","\""],
[" ","stored","=\"","true","\""]],
"/>"],
"\n "],
["</","fields",">"]],
"\n\n ",
[["<","uniqueKey",">"],["_yz_id"],["</","uniqueKey",">"]],
"\n\n ",
[["<","types",">"],
["\n ",
["<","fieldType",
[[" ","name","=\"","string","\""],
[" ","class","=\"","solr.StrField","\""],
[" ","sortMissingLast","=\"","true","\""]],
"/>"],
"\n ",
["<","fieldType",
[[" ","name","=\"","boolean","\""],
[" ","class","=\"","solr.BoolField","\""],
[" ","sortMissingLast","=\"","true","\""]],
"/>"],
"\n "],
["</","types",">"]],
"\n\n"],
["</","schema",">"]]]]
ok
25>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment