Problems with searching for document title

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-07-2011 02:42 PM
Hi,
I face a new problem when searching the document repository via the web service layer. Supposed I have a document called this is a document draft.doc and I trigger the following search:
The result is shown as expected. But when I trigger the following query, I don't get any result:
There is something wrong about the word draft. Some idea? Thanks!
Cheers,
Daniel
I face a new problem when searching the document repository via the web service layer. Supposed I have a document called this is a document draft.doc and I trigger the following search:
@cm\:content.mimetype:"application/msword" AND @cm\:title:"this is a document"
The result is shown as expected. But when I trigger the following query, I don't get any result:
@cm\:content.mimetype:"application/msword" AND @cm\:title:"this is a document draft"
There is something wrong about the word draft. Some idea? Thanks!
Cheers,
Daniel
Labels:
- Labels:
-
Archive
6 REPLIES 6

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2011 06:29 AM
Has you triyng this query?
@cm\:content.mimetype:"application/msword" AND @cm\:title:"this is a document draft.doc"
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2011 06:49 AM
Probably you have to try the following:
@cm\:content.mimetype:"application/msword" AND @cm\:name:"this is a document draft.doc"
Hope this helps.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2011 01:06 PM
Hi!
Thank you for your replies! If I enter the following query (exact phrase):
the document is found. If I enter the following query (exact phrase):
the document is also found. But if I change the query (exact phrase) to:
the document is not found. In general I would have expected, that the second query (without the document ending) also returns the desired document.
If I enter the following query (all words):
What am I missing? Wrong query Any idea?
Cheers,
Daniel
Thank you for your replies! If I enter the following query (exact phrase):
@cm\:content.mimetype:"application/msword" AND (@cm\:title:"this is a document draft.doc" OR @cm\:name:"this is a document draft.doc")
the document is found. If I enter the following query (exact phrase):
@cm\:content.mimetype:"application/msword" AND (@cm\:title:"this is a document draft*" OR @cm\:name:"this is a document draft*")
the document is also found. But if I change the query (exact phrase) to:
@cm\:content.mimetype:"application/msword" AND (@cm\:title:"this is a document draft" OR @cm\:name:"this is a document draft")
the document is not found. In general I would have expected, that the second query (without the document ending) also returns the desired document.
If I enter the following query (all words):
@\{http\://www.alfresco.org/model/content/1.0\}content.mimetype:* AND ((@cm\:title:this AND @cm\:title:is AND @cm\:title:a AND @cm\:title:document AND @cm\:title:draft) OR (@cm\:name:this AND @cm\:name:is AND @cm\:name:a AND @cm\:name:document AND @cm\:name:draft)
the document is also not found.What am I missing? Wrong query Any idea?
Cheers,
Daniel

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-08-2011 01:11 PM
Hm, I think I already know the answer: The word draft is not taken for it's own. Lucene only sees the word draft.doc as separate word.
Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-09-2011 05:33 AM
Notice that by default the cm:title property is a multi language property (mltext), taking a look at the contentModel.xml we have:
Lucene will store the value in different index sections, if you have different locale settings for client applications, you could have different results for searches.
I suggest to check if your content is correctly indexed checking the cm:content property for the content in the Node Browser. Here you can check the locale setting for the content that is used by Lucene to categorize the index section.
Hope this helps.
<property name="cm:title"> <title>Title</title> <type>d:mltext</type> <index enabled="true"> <atomic>true</atomic> <stored>false</stored> <tokenised>both</tokenised> </index></property>
This means that the property could be indexed with a specific value for each locale, if your client applications access to Alfresco with different locale settings. Lucene will store the value in different index sections, if you have different locale settings for client applications, you could have different results for searches.
I suggest to check if your content is correctly indexed checking the cm:content property for the content in the Node Browser. Here you can check the locale setting for the content that is used by Lucene to categorize the index section.
Hope this helps.

Options
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
11-14-2011 06:14 AM
Hi OpenPj,
it is not a language problem but more a problem of our store operations. We are setting the title equal to the file name. So this problem only occures, when the searched keyword is at the end of the name (before the extension). We have to modify this. But thank's anyway for your hint!
Cheers,
Daniel
it is not a language problem but more a problem of our store operations. We are setting the title equal to the file name. So this problem only occures, when the searched keyword is at the end of the name (before the extension). We have to modify this. But thank's anyway for your hint!
Cheers,
Daniel
