none
Sharepoint Connector null title RRS feed

  • Question

  • We are using the sharepoint connector to index our 2007 sharepoint environment.  Some pages have titles, some do not, and display "null" as the title of the document.  I have tried various document processing stages, using the Default Value stage I can get it to display "No Title".  I have used an attribute merger to concatenate the name and title field so I could see the difference.  I have seen that there is a difference between the name attribute and the title attribute for some sharepoint documents so I can’t use them interchangeably.  I am wondering if anyone else using the sharepoint connector has had this problem and maybe another way to think around this.  Is there a way to set one attribute as the default if the null case is detected?

    Tuesday, April 5, 2011 12:55 PM

Answers

  • Looks like you should be able to use either the AttributeCopy or the AttributeMerger stage.

    If the source attributes either have a a non-empty value or do not exist at all, you should be able to use AttributeCopy, with mappings of the form

    titleA:title titleB:title titleC:title

    --- this would give title the value from titleC if it exists, otherwise, titleB if it exists, otherwise titleA if is exists.

    If the source attributes may be empty, you could use AttributeMerger with an empty separator (I think).

    Note: if AttributeMerger/AttributeCopy works on a temporary variable which is eventually copied to the target ttribute, then this is all you need. Otherwise, you should use a temporary attribute, which is then copied using a separate AttributeCopy stage.

    Thursday, April 7, 2011 6:42 AM

All replies

  • Hi,

    We had the same problem. Some of the documents was missing the title field when indexing SharePoint 2010 with the SharePoint connector. In SharePoint, not all documents and files have a title. The title is extracted from metadata like the Title field in MS Office documents, or you can set this manually when uploading or creating a document in SharePoint. When SharePoint is missing the title of a file, the filename is used as the display name in the SharePoint GUI.

    It looks like the connector is missing this "logic" to use filename if title is missing. I have created a custom pipeline stage which uses the filename as title when title is empty. This might also be solved changing the default-mappings.xml in the SharePoint Connector 1.0.

    Regards,
    Erik

    Wednesday, April 6, 2011 11:35 AM
  • Erik,

    That's what I have been trying to do but I can't find the correct doc processor stages.  Mind letting me know which ones your using?  I tried changing the default mapping.  It didn't affect anything.  Every stage I seem to try needs a hard coded string value.  I want it to do exactly what your doing, on empty use another attribute, but I can't seem to get any of the stages to do it.  Tried the Replacer stage, but couldn't seem to get the configuration to take the attribute.

     

    Thanks,

    Rodney

     

    Wednesday, April 6, 2011 2:06 PM
  • Looks like you should be able to use either the AttributeCopy or the AttributeMerger stage.

    If the source attributes either have a a non-empty value or do not exist at all, you should be able to use AttributeCopy, with mappings of the form

    titleA:title titleB:title titleC:title

    --- this would give title the value from titleC if it exists, otherwise, titleB if it exists, otherwise titleA if is exists.

    If the source attributes may be empty, you could use AttributeMerger with an empty separator (I think).

    Note: if AttributeMerger/AttributeCopy works on a temporary variable which is eventually copied to the target ttribute, then this is all you need. Otherwise, you should use a temporary attribute, which is then copied using a separate AttributeCopy stage.

    Thursday, April 7, 2011 6:42 AM
  • Hi Rodney,

    I'm not using any of the default doc processor stages, or any configurations of them. I have implemented a completely custom processor stage in python. Information on how to do this this can be found in the document ESP_Document_Processor_Integration_Guide.pdf.

    If you haven't done this before, it might be a bit challenging. I would try Raymonds proposal first.

    Regards,
    Erik

    • Marked as answer by ROJLITTL Wednesday, December 28, 2011 6:50 PM
    • Unmarked as answer by ROJLITTL Wednesday, December 28, 2011 6:50 PM
    Thursday, April 7, 2011 12:52 PM
  • We tried this and never could get it to work.  We have started to implement an event reciever in our SharePoint environment that will populate Title with name at document upload time.

    I think the custom python code is the way to go.  I am still learning python, so it may take some time to figure that out.  Whichever comes first will be implemented in our environment.

     

    Rodney

    Wednesday, December 28, 2011 6:52 PM