Thanks for your response Eric. I appreciate your idea to have the path as a property/field itself. Am pretty new to Solr and Lucene.
Could you please post some good pointers for learning more on Solr? Erik Hatcher wrote: > > > On Mar 11, 2009, at 8:47 AM, Eric Pugh wrote: >> Solr really isn't organized for tree structures of data. I think >> you might do better using a database with a tree structure. > > That's not a very fair statement. Sure, documents in Solr/Lucene are > simply composed of a flat list of fields, but one can store a path- > like representation in a field and search within hierarchies. For > example, indexing a "string" path field with values such as: > > path: /Repository/Folder1/POJO1 > > One could query for /Repository/* to get all documents (err, objects) > from that tree downward, and so on for any sub or complete path. > > The main thing to look at when figuring out how to squash a domain > into a Lucene index is what exactly do you need on the querying side > of things, rather than looking at it from a domain model and seeing > how to represent relationships and hierarchy from that perspective. > > Erik > > >> >> >> pojo would be a table of pojo's serialized out. And the parent_id >> could point to another structure that builds the tree. Can you >> flesh out your use case more of why they need to be in a tree >> structure. >> >> Eric >> >> >> >> On Mar 11, 2009, at 8:29 AM, PKJ wrote: >> >>> >>> >>> Is there anyone who have any idea solve this issue? >>> Please give your thoughts. >>> >>> Regards, >>> Praveen >>> >>> >>> PKJ wrote: >>>> >>>> Hi Eric, >>>> >>>> Thanks for your response. >>>> Yes you are right! Am trying to place POJOs into Solr directly and >>>> this is >>>> working fine. >>>> I want to search them based on the object properties, need to >>>> organize >>>> them in a heirarchy but not by package names. >>>> >>>> Something like: >>>> /Repository >>>> | >>>> |_ Folder1 >>>> | >>>> |_ POJO 1 >>>> >>>> It must store the object in this hierarchy. I might be asking >>>> which is not >>>> at all supported by Solr. >>>> Please give your valuable inputs. >>>> >>>> Regards, >>>> Praveen >>>> >>>> >>>> Eric Pugh-4 wrote: >>>>> >>>>> Are you trying to Java objects in Solr in order to be >>>>> searchable? How >>>>> about just dumping them as text using POJO <--> to text formats >>>>> such >>>>> as JSON or Betwixt (http://commons.apache.org/betwixt/). >>>>> >>>>> Then you can just search on the package structure... >>>>> >>>>> ?q=com.abc.lucene.* to return everything under that structure? >>>>> >>>>> Eric >>>>> >>>>> >>>>> On Mar 10, 2009, at 7:13 AM, Praveen_Kumar_J wrote: >>>>> >>>>>> >>>>>> Someone please throw some light on this post. >>>>>> Thanks in advance. >>>>>> >>>>>> >>>>>> Praveen_Kumar_J wrote: >>>>>>> >>>>>>> Hi >>>>>>> >>>>>>> I just upload simple POJOs into Solr by creating custom types and >>>>>>> dynamic >>>>>>> fields in Solr schema as shown below, >>>>>>> .... >>>>>>> ... >>>>>>> <fieldType name="TestType" class="com.abc.lucene.TestType" >>>>>>> sortMissingLast="true" omitNorms="true"/> >>>>>>> .... >>>>>>> <dynamicField name="*_i_i_s_m" type="integer" indexed="true" >>>>>>> stored="true" multiValued="true"/> >>>>>>> <dynamicField name="*_i_i_s_nm" type="integer" indexed="true" >>>>>>> stored="true" multiValued="false"/> >>>>>>> <dynamicField name="*_i_i_ns_m" type="integer" indexed="true" >>>>>>> stored="false" multiValued="true"/> >>>>>>> .... >>>>>>> But I need to organize these POJOs in a hierarchy which can be >>>>>>> navigated >>>>>>> easily (something like explorer). >>>>>>> Am not sure whether this feature is supported by Solr. But still >>>>>>> planning >>>>>>> to implement it somehow (With the help of DB). >>>>>>> >>>>>>> /Root >>>>>>> | >>>>>>> |_ POJO Type1 >>>>>>> | | >>>>>>> | |_POJO Type1_1 >>>>>>> | >>>>>>> |_POJO Type2 >>>>>>> | >>>>>>> |_POJO Type2_1 >>>>>>> >>>>>>> I need to organize the POJOs as shown above. >>>>>>> Is there any way to achieve this requirement?? >>>>>>> >>>>>>> Regards, >>>>>>> Praveen >>>>>>> >>>>>> >>>>>> -- >>>>>> View this message in context: >>>>>> http://www.nabble.com/Organizing-POJO%27s-in-a-heirarchy-in-Solr-tp22427900p22432121.html >>>>>> Sent from the Solr - User mailing list archive at Nabble.com. >>>>>> >>>>> >>>>> ----------------------------------------------------- >>>>> Eric Pugh | Principal | OpenSource Connections, LLC | >>>>> 434.466.1467 | >>>>> http://www.opensourceconnections.com >>>>> Free/Busy: http://tinyurl.com/eric-cal >>>>> >>>>> >>>>> >>>>> >>>>> >>>>> >>>> >>>> >>> >>> -- >>> View this message in context: >>> http://www.nabble.com/Organizing-POJO%27s-in-a-heirarchy-in-Solr-tp22427900p22454101.html >>> Sent from the Solr - User mailing list archive at Nabble.com. >>> >> >> ----------------------------------------------------- >> Eric Pugh | Principal | OpenSource Connections, LLC | 434.466.1467 | >> http://www.opensourceconnections.com >> Free/Busy: http://tinyurl.com/eric-cal >> >> >> > > > -- View this message in context: http://www.nabble.com/Organizing-POJO%27s-in-a-heirarchy-in-Solr-tp22427900p22456524.html Sent from the Solr - User mailing list archive at Nabble.com.