Exact name query
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-01-2007 01:13 PM
Hi all,
I have created 2 files with the names "bob" and "bob friend"
When I do the following query:
@cm\:name:bob
in the node browser I get both returned. Is there a query which allows an exact match so only "bob" is returned.
I understand the reason "bob friend" is being returned because "bob" and "friend" are tokenised.
Thanks for any help,
Ben.
I have created 2 files with the names "bob" and "bob friend"
When I do the following query:
@cm\:name:bob
in the node browser I get both returned. Is there a query which allows an exact match so only "bob" is returned.
I understand the reason "bob friend" is being returned because "bob" and "friend" are tokenised.
Thanks for any help,
Ben.
Labels:
- Labels:
-
Archive
6 REPLIES 6
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2007 06:47 AM
@cm\:name:"bob"
may give you what you want.
Kevin
may give you what you want.
Kevin
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-03-2007 07:13 AM
Thanks for the quick responce, unfortunately that didn't seem to work. It still returns both "bob" and "bob friend":
Search
Search Language: lucene
Search: @cm\:name:"bob"
Results (2 rows)
Name Node Parent
{http://www.alfresco.org/model/content/1.0}bob workspace://SpacesStore/52771e17-f966-11db-ba12-57a41379f1a3 workspace://SpacesStore/73569c60-e8fc-11db-912a-c1b3c759d3a2
{http://www.alfresco.org/model/content/1.0}bob_x0020_friend workspace://SpacesStore/5c28f4f0-f966-11db-ba12-57a41379f1a3 workspace://SpacesStore/73569c60-e8fc-11db-912a-c1b3c759d3a2
ta,
Ben.
Search
Search Language: lucene
Search: @cm\:name:"bob"
Results (2 rows)
Name Node Parent
{http://www.alfresco.org/model/content/1.0}bob workspace://SpacesStore/52771e17-f966-11db-ba12-57a41379f1a3 workspace://SpacesStore/73569c60-e8fc-11db-912a-c1b3c759d3a2
{http://www.alfresco.org/model/content/1.0}bob_x0020_friend workspace://SpacesStore/5c28f4f0-f966-11db-ba12-57a41379f1a3 workspace://SpacesStore/73569c60-e8fc-11db-912a-c1b3c759d3a2
ta,
Ben.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-04-2007 10:14 AM
Hi
There is no way to do what you want….
You would have to add "not any token that is not bob" which would be quite expensive to do. This will find everything that does not match bob and invert it.
If you want identifiers you can declare attributes to be untokenised.
An exact match is then always going to happen as there is ony one token.
You could filter the results for the exact match.
It is possible that the score can help here - an exact match of one token should score higher likely1.0, while the other doc will score lower related to the number of tokens. If not is possible to tweak scoring. We have not really worried about scoring and taken the lucene default. Stop words will stuff this up …The bob is liely to be the same as the "the" will be excluded.
Hope this helps a bit …
Andy
There is no way to do what you want….
You would have to add "not any token that is not bob" which would be quite expensive to do. This will find everything that does not match bob and invert it.
If you want identifiers you can declare attributes to be untokenised.
An exact match is then always going to happen as there is ony one token.
You could filter the results for the exact match.
It is possible that the score can help here - an exact match of one token should score higher likely1.0, while the other doc will score lower related to the number of tokens. If not is possible to tweak scoring. We have not really worried about scoring and taken the lucene default. Stop words will stuff this up …The bob is liely to be the same as the "the" will be excluded.
Hope this helps a bit …
Andy
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎04-21-2014 06:08 AM
I faced a similar issue. But it seems that the above discussion was in with reference to an older alfresco version.
I am working with Alfresco4.1.3.
I made my exact search work by prefixing the property name with "=" operator.
For example: =cm:customproperty:"abc"
Courtesy : http://docs.alfresco.com/4.2/index.jsp?topic=%2Fcom.alfresco.enterprise.doc%2Fconcepts%2Frm-searchsy...
Other option is to make the tokenized attribute to false in your model file.
http://docs.alfresco.com/4.1/index.jsp?topic=%2Fcom.alfresco.enterprise.doc%2Fconcepts%2Fsearch-fts-...
I am working with Alfresco4.1.3.
I made my exact search work by prefixing the property name with "=" operator.
For example: =cm:customproperty:"abc"
Courtesy : http://docs.alfresco.com/4.2/index.jsp?topic=%2Fcom.alfresco.enterprise.doc%2Fconcepts%2Frm-searchsy...
Other option is to make the tokenized attribute to false in your model file.
http://docs.alfresco.com/4.1/index.jsp?topic=%2Fcom.alfresco.enterprise.doc%2Fconcepts%2Fsearch-fts-...
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎06-25-2014 07:24 AM
Hi Sanket,
I tried the same "=" operator to retrieve exact search. But it didn't helped.
I tried the same "=" operator to retrieve exact search. But it didn't helped.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
‎05-14-2014 01:20 PM
Hi Benjamin,
"cm:name" is out of the box property and it is behaving like this as it is declared as tokenized "both" for supporting full text search in out of the box alfresco.
Ideally,you should not change that behavior.
I would suggest to use custom property instead of it and make that property as tokenized "false" as suggest by sanket.
Thanks,
Yogesh Prajapati
"cm:name" is out of the box property and it is behaving like this as it is declared as tokenized "both" for supporting full text search in out of the box alfresco.
Ideally,you should not change that behavior.
I would suggest to use custom property instead of it and make that property as tokenized "false" as suggest by sanket.
Thanks,
Yogesh Prajapati