Re: Organizing POJO's in a heirarchy in Solr

2009-03-11 Thread PKJ


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,
>>>> 
>>>> ...
>>>> >>> sortMissingLast="true" omitNorms="true"/>
>>>> 
>>>> >>> stored="true" multiValued="true"/>
>>>> >>> stored="true" multiValued="false"/>
>>>> >>> 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.



Re: Organizing POJO's in a heirarchy in Solr

2009-03-11 Thread PKJ


Thanks for your response Eric.
Actually the scenario is to use the Solr search server as a hierarchical
storage system also. Where we store objects/files in a hierarchy and do
searches on that. something like DB (for files) + Solr.
Here I am evaluating Solr with an knowledge management system.
So thought of storing in a hierarchy.

regards,
Praveen



Eric Pugh-4 wrote:
> 
> Solr really isn't organized for tree structures of data.  I think you  
> might do better using a database with a tree structure.
> 
> 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,
>>>>>> 
>>>>>> ...
>>>>>> >>>>> sortMissingLast="true" omitNorms="true"/>
>>>>>> 
>>>>>> >>>>> stored="true" multiValued="true"/>
>>>>>> >>>>> stored="true" multiValued="false"/>
>>>>>> >>>>> 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-tp22427900p22456314.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Organizing POJO's in a heirarchy in Solr

2009-03-11 Thread PKJ


Pretty good idea David.
Yeah I understand that Solr has not build for such purposes. It is a good
search server.
Will incorporated your idea to store the path as a property and search.
Thanks again. Please post if you see any improvements for this requirement
in near future.

Regards,
Praveen


David Smiley @MITRE.org wrote:
> 
> Solr could still work for you Praveen.
> Consider a schema with a field named "parentPath" that is not tokenized. 
> It stores the path to the folder containing the current document but does
> not have the document's name in it.  In your example, this would be
> "/Repository/Folder1/".  The document's name would be stored in another
> field. This system is not perfect but it meets the only requirement you've
> outlined.
> 
> ~ David Smiley
> 
> 
> On 3/11/09 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.
> 
> 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,
>>>>>> 
>>>>>> ...
>>>>>> >>>>> sortMissingLast="true" omitNorms="true"/>
>>>>>> 
>>>>>> >>>>> stored="true" multiValued="true"/>
>>>>>> >>>>> stored="true" multiValued="false"/>
>>>>>> >>>>> 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-tp22427900p22456430.html
Sent from the Solr - User mailing list archive at Nabble.com.



Re: Organizing POJO's in a heirarchy in Solr

2009-03-11 Thread PKJ


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,
>>>>>>> 
>>>>>>> ...
>>>>>>> >>>>>> sortMissingLast="true" omitNorms="true"/>
>>>>>>> 
>>>>>>> >>>>>> stored="true" multiValued="true"/>
>>>>>>> >>>>>> stored="true" multiValued="false"/>
>>>>>>> >>>>>> 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. Bu