There are no transactions in Solr. Delete the Story and then the comments.
"Core" is just the old Solr terminology. A "collection" is the data itself,
like the data on the disk. And with SolrCloud, the collection terminology is
required.
How much data will hou have. I mean, a news article could have thousands of
comments. Do you want to be able to search through them? Solr has no
provision for searching across an arbitrary number of dynamic fields. I
mean, if you want a query to search in a field, you need to name the field
in either the query, or "qf" even for dismax, which makes query across
arbitrary columns unworkable.
Multiple HTTP requests should not be a problem, especially if each of them
is shorter. Are you running into some problem?
Technically, you could also do a custom search component that did a lot of
the multi-query processing inside Solr, but once again, it is best to start
with a simple design first.
-- Jack Krupansky
-----Original Message-----
From: samabhiK
Sent: Monday, May 13, 2013 8:55 AM
To: solr-user@lucene.apache.org
Subject: Re: Best way to design a "story and comments" schema.
Thanks for your reply.
I generally get confused by a collection and a core. But just FYI, I do have
two cores at the moment - one for the users and another for the Stories.
Initially I thought of adding an extra core for the Comments too but
realized that it would mean multiple HTTP calls to fetch both the story and
the comments. Also, when a story is deleted, so should be its comments.
Having that spread across two cores might cause issues with transaction when
I delete the story and try to delete the respective comments? Or when I
delete the User and all hos stories and comments?
I really wish to understand how that works.
Sam
--
View this message in context:
http://lucene.472066.n3.nabble.com/Best-way-to-design-a-story-and-comments-schema-tp4062867p4062913.html
Sent from the Solr - User mailing list archive at Nabble.com.