Microsoft Developer Network > Forums Home > Windows Desktop Development Forums > Windows Desktop Search Help > WDS returns nothing when searching with CUSTOM PROPERTIES

Answered WDS returns nothing when searching with CUSTOM PROPERTIES

  • Wednesday, August 18, 2010 3:00 PM
     
     

    Hi everyone,

    I have added some custom properties (metadata) to my "myFile.doc" file. Let say that my custom properties are CustomPropName, CustomPropRole and CustomPropLevel and the corresponding values are name1, role1 and level1.

    I created the following propdesc file to register the custom properties: (here we can just see the code for CustomPropRole property)

    The propdesc file is:

    <schema xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
            xmlns="http://schemas.microsoft.com/windows/2006/propertydescription"
            schemaVersion="1.0" >
        <propertyDescriptionList publisher="Microsoft" product="Windows">
            <propertyDescription name="CustomPropRole" formatID="{4c7390d2-119e-4912-a8c4-49621119272d}" propID="10">
                <description>Role description.</description>
                <searchInfo inInvertedIndex="true" isColumn="true" columnIndexType="OnDisk"/>           
            <typeInfo type="String" multipleValues="false" isViewable="true" isQueryable="true" isInnate="true" />
                <labelInfo label="Role Label"/>
            </propertyDescription>       
        </propertyDescriptionList>
    </schema>

    But When I search using these custom properties , the WDS does not find the "myFile.doc". the syntax in the search is: CustomPropRole:role1 (this query should just return one file which is "myFile.doc").

    Note:

    1- Searching using name, size, author...does return the correct file. (these are the default properties for the doc files, ex: "name:myFile").

    2- Searching using the custom properties in free text does return the correct file (ex: "role1", but it is not what I am looking for...).

    I am not sure if I am missing something here...

    Thank you for your help.


     


    Juba

Answers

  • Monday, August 23, 2010 5:46 PM
     
     Answered

    Finaly I got the answer: I had to use FormatId="{D5CDD505-2E9C-101B-9397-08002B2CF9AE}".

    Custom properties takes D5CDD505-2E9C-101B-9397-08002B2CF9AEas a guid. You can see (http://msdn.microsoft.com/en-us/library/ms693066%28VS.85%29.aspx) for more details.

     


    Juba
    • Marked As Answer by juba007 Monday, August 23, 2010 5:46 PM
    •