On 01/11/2013 06:14 PM, Gora Mohanty wrote:
On 11 January 2013 22:30, Jens Grivolla <j+...@grivolla.net> wrote:
[...]
Actually, that is what you would get when doing a join in an RDBMS, the
cross-product of your tables. This is NOT AT ALL what you typically do in Solr.
Best start the other way around, think of Solr as a retrieval system, not a
storage system. What are your queries? What do you want to find, and what
criteria do you use to search for it?
[...]
Um, he did describe his desired queries, and there was a reason
that I proposed the above schema design.
He said he wants queries such as "users how have taken courseA and are
fluent in english", which is exactly one case I was describing.
UserA has taken courseA, courseB and courseC and has writingskill
good verbalskill good for english and writingskill excellent
verbalskill excellent for spanish UserB has taken courseA, courseF,
courseG and courseH and has writingskill fluent verbalskill fluent
for english and writingskill good verbalskill good for italian
Unless the index is becoming huge, I feel that it is better to
flatten everything out rather than combine fields, and
post-process the results.
Then please show me the query to find users that are fluent in spanish
and english. Bonus points if you manage to not retrieve the same user
several times. (Hint, your schema stores only one language skill per row).
Regards,
Jens