Hierarchical Data
Hi, I have been following http://wiki.apache.org/solr/HierarchicalFaceting I have hierarchical data for facet . Some documents also have multiple hierarchy. like : Doc#1 London > UK > 51.5 Doc#2 UK >54.0 Doc#3 Indiana > United States > 40.0, London >UK>51.5 Doc#4 United States > 39.7, Washington > United States > 38.8 what can be optimal schema for indexing this data so that i get following result by solr query : 1) i want to retrieve hierarchical data count by facet pivot query . ex: facet.pivot=country,state 2) I want Lat values wrt every document in query output.ex: Doc#3 40.0,51.5 . Doc#2 54.0 3) I get direct search query like country:"United states" . state :"Washington" I think through this i am able to express my requirement along with data . Please tell me how can i put data index and retreive through query . I check out solution which you provided me about PathHierarchyTokenizerFactory. But along with hierarachy i have to put data with name State,district,lat,lon etc. So that i can also access direct query on fields. Thanks Varsha
Re: Hierarchical Faceting
Hi, Thanks Upayavira . But still i am not getting results well. I have been followinghttp://wiki.apache.org/solr/HierarchicalFaceting I have hierarchical data for facet . Some documents also have multiple hierarchy. like : Doc#1 London > UK > 51.5 Doc#2 UK >54.0 Doc#3 Indiana > United States > 40.0, London >UK>51.5 Doc#4 United States > 39.7, Washington > United States > 38.8 what can be optimal schema for indexing this data so that i get following result by solr query : 1) i want to retrieve hierarchical data count by facet pivot query . ex: facet.pivot=country,state 2) I want Lat values wrt every document in query output.ex: Doc#3 40.0,51.5 . Doc#2 54.0 3) I get direct search query like country:"United states" . state :"Washington" I think through this i am able to express my requirement along with data . Please tell me how can i put data index and retreive through query . I check out solution which you provided me about PathHierarchyTokenizerFactory. But along with hierarachy i have to put data with name State,district,lat,lon etc. So that i can also access direct query on fields. Thanks Varsha On 05/15/2013 10:32 PM, Upayavira wrote: Can't you use the PathHierarchyTokenizerFactory mentioned on that page? I think it is called descendent-path in the default schema. Won't that get you what you want? UK/London/Covent Garden becomes UK UK/London UK/London/Covent Garden and India/Maharastra/Pune/Dapodi becomes India India/Maharastra India/Maharastra/Pune India/Maharastra/Pune/Dapodi These fields can be multivalued. Upayavira On Wed, May 15, 2013, at 12:29 PM, varsha.yadav wrote: Hi I go through that but i want to index multiple location in single document and a single location have multiple feature/attribute like country,state,district etc. I want Index and want hierarchical facet result on facet pivot query. One more thing , my document varies may have single ,two ,three.. any number of location. On 05/15/2013 03:55 PM, Upayavira wrote: http://wiki.apache.org/solr/HierarchicalFaceting On Wed, May 15, 2013, at 09:44 AM, varsha.yadav wrote: Hi Everyone, I am working on Hierarchical Faceting. I am indexing location of document with their state and district. I would like to find counts of every country with state count and district count. I found facet pivot working well to give me count if i use single valued fields like --- india maharashtra india gujrat india Faridabad Haryana china foshan guangdong I found results that is fine : country india 1 state maharashtra 1 state Haryana 1 district Faridabad 1 country china 1 state But if my document have multiple location like : japan|JAPAN|null| brisbane|Australia|Queensland afghanistan|AFGHANISTAN|null afghanistan|AFGHANISTAN|null brisbane|Australia|Queensland Can anyone tell , me how should i put data in solr index to get hierarical data. Thanks Varsha -- Thanks & Regards Varsha -- Thanks & Regards Varsha
Re: Hierarchical Faceting
Hi I go through that but i want to index multiple location in single document and a single location have multiple feature/attribute like country,state,district etc. I want Index and want hierarchical facet result on facet pivot query. One more thing , my document varies may have single ,two ,three.. any number of location. On 05/15/2013 03:55 PM, Upayavira wrote: http://wiki.apache.org/solr/HierarchicalFaceting On Wed, May 15, 2013, at 09:44 AM, varsha.yadav wrote: Hi Everyone, I am working on Hierarchical Faceting. I am indexing location of document with their state and district. I would like to find counts of every country with state count and district count. I found facet pivot working well to give me count if i use single valued fields like --- india maharashtra india gujrat india Faridabad Haryana china foshan guangdong I found results that is fine : country india 1 state maharashtra 1 state Haryana 1 district Faridabad 1 country china 1 state But if my document have multiple location like : japan|JAPAN|null| brisbane|Australia|Queensland afghanistan|AFGHANISTAN|null afghanistan|AFGHANISTAN|null brisbane|Australia|Queensland Can anyone tell , me how should i put data in solr index to get hierarical data. Thanks Varsha -- Thanks & Regards Varsha
Hierarchical Faceting
Hi Everyone, I am working on Hierarchical Faceting. I am indexing location of document with their state and district. I would like to find counts of every country with state count and district count. I found facet pivot working well to give me count if i use single valued fields like --- india maharashtra india gujrat india Faridabad Haryana china foshan guangdong I found results that is fine : country india 1 state maharashtra 1 state Haryana 1 district Faridabad 1 country china 1 state But if my document have multiple location like : japan|JAPAN|null| brisbane|Australia|Queensland afghanistan|AFGHANISTAN|null afghanistan|AFGHANISTAN|null brisbane|Australia|Queensland Can anyone tell , me how should i put data in solr index to get hierarical data. Thanks Varsha