You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Xin Cai <xi...@gmail.com> on 2014/12/23 05:19:44 UTC
How to define Json list in schema in xml
hi guys
I am looking to parse a json file that contains fields that has a list of
schools
So for example I would have
{"Schools":[
name: "Seirra High School",
name: "Walnut elementary School"]}
So if I want to be able to index all the different schools so i can fast
look up with people that went to a certain school, what is the best way for
me to define the schema file? I have looked around and I don't think Solr
has a native support for list but I can be wrong because list is used so
often....Any advice would be appreciated. Thanks
Xin Cai
Re: How to define Json list in schema in xml
Posted by Erik Hatcher <er...@gmail.com>.
A multiValued="true" string field is what you're after here.
Erik
> On Dec 22, 2014, at 23:19, Xin Cai <xi...@gmail.com> wrote:
>
> hi guys
> I am looking to parse a json file that contains fields that has a list of
> schools
>
> So for example I would have
>
>
> {"Schools":[
> name: "Seirra High School",
> name: "Walnut elementary School"]}
>
> So if I want to be able to index all the different schools so i can fast
> look up with people that went to a certain school, what is the best way for
> me to define the schema file? I have looked around and I don't think Solr
> has a native support for list but I can be wrong because list is used so
> often....Any advice would be appreciated. Thanks
>
> Xin Cai