cancel
Showing results for 
Search instead for 
Did you mean: 

Externally launched fulltext ignores file names

joel_patrick
Champ in-the-making
Champ in-the-making
When we search for a term in the Alfresco client, the results reflect looking for the string in both the contents and the names of the files in Alfresco.  For different reasons we have created a full-text search form that is launched from a portal.  It launches a lucene search and shows the results in a separate window.

On problem is that the search does not report files that contain the string searched only in the filename!

Today we launch the search with the following line:

space.childrenByLuceneSearch["+TEXTSmiley Sad"+args['query']+")"]

Based on advice and a successful search in the node browser, we replaced this with

space.childrenByLuceneSearch["TEXTSmiley Sad"+args['query']+") OR @cm:nameSmiley Sad"+args['query']+")”]

There are no errors, but the results still miss the files with the query string in their name.  If we only use the term "@cm:nameSmiley Sad"+args['query']+")", we see nothing even though this query seems to work in the node browser.

Does anyone have any suggestion for a better way to do this?
1 REPLY 1

alexist
Champ in-the-making
Champ in-the-making
Syntax is not correct. The correct syntax is @cm\:name, so in javascript @cm\\:name
Try with :
space.childrenByLuceneSearch["TEXTSmiley Sad"+args['query']+") OR @cm\\:nameSmiley Sad"+args['query']+")”]