AnsweredAssumed Answered

Use of indexes in a query (with SOLR)

Question asked by spilby on Jul 6, 2015
Latest reply on Jul 7, 2015 by spilby
I have a doubt about how indexed properties works in Alfresco 4.1.6 with SOLR.

I use something like this for my queries:


SearchParameters sp = new SearchParameters();
sp.addStore(StoreRef.STORE_REF_WORKSPACE_SPACESSTORE);
sp.setLanguage(SearchService.LANGUAGE_FTS_ALFRESCO);
sp.setQuery(query);
ResultSet results = getSearchService().query(sp);


where query variable is something like this:


PATH:" /app:company_home/app:user_homes/cm:_x0030_123//*" AND ((@cm\:title:food) OR (@cm\:name:abcde) OR (TEXT:valles) OR (@doc\:custom_property:"report") OR (@doc\:custom_property2:"report") AND (@doc\:custom_property3:"report") AND TYPE:"{my.model}voc_document"


On my model.xml I specify what custom properties are indexed (
<index enabled="true">
)

I use Alfresco 4.1.6 with SOLR. My question is… How works SOLR with the indexes if I put on the search query two or more indexed properties? Like Oracle? Oracle try the best index and use only this. Or maybe SOLR combine all the indexed properties and uses all the index on the query? 

I need this answer to determine how many indexes put on my model.xml. Maybe put a lot of indexes don't give me the best and efficient result and is better index only a few properties.

And finally, one question… I use SearchService.LANGUAGE_FTS_ALFRESCO, but I can see that exists a earchService.LANGUAGE_SOLR_FTS_ALFRESCO. Is the same? I need to use the second if I use SOLR?

Thanks a lot!

Best regards


Outcomes