Reputation: 2009
I'm creating an application, where you search for parent documents with their attributes, and also if they contain a child document matching certain criteria. You can also search only the parent, or the child documents.
I'm indexing the data into Solr from a SQL database, it is a many-to-many relationship. I'm thinking whether joining them when indexing into denormalized (If that is the correct word) 'views' and grouping by the unique field for parent/child depending which ones you want, or using Solr childDocuments and then block joining them is better performance and maintainability wise.
I found the grouping method easier to work with from Java, but atleast to get count of results, the group.ngroups
parameter is so slow with large number of documents (9M+ in my case) even when returning a small number of rows.
Any other suggestions are welcome also.
Upvotes: 1
Views: 109
Reputation: 80
We were dealing with ~3M records in our case. We kind of used denormalized way together with join. Denormalize view will contain only those columns/properties on which we need to search on. Then use join to populate data for displaying result purpose. Your case might be different. This worked well for our case as not all properties needed for search.
Upvotes: 1