The requirement of the first approach is to maintain the searchable
data elements that potentially cross multiple documents in a dedicated
searchable index that is based on a document with all of the required
search elements (Orders in the example). This approach seems as if it
will impose some data management issues because the data will need to
be maintained both (via patching?) in the original documents, which
are both aggregates/roots, Client and Case, and the searchable
document and index.
The second approach, appears to move the search towards a drill down
by category search paridigm. The requirements of the search facility
I describe are very typical and basic. There are to be several search
criteria input fields and a grid to display rows of search results via
returned attributes based on user inputs. The grid columns will
contain many of the searchable inputs for display and conformation
that the search returned the expected results. Design by DDD aggregate
boundaries will dictate that the searchable elements can/will cross
multiple documents.
It would be best if the original document attributes that need to be
searcable can somehow be merged to create a searchable index. Is there
a way to map and reduce(group) several documents based on multiple
relating keys? So the documents below could be reduced to rows
containing
Client.ClientId Client.LastName Case.StatusId
CaseStatus.CaseStatusId CaseStatus.Name
Is this possible? Then a search could performed where Client.LastName
contains "Smi" and the CaseStatus for the Case is Active
A simplified version of these entities/documents is listed below
Client.ClientId
Client.LastName
Case.ClientId
Case.StatusId
CaseStatus.CaseStatusId
CaseStatus.Name
On Feb 4, 11:45 am, Itamar Syn-Hershko <
ita...@hibernatingrhinos.com>
wrote:
> You can probably make nice use of Facetshttp://
ravendb.net/docs/client-api/advanced/faceted-search
>
> On Sat, Feb 4, 2012 at 12:08 AM,
billbassl...@hotmail.com <