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 Dnyaneshwar Dewadkar <de...@gmail.com> on 2011/09/16 13:08:31 UTC

Nested JSON Object Indexing and Search

Dear all

     I am trying to index a data using json object. For normal single field
it is easy to make things work for me. I have a data to be stored in format
like

Solr Version 3.4,
java implementation


Document 1:

        { "id" : "B34KPNJ0998",
          "project_name_t":"Manual",
         "department_t" :  {"dept 1","dept 2"},
          "employs_t":{
                                   employ_manager_t : {"id":1, "name":"Ted"
," skills" ,"algos", location :{ "place ":"Netherlands" ,"latLong":"10,10" }
},
                                   employ_manager_t : {"id":1, "name":"Ted"
," skills" ,"algos", location :{ "place ":"Netherlands" ,"latLong":"20,10" }
},
                                   employ_manager_t : {"id":1, "name":"Ted"
," skills" ,"algos", location :{ "place ":"Netherlands" ,"latLong":"30,10" }
},
                                   employ_manager_t : {"id":2, "name":"Mac"
," skills" ,"algos", location :{ "place ":"London" ,"latLong":"10,10" } },
                                   employ_manager_t : {"id":2, "name":"Mac"
," skills" ,"algos", location :{ "place ":"London" ,"latLong":"30,10" } },
                             },
               "employs_t":{
                                   employ_manager_t : {"id":2, "name":"Ted"
," skills" ,"algos", location :{ "place ":"Netherlands" ,"latLong":"10,10" }
},
                                   employ_manager_t : {"id":2, "name":"Ted"
," skills" ,"algos", location :{ "place ":"Netherlands" ,"latLong":"20,10" }
},
                                   employ_manager_t : {"id":1, "name":"Ted"
," skills" ,"algos", location :{ "place ":"Netherlands" ,"latLong":"30,10" }
},
                                   employ_manager_t : {"id":2, "name":"Mac"
," skills" ,"algos", location :{ "place ":"London" ,"latLong":"10,10" } },
                                   employ_manager_t : {"id":2, "name":"Mac"
," skills" ,"algos", location :{ "place ":"London" ,"latLong":"30,10" } },
                             },
               }


*How do I index it and while searching  -- how Geo query is handling the
nested structure by solr.*





-
 DD