cancel
Showing results for 
Search instead for 
Did you mean: 

Searching metadata

cmeinck
Champ in-the-making
Champ in-the-making
I have created a new content type, and I wanted to be able to search against metadata values. However, even when I code a property as follows:

            <property name="comSmiley TonguerojectManager">
               <title>Project Manager</title>              
               <type>d:text</type>
                <index enabled="true">
                   <atomic>true</atomic>
                   <stored>false</stored>
                   <tokenised>true</tokenised>
                </index>  
            </property

I am unable to find a document of this type when I search against Project Manager.

Is there something else I should be doing?
9 REPLIES 9

andy
Champ on-the-rise
Champ on-the-rise
Hi

How are you doing the search?

Could you check that you have restarted the repository (to pick up the changes to the data dictionary) and that the configuration for the location of the index is correct. Can you add content and find that in a search? Have you put some values into this new property?

On which type/aspect have you added this property?

Regards

Andy

cmeinck
Champ in-the-making
Champ in-the-making
I am just typing the property value ("bang" in my testing) into the search window. I have tried this using the "All Items" and "File names and contents" options. If I add the value to the actual document, it shows up fine; it is only the metadata that seems unsearchable.

I am pretty sure the index location is correct, as I can search content within documents, just not metadata. Which configuration file contains the index location?

I added the property on a custom type which extends the cm:content type.

Thanks for the prompt response!

andy
Champ on-the-rise
Champ on-the-rise
Hi

I understand what is going on now.

Everything is in place in the index etc.  The issue is what is available to you in the advanced search. None of the options search all attributes or allow you to select which attributes to search. It is a number of fixed sets at the moment (title, name and the TEXT from all content)

I have raised this an enhancement AWC-346.

In the short term you could work round this by using d:content instead of d:text (this would then be included in the text index but could find other matches you may not want)

Regards

Andy

kevinr
Star Contributor
Star Contributor
I have raised this an enhancement AWC-346.

This is already raised as feature for a future release. I have Closed and marked the above as Duplicate.

http://www.alfresco.org/jira/browse/AWC-146

Kev

rgauss
Champ in-the-making
Champ in-the-making
I understand how I can add specific attributes to search by individually in the advanced search but I'd like to be able to modify what metadata the basic search in the top right corner of the web client searches on.

I'd think for most environments, it'd be more helpful to just be able to search for 'dog' in the basic search and have that find content with dog in the Title, Name, or Description attributes, rather than requiring the user to remember which attribute that term should be placed in or perform multiple searches to find it.

I'd also like to include some some attributes from custom aspects in that search as well.

Is there an easy way to specify what attributes the basic search in the web client uses?

Thanks.

kevinr
Star Contributor
Star Contributor
I understand. That is not configurable yet in the web-client. Currently you would have to make the changes in code and rebuild the system. I'll raise a JIRA task to that effect we can add it to the list for prioritising.
http://www.alfresco.org/jira/browse/AWC-452

Thanks,

Kevin

rsfeir
Champ in-the-making
Champ in-the-making
Kevin or Roy, is this still true?  Can I not search the store specifically?  If it's still not possible, what is the simple change I can make on my end to make this work?  I was hoping that if I restricted stores by users, that it would only return results in that store, but it seems that as long as a user can authenticate to the web service, they can get all the results back regardless of which store they participate in.

What I want to do is something like:

final Query query = new Query(QueryLanguageEnum.lucene, "( @\\{http\\://www.alfresco.org/model/content/1.0\\}title:" + theContent + ") AND ( @\\{http\\://www.alfresco.org/model/system/1.0}store:Approved");

and return results only from the Approved content store.

Is this possible?  I don't mind patching our own version here with the required change if you can tell me what needs to be done.

Thanks
R

davidc
Star Contributor
Star Contributor
The Query API accepts a store parameter which constrains the scope of the search.  There is no need to specify the store within the query string.  Permissions will apply, so only stores which can be read by a particular user can be searched.

liao1108
Champ in-the-making
Champ in-the-making
It seems that Search and Meta Data is a long problem, i am curious why seldom people araise this question before, the confiuration must be not so intuit, and only quite few people use Alfresco Web Client.