cancel
Showing results for 
Search instead for 
Did you mean: 

search, query syntax?

glux
Champ in-the-making
Champ in-the-making
Is there a description of the query syntax used for the text search?

I found this link:
http://lucene.apache.org/java/docs/queryparsersyntax.html
but it does not seem to be fully implemented…

e.g.
"word1 +word2"
will work, but not:
"word1 AND word2"
3 REPLIES 3

kevinr
Star Contributor
Star Contributor
We do not directly expose all Lucene search syntax functions in the search text fields within the web-client UI. We believe this would be much too complex for an average user - we are already converting something as simple looking as:

apple +orange
into:

(@\{http\://www.alfresco.org/model/content/1.0\}name:apple* +@\{http\://www.alfresco.org/model/content/1.0\}name:orange*)
(TEXT:apple* +TEXT:orange*)
You would not want to type all that into the search field Smiley Happy

Currently we support "+" for AND and "-" for NOT, with no operator being the OR default. You can also configure the search in the web-client to assume AND by default instead of OR if you prefer to see less results when you enter multiple terms. We also support quoted phrases e.g. "apple orange".

Thanks,

Kevin

glux
Champ in-the-making
Champ in-the-making
You can also configure the search in the web-client to assume AND by default instead of OR if you prefer to see less results when you enter multiple terms. We also support quoted phrases e.g. "apple orange".

Yes, I see how to configure the AND by default in web-client-config.xml. Is there a way to express an OR with this setting? I tried with '+' and it did not work… Thanks.

kevinr
Star Contributor
Star Contributor
There is not a way to express OR when using this setting, it has been raised as a bug:
http://www.alfresco.org/jira/browse/AWC-630

Thanks,

Kevin