Re: Nested objects and map in Solr

2015-06-23 Thread Amadeo Asco
I found the answer to my problems:

1. If you have sub-objects add content_type: your_own_name, to the parent 
object, e.g.
{
“name_s” : ”mine”,
content_type: “surnames”,
values {
“surname1” : “first”,
“surname2” : “second
}
}

2. Solr is very picky and will not index an object if it is not well construct 
(case of Json) or any of the object's fields don’t comply with their own type. 
Particularly I found it with the date/time, one of the valid formats is 
-MM-ddTHH:mm:ssZ, e.g. 2015-06-23T13:30:20Z

Hope this help someone else

 On 22 Jun 2015, at 18:45, Amadeo Asco a...@trifork.com wrote:
 
 Thank you for your reply.
 
 Some of my objects are not fully indexed. I have 121 objects with sub-objects 
 and when querying with “*:*” only 81 are found. The objects are in Json 
 format. I use Solr from within Riak.
 
 
 On 22 Jun 2015, at 17:31, Alessandro Benedetti 
 benedetti.ale...@gmail.commailto:benedetti.ale...@gmail.com wrote:
 
 Join is not only query time related.
 Join is the Solr approach to nested documents.
 Block join and Query time join are 2 different strategies with different
 pros and cons .
 Basically :
 
 Block Join :
 - force you to follow a specific indexing strategy
 - if you want to update a child you need to update the whole block ( parent
 +children)
 + 4-5 times faster then query time join
 
 Query Time Join
 + you can index the data how you want, even in different cores
 + you can update single children
 - it is slow
 
 What do you mean with strange indexes ?
 
 Cheers
 
 2015-06-22 11:28 GMT+01:00 Amadeo Asco 
 a...@trifork.commailto:a...@trifork.com:
 
 I have looked at the join but the problem isn’t with the query but on
 indexing sub-objects (in some places called also nested objects). The best
 documentation I have seen is http://yonik.com/solr-4-8-features/
 but I am still getting very estrange indexes when I play with this
 approach and others.
 
 Cheers
 
 On 22 Jun 2015, at 11:23, Alessandro Benedetti 
 benedetti.ale...@gmail.commailto:benedetti.ale...@gmail.com
 mailto:benedetti.ale...@gmail.com wrote:
 
 I would suggest you to take a look to the Solr Join ( block and query time
 join) .
 This is what you are looking for.
 Anyway, this request points out that the documentation is not good enough
 to address people to Nested Objects problems.
 Maybe this should highlight the need of improving that part of the
 documentation.
 
 Cheers
 
 2015-06-22 9:57 GMT+01:00 Amadeo Asco 
 a...@trifork.commailto:a...@trifork.commailto:
 a...@trifork.commailto:a...@trifork.com:
 
 Dear all,
 
 I am starting with Solr and I cannot index map(key,values) or nested
 objects in Solr. I have not been able to find a satisfactory answer online.
 Please could anyone let me know where to find the full documentation of how
 to index nested objects in Solr? Also how to index and reference in the
 search melees in a map?
 
 Example Json:
 {name_s:Lion-o, age_i:30, leader_b:true, data:{name:me,
 surname:other}, values_ss:[red, blue”]}
 {name_s:Cheetara, age_i:28, leader_b:false, content_type:
 parentDocument,
 _childDocuments_:[{name:1},{name:2},{name:3}]}
 
 What about with:
 {name_s:Lion-o, age_i:30, leader_b:true, data:{name”:[“me”],
 surname”:[“other”, “next]}, values_ss:[red, blue”]}
 
 I look forward to hearing form you soon.
 
 Thank you in advance,
 Amadeo
 
 
 
 
 --
 --
 
 Benedetti Alessandro
 Visiting card : http://about.me/alessandro_benedetti
 
 Tyger, tyger burning bright
 In the forests of the night,
 What immortal hand or eye
 Could frame thy fearful symmetry?
 
 William Blake - Songs of Experience -1794 England
 
 
 
 
 --
 --
 
 Benedetti Alessandro
 Visiting card : http://about.me/alessandro_benedetti
 
 Tyger, tyger burning bright
 In the forests of the night,
 What immortal hand or eye
 Could frame thy fearful symmetry?
 
 William Blake - Songs of Experience -1794 England
 



Re: Nested objects and map in Solr

2015-06-22 Thread Amadeo Asco
Thank you for your reply.

Some of my objects are not fully indexed. I have 121 objects with sub-objects 
and when querying with “*:*” only 81 are found. The objects are in Json format. 
I use Solr from within Riak.


On 22 Jun 2015, at 17:31, Alessandro Benedetti 
benedetti.ale...@gmail.commailto:benedetti.ale...@gmail.com wrote:

Join is not only query time related.
Join is the Solr approach to nested documents.
Block join and Query time join are 2 different strategies with different
pros and cons .
Basically :

Block Join :
- force you to follow a specific indexing strategy
- if you want to update a child you need to update the whole block ( parent
+children)
+ 4-5 times faster then query time join

Query Time Join
+ you can index the data how you want, even in different cores
+ you can update single children
- it is slow

What do you mean with strange indexes ?

Cheers

2015-06-22 11:28 GMT+01:00 Amadeo Asco 
a...@trifork.commailto:a...@trifork.com:

I have looked at the join but the problem isn’t with the query but on
indexing sub-objects (in some places called also nested objects). The best
documentation I have seen is http://yonik.com/solr-4-8-features/
but I am still getting very estrange indexes when I play with this
approach and others.

Cheers

On 22 Jun 2015, at 11:23, Alessandro Benedetti 
benedetti.ale...@gmail.commailto:benedetti.ale...@gmail.com
mailto:benedetti.ale...@gmail.com wrote:

I would suggest you to take a look to the Solr Join ( block and query time
join) .
This is what you are looking for.
Anyway, this request points out that the documentation is not good enough
to address people to Nested Objects problems.
Maybe this should highlight the need of improving that part of the
documentation.

Cheers

2015-06-22 9:57 GMT+01:00 Amadeo Asco 
a...@trifork.commailto:a...@trifork.commailto:
a...@trifork.commailto:a...@trifork.com:

Dear all,

I am starting with Solr and I cannot index map(key,values) or nested
objects in Solr. I have not been able to find a satisfactory answer online.
Please could anyone let me know where to find the full documentation of how
to index nested objects in Solr? Also how to index and reference in the
search melees in a map?

Example Json:
{name_s:Lion-o, age_i:30, leader_b:true, data:{name:me,
surname:other}, values_ss:[red, blue”]}
{name_s:Cheetara, age_i:28, leader_b:false, content_type:
parentDocument,
_childDocuments_:[{name:1},{name:2},{name:3}]}

What about with:
{name_s:Lion-o, age_i:30, leader_b:true, data:{name”:[“me”],
surname”:[“other”, “next]}, values_ss:[red, blue”]}

I look forward to hearing form you soon.

Thank you in advance,
Amadeo




--
--

Benedetti Alessandro
Visiting card : http://about.me/alessandro_benedetti

Tyger, tyger burning bright
In the forests of the night,
What immortal hand or eye
Could frame thy fearful symmetry?

William Blake - Songs of Experience -1794 England




--
--

Benedetti Alessandro
Visiting card : http://about.me/alessandro_benedetti

Tyger, tyger burning bright
In the forests of the night,
What immortal hand or eye
Could frame thy fearful symmetry?

William Blake - Songs of Experience -1794 England



Re: Nested objects and map in Solr

2015-06-22 Thread Amadeo Asco
I have looked at the join but the problem isn’t with the query but on indexing 
sub-objects (in some places called also nested objects). The best documentation 
I have seen is http://yonik.com/solr-4-8-features/
but I am still getting very estrange indexes when I play with this approach and 
others.

Cheers

On 22 Jun 2015, at 11:23, Alessandro Benedetti 
benedetti.ale...@gmail.commailto:benedetti.ale...@gmail.com wrote:

I would suggest you to take a look to the Solr Join ( block and query time
join) .
This is what you are looking for.
Anyway, this request points out that the documentation is not good enough
to address people to Nested Objects problems.
Maybe this should highlight the need of improving that part of the
documentation.

Cheers

2015-06-22 9:57 GMT+01:00 Amadeo Asco 
a...@trifork.commailto:a...@trifork.com:

Dear all,

I am starting with Solr and I cannot index map(key,values) or nested
objects in Solr. I have not been able to find a satisfactory answer online.
Please could anyone let me know where to find the full documentation of how
to index nested objects in Solr? Also how to index and reference in the
search melees in a map?

Example Json:
{name_s:Lion-o, age_i:30, leader_b:true, data:{name:me,
surname:other}, values_ss:[red, blue”]}
{name_s:Cheetara, age_i:28, leader_b:false, content_type:
parentDocument,
_childDocuments_:[{name:1},{name:2},{name:3}]}

What about with:
{name_s:Lion-o, age_i:30, leader_b:true, data:{name”:[“me”],
surname”:[“other”, “next]}, values_ss:[red, blue”]}

I look forward to hearing form you soon.

Thank you in advance,
Amadeo




--
--

Benedetti Alessandro
Visiting card : http://about.me/alessandro_benedetti

Tyger, tyger burning bright
In the forests of the night,
What immortal hand or eye
Could frame thy fearful symmetry?

William Blake - Songs of Experience -1794 England



Nested objects in Solr

2015-06-22 Thread Amadeo Asco
Dear Sir/Madam,

I am starting with Solr and I cannot index nested objects in Solr. I have not 
been able to find a satisfactory answer online. Please could you let me know 
where a full documentation of how to index nested objects in Solr can be found? 
Do I need to change the schema? How?

I look forward to hearing form you soon.

Thank you in advance,
Amadeo

Nested objects and map in Solr

2015-06-22 Thread Amadeo Asco
Dear all,

I am starting with Solr and I cannot index map(key,values) or nested objects in 
Solr. I have not been able to find a satisfactory answer online. Please could 
anyone let me know where to find the full documentation of how to index nested 
objects in Solr? Also how to index and reference in the search melees in a map?

Example Json:
{name_s:Lion-o, age_i:30, leader_b:true, data:{name:me, 
surname:other}, values_ss:[red, blue”]}
{name_s:Cheetara, age_i:28, leader_b:false, content_type: 
parentDocument, _childDocuments_:[{name:1},{name:2},{name:3}]}

What about with:
{name_s:Lion-o, age_i:30, leader_b:true, data:{name”:[“me”], 
surname”:[“other”, “next]}, values_ss:[red, blue”]}

I look forward to hearing form you soon.

Thank you in advance,
Amadeo