cancel
Showing results for 
Search instead for 
Did you mean: 

alfresco 5 and lucene search

vincent-kali
Star Contributor
Star Contributor
Hi,
I'm using alfresco 5.0.c.
I want to perform searches using solr4 within a folder rules.
What is best way to do that ?
Should I use search.query with fts-alfresco language ?
I see in documentation that luceneSearch is still available in js api.
I though that lucene were replaced by solr4 in v5…

Could somebody clarify this ?

Thanks,
Vincent



4 REPLIES 4

afaust
Legendary Innovator
Legendary Innovator
Hello,

you should always use either fts-alfresco or cmis-alfresco as search languages. Lucene should never be used. The languages fts-alfresco and cmis-alfresco both support the transactional metadata query feature Alfresco introduced in 4.2 to allow simple / well structured queries to be executed directly against the database to avoid the lag that is due to asynchronous indexing.

But you can still use lucenseSearch if you want to. This only means that the query will use the lucene language - SOLR is also capable of executing lucene queries and as such it is still supported despite the removal of the Lucene index/search subsystem.

Regards
Axel

Hi Axel,
Thanks a lot for your answer.
Two additional questions:
- when using fts/cmis search language in js/java, I expect to get the same results as searches performed using "advanced search" web page in share. Is it correct ?
- Is there a way to force (or avoid) transactional metadata queries when searching ?
(I understood that using TEXT predicate will avoid using transactional metadata queries). Is that right ?
Thanks,
Vincent



afaust
Legendary Innovator
Legendary Innovator
Hello,

well, since Advanced Search does some additional processing besides what is visible in the UI (e.g. keyword template), the results may be a bit different but the search language is the same as fts-alfresco. cmis-alfresco is not used in the UI of Alfresco - it is mainly relevant for access from external applications / clients that use CMIS API.

You can force / avoid transactional metadata queries based on the semantic elements you use in the search query - as you pointed out. But this may not guarantee that transactional metadata queries will be used / avoided in future versions of Alfresco when the scope of transactional metadata query support may change.
The only way to reliably force / avoid transactional metadata queries is by using the Java API of the SearchService and setting the correct query consistency in the SearchParameters object.

Regards
Axel

vincent-kali
Star Contributor
Star Contributor
Hi Axel,
Thanks a lot for your clear and complete answer.

Vincent