cancel
Showing results for 
Search instead for 
Did you mean: 

Search using aspect or custom property

mrsaqib
Champ in-the-making
Champ in-the-making
I want to know the better approach from the following to store and specially search records which are in millions using Java API .

I have millions of records of different types, like Accounting, Sales, marketing, general etc

<strong>Approach A:</strong>

while adding documents, Assign each document different aspect based on their type, for example, Sales have asptect called 'sales' , marketing has aspect called 'marketing'.
when searching i do this in Lucene

ASPECT:'marketing' AND name:"something"

<strong>Approach B:</strong>

Each document has the same aspect, say 'mydocs' and i create a custom property called 'type' and store values like 'sales', 'marketing', etc
when searchin i do this in Lucene

type:"sales" AND name:"something" 

Which of the above approach is better, considering search calls for lucene. (in which approach alfresco java api using lucene will perform better search)

In general, using "ASPECT" and then your query to search for records is better? or else?

(I am using Alfresco Enterprise 4.0.2)
1 REPLY 1

mitpatoliya
Star Collaborator
Star Collaborator
Choice between type and Aspect is always depends on your requirement.
Generally when we have some common set of properties to be share across different content types we use aspect and when we have completely different content with its unique set of properties we create custom content type.
In your case I think First approach will be much faster as first subquery will filter out documents to large extend.
Getting started

Tags


Find what you came for

We want to make your experience in Hyland Connect as valuable as possible, so we put together some helpful links.