cancel
Showing results for 
Search instead for 
Did you mean: 

Search for an exact word

niele
Champ on-the-rise
Champ on-the-rise

When performing a standard search through Alfresco Share which does a full text search using afts, does anyone know of a way to search for documents with an exact word?  For example, if I knew my document contained the word "accessibility" I'd want a way to find only documents that have that exact word and not one of its alternate forms.  

As it stands, if I do a simple search for "accessibility" it will also return documents containing words such as "accessible", or "access".  This is nice except when you happen to know the exact form of the word you want.  I had hoped the equals operator would do what I'm asking but it appears it doesn't work the way I thought it would reading the docs (https://docs.alfresco.com/5.2/concepts/rm-searchsyntax-exact.html).

I saw in another similar thread that there might be a ticket open for exact term searching not working properly (https://issues.alfresco.com/jira/browse/SEARCH-1585) but it's not publically viewable.

Currently using ACS 5.2.4 / Alfresco Search Services 1.3.0.5.

Thanks,

Neil

1 ACCEPTED ANSWER

angelborroy
Community Manager Community Manager
Community Manager

This is an open issue, exact term searching is not working at the moment.

For your reference:

https://issues.alfresco.com/jira/browse/SEARCH-1585

Hyland Developer Evangelist

View answer in original post

6 REPLIES 6

jljwoznica
Star Collaborator
Star Collaborator

Try something like this:

To search for an exact term, prefix the term with "=". This ensures that the term will not be tokenized, therefore you can search for stop words. If both FTS and ID base search are supported for a specified or implied property, then exact matching will be used where possible.

For example, the following query will match running but will not be tokenized. If you are using stemming it might not match anything.

=running

For the cm:name field, which is in the index as both tokenized and untokenized, it will use the untokenized field. For example, =part will only match the exact term "part". If you use =part* it will match additional terms, like "partners". If there is no untokenized field in the index, it will fall back to use the tokenized field, and then, with stemming/plurals, it would match.

angelborroy
Community Manager Community Manager
Community Manager

This is an open issue, exact term searching is not working at the moment.

For your reference:

https://issues.alfresco.com/jira/browse/SEARCH-1585

Hyland Developer Evangelist

niele
Champ on-the-rise
Champ on-the-rise

Okay, thanks for the clarification and for making that ticket publically available to view assuming you just did that (I swear I wasn't able to view it this morning).

angelborroy
Community Manager Community Manager
Community Manager

Yes, that was private. I opened the ticket yesterday.

Hyland Developer Evangelist

Yash_111
Champ in-the-making
Champ in-the-making

using = as prefix wont work in version below search services 2.0 to match exact results right?

EddieMay
World-Class Innovator
World-Class Innovator

Hi @Yash_111 

It's better to start a new thread explaining in full the issue you have and giving information about the environment, etc.

HTH,

Digital Community Manager, Alfresco Software.
Problem solved? Click Accept as Solution!