You are viewing a plain text version of this content. The canonical link for it is here.
Posted to user@manifoldcf.apache.org by ka...@nokia.com on 2010/07/06 06:58:14 UTC

RE: Modifying Sharepoint Connector

You can also submit a patch as an attachment to the ticket, if you have one.  Bear in mind that you will need to come up with the diff using "svn diff", based on the current version of trunk.  Also, please note that in all the other connectors that support this feature, somewhere on a job's "Metadata" tab there is a place for two additional pieces of information:  the name of the metadata item to use, and a list of "path value-> metadata value" mappings to use in extracting appropriate metadata values from a document's path.  I suggest taking the code from one of these connectors rather than inventing it all yourself.

If this sounds like too much work, by all means create your own fix and leave the ticket in place for someone to work on in the future.

Thanks,
Karl

________________________________________
From: ext Rohan.GPatil@cognizant.com [Rohan.GPatil@cognizant.com]
Sent: Tuesday, July 06, 2010 12:48 AM
To: Wright Karl (Nokia-MS/Cambridge)
Subject: RE: Modifying Sharepoint Connector

Hi,

Hmmm.. Okay I will raise a jira ticket.

The idea was to categorize the files for faceted search in Solr. I am not able to figure out other means of categorizing files, other than based on the folder structure.

Thanks & Regards,
Rohan G Patil
Cognizant  Programmer Analyst Trainee,Bangalore || Mob # +91 9535577001
Rohan.GPatil@cognizant.com<ma...@cognizant.com>

From: karl.wright@nokia.com [mailto:karl.wright@nokia.com]
Sent: Tuesday, July 06, 2010 5:15 AM
To: G Patil, Rohan (Cognizant)
Subject: RE: Modifying Sharepoint Connector


Rohan,

Most connectors already have support for a 'path metadata field', but i seem to recall that sharepoint's structure did not seem to make this idea worthwhile.  but it would be straightforward to add.



I suggest creating a jira ticket describing your requirement.



Karl



--- original message ---

From: "ext Rohan.GPatil@cognizant.com" <Ro...@cognizant.com>

Subject: Modifying Sharepoint Connector

Date: July 5, 2010

Time: 3:30:14  AM


Hello Karl.


I want to send the name of the folder where the file resides in as one of the meta data fields to solr. For categorising the files. based on the folder structure in share point. for that I plan to use this simple code snippet


private static String getParentFolder(String absoluteFilePath) {

String[] parts = absoluteFilePath.split("/");

return parts[parts.length-2];

}

or this snippet.

private static String getParentFolder(String absoluteFilePath) {

int indexOfParentFolder = absoluteFilePath.lastIndexOf("/");

StringBuilder parentFolder = new StringBuilder();

for(int i = indexOfParentFolder-1;i>0&&absoluteFilePath.charAt(i)!='/';i--)

{

parentFolder.append(absoluteFilePath.charAt(i));

}

return parentFolder.reverse().toString()

}



I want to know where I can put this piece of code, in the file SharePointRepository.Java, I went through the code, I couldn't find where exactly the metadata fields were being added.



Thanks & Regards

Rohan
This e-mail and any files transmitted with it are for the sole use of
the intended recipient(s) and may contain confidential and privileged
information.
If you are not the intended recipient, please contact the sender by
reply e-mail and destroy all copies of the original message.
Any unauthorized review, use, disclosure, dissemination, forwarding,
printing or copying of this email or any action taken in reliance on this
e-mail is strictly prohibited and may be unlawful.




This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information.

If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.

Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful.


This e-mail and any files transmitted with it are for the sole use of
the intended recipient(s) and may contain confidential and privileged
information.
If you are not the intended recipient, please contact the sender by
reply e-mail and destroy all copies of the original message.
Any unauthorized review, use, disclosure, dissemination, forwarding,
printing or copying of this email or any action taken in reliance on this
e-mail is strictly prohibited and may be unlawful.




This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful.



RE: Modifying Sharepoint Connector

Posted by ka...@nokia.com.
Then, please close the jira ticket you created.

Thanks,
Karl

________________________________________
From: ext Rohan.GPatil@cognizant.com [Rohan.GPatil@cognizant.com]
Sent: Tuesday, July 06, 2010 1:18 AM
To: Wright Karl (Nokia-MS/Cambridge)
Cc: connectors-user@incubator.apache.org
Subject: RE: Modifying Sharepoint Connector

OMG!

Sorry! the Sharepoint connector already has this path metadata feature!!


I have overlooked it!

Sorry once again!

Thanks & Regards,
Rohan G Patil

-----Original Message-----
From: karl.wright@nokia.com [mailto:karl.wright@nokia.com]
Sent: Tuesday, July 06, 2010 10:28 AM
To: G Patil, Rohan (Cognizant)
Cc: connectors-user@incubator.apache.org
Subject: RE: Modifying Sharepoint Connector

You can also submit a patch as an attachment to the ticket, if you have
one.  Bear in mind that you will need to come up with the diff using
"svn diff", based on the current version of trunk.  Also, please note
that in all the other connectors that support this feature, somewhere on
a job's "Metadata" tab there is a place for two additional pieces of
information:  the name of the metadata item to use, and a list of "path
value-> metadata value" mappings to use in extracting appropriate
metadata values from a document's path.  I suggest taking the code from
one of these connectors rather than inventing it all yourself.

If this sounds like too much work, by all means create your own fix and
leave the ticket in place for someone to work on in the future.

Thanks,
Karl

________________________________________
From: ext Rohan.GPatil@cognizant.com [Rohan.GPatil@cognizant.com]
Sent: Tuesday, July 06, 2010 12:48 AM
To: Wright Karl (Nokia-MS/Cambridge)
Subject: RE: Modifying Sharepoint Connector

Hi,

Hmmm.. Okay I will raise a jira ticket.

The idea was to categorize the files for faceted search in Solr. I am
not able to figure out other means of categorizing files, other than
based on the folder structure.

Thanks & Regards,
Rohan G Patil
Cognizant  Programmer Analyst Trainee,Bangalore || Mob # +91 9535577001
Rohan.GPatil@cognizant.com<ma...@cognizant.com>

From: karl.wright@nokia.com [mailto:karl.wright@nokia.com]
Sent: Tuesday, July 06, 2010 5:15 AM
To: G Patil, Rohan (Cognizant)
Subject: RE: Modifying Sharepoint Connector


Rohan,

Most connectors already have support for a 'path metadata field', but i
seem to recall that sharepoint's structure did not seem to make this
idea worthwhile.  but it would be straightforward to add.



I suggest creating a jira ticket describing your requirement.



Karl



--- original message ---

From: "ext Rohan.GPatil@cognizant.com" <Ro...@cognizant.com>

Subject: Modifying Sharepoint Connector

Date: July 5, 2010

Time: 3:30:14  AM


Hello Karl.


I want to send the name of the folder where the file resides in as one
of the meta data fields to solr. For categorising the files. based on
the folder structure in share point. for that I plan to use this simple
code snippet


private static String getParentFolder(String absoluteFilePath) {

String[] parts = absoluteFilePath.split("/");

return parts[parts.length-2];

}

or this snippet.

private static String getParentFolder(String absoluteFilePath) {

int indexOfParentFolder = absoluteFilePath.lastIndexOf("/");

StringBuilder parentFolder = new StringBuilder();

for(int i =
indexOfParentFolder-1;i>0&&absoluteFilePath.charAt(i)!='/';i--)

{

parentFolder.append(absoluteFilePath.charAt(i));

}

return parentFolder.reverse().toString()

}



I want to know where I can put this piece of code, in the file
SharePointRepository.Java, I went through the code, I couldn't find
where exactly the metadata fields were being added.



Thanks & Regards

Rohan
This e-mail and any files transmitted with it are for the sole use of
the intended recipient(s) and may contain confidential and privileged
information.
If you are not the intended recipient, please contact the sender by
reply e-mail and destroy all copies of the original message.
Any unauthorized review, use, disclosure, dissemination, forwarding,
printing or copying of this email or any action taken in reliance on
this
e-mail is strictly prohibited and may be unlawful.




This e-mail and any files transmitted with it are for the sole use of
the intended recipient(s) and may contain confidential and privileged
information.

If you are not the intended recipient, please contact the sender by
reply e-mail and destroy all copies of the original message.

Any unauthorized review, use, disclosure, dissemination, forwarding,
printing or copying of this email or any action taken in reliance on
this e-mail is strictly prohibited and may be unlawful.


This e-mail and any files transmitted with it are for the sole use of
the intended recipient(s) and may contain confidential and privileged
information.
If you are not the intended recipient, please contact the sender by
reply e-mail and destroy all copies of the original message.
Any unauthorized review, use, disclosure, dissemination, forwarding,
printing or copying of this email or any action taken in reliance on
this
e-mail is strictly prohibited and may be unlawful.




This e-mail and any files transmitted with it are for the sole use of
the intended recipient(s) and may contain confidential and privileged
information.
If you are not the intended recipient, please contact the sender by
reply e-mail and destroy all copies of the original message.
Any unauthorized review, use, disclosure, dissemination, forwarding,
printing or copying of this email or any action taken in reliance on
this e-mail is strictly prohibited and may be unlawful.



This e-mail and any files transmitted with it are for the sole use of
the intended recipient(s) and may contain confidential and privileged
information.
If you are not the intended recipient, please contact the sender by
reply e-mail and destroy all copies of the original message.
Any unauthorized review, use, disclosure, dissemination, forwarding,
printing or copying of this email or any action taken in reliance on this
e-mail is strictly prohibited and may be unlawful.



This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful.

RE: Modifying Sharepoint Connector

Posted by Ro...@cognizant.com.
OMG!

Sorry! the Sharepoint connector already has this path metadata feature!!


I have overlooked it!

Sorry once again!

Thanks & Regards,
Rohan G Patil

-----Original Message-----
From: karl.wright@nokia.com [mailto:karl.wright@nokia.com] 
Sent: Tuesday, July 06, 2010 10:28 AM
To: G Patil, Rohan (Cognizant)
Cc: connectors-user@incubator.apache.org
Subject: RE: Modifying Sharepoint Connector

You can also submit a patch as an attachment to the ticket, if you have
one.  Bear in mind that you will need to come up with the diff using
"svn diff", based on the current version of trunk.  Also, please note
that in all the other connectors that support this feature, somewhere on
a job's "Metadata" tab there is a place for two additional pieces of
information:  the name of the metadata item to use, and a list of "path
value-> metadata value" mappings to use in extracting appropriate
metadata values from a document's path.  I suggest taking the code from
one of these connectors rather than inventing it all yourself.

If this sounds like too much work, by all means create your own fix and
leave the ticket in place for someone to work on in the future.

Thanks,
Karl

________________________________________
From: ext Rohan.GPatil@cognizant.com [Rohan.GPatil@cognizant.com]
Sent: Tuesday, July 06, 2010 12:48 AM
To: Wright Karl (Nokia-MS/Cambridge)
Subject: RE: Modifying Sharepoint Connector

Hi,

Hmmm.. Okay I will raise a jira ticket.

The idea was to categorize the files for faceted search in Solr. I am
not able to figure out other means of categorizing files, other than
based on the folder structure.

Thanks & Regards,
Rohan G Patil
Cognizant  Programmer Analyst Trainee,Bangalore || Mob # +91 9535577001
Rohan.GPatil@cognizant.com<ma...@cognizant.com>

From: karl.wright@nokia.com [mailto:karl.wright@nokia.com]
Sent: Tuesday, July 06, 2010 5:15 AM
To: G Patil, Rohan (Cognizant)
Subject: RE: Modifying Sharepoint Connector


Rohan,

Most connectors already have support for a 'path metadata field', but i
seem to recall that sharepoint's structure did not seem to make this
idea worthwhile.  but it would be straightforward to add.



I suggest creating a jira ticket describing your requirement.



Karl



--- original message ---

From: "ext Rohan.GPatil@cognizant.com" <Ro...@cognizant.com>

Subject: Modifying Sharepoint Connector

Date: July 5, 2010

Time: 3:30:14  AM


Hello Karl.


I want to send the name of the folder where the file resides in as one
of the meta data fields to solr. For categorising the files. based on
the folder structure in share point. for that I plan to use this simple
code snippet


private static String getParentFolder(String absoluteFilePath) {

String[] parts = absoluteFilePath.split("/");

return parts[parts.length-2];

}

or this snippet.

private static String getParentFolder(String absoluteFilePath) {

int indexOfParentFolder = absoluteFilePath.lastIndexOf("/");

StringBuilder parentFolder = new StringBuilder();

for(int i =
indexOfParentFolder-1;i>0&&absoluteFilePath.charAt(i)!='/';i--)

{

parentFolder.append(absoluteFilePath.charAt(i));

}

return parentFolder.reverse().toString()

}



I want to know where I can put this piece of code, in the file
SharePointRepository.Java, I went through the code, I couldn't find
where exactly the metadata fields were being added.



Thanks & Regards

Rohan
This e-mail and any files transmitted with it are for the sole use of
the intended recipient(s) and may contain confidential and privileged
information.
If you are not the intended recipient, please contact the sender by
reply e-mail and destroy all copies of the original message.
Any unauthorized review, use, disclosure, dissemination, forwarding,
printing or copying of this email or any action taken in reliance on
this
e-mail is strictly prohibited and may be unlawful.




This e-mail and any files transmitted with it are for the sole use of
the intended recipient(s) and may contain confidential and privileged
information.

If you are not the intended recipient, please contact the sender by
reply e-mail and destroy all copies of the original message.

Any unauthorized review, use, disclosure, dissemination, forwarding,
printing or copying of this email or any action taken in reliance on
this e-mail is strictly prohibited and may be unlawful.


This e-mail and any files transmitted with it are for the sole use of
the intended recipient(s) and may contain confidential and privileged
information.
If you are not the intended recipient, please contact the sender by
reply e-mail and destroy all copies of the original message.
Any unauthorized review, use, disclosure, dissemination, forwarding,
printing or copying of this email or any action taken in reliance on
this
e-mail is strictly prohibited and may be unlawful.




This e-mail and any files transmitted with it are for the sole use of
the intended recipient(s) and may contain confidential and privileged
information.
If you are not the intended recipient, please contact the sender by
reply e-mail and destroy all copies of the original message.
Any unauthorized review, use, disclosure, dissemination, forwarding,
printing or copying of this email or any action taken in reliance on
this e-mail is strictly prohibited and may be unlawful.



This e-mail and any files transmitted with it are for the sole use of 
the intended recipient(s) and may contain confidential and privileged 
information.
If you are not the intended recipient, please contact the sender by 
reply e-mail and destroy all copies of the original message.
Any unauthorized review, use, disclosure, dissemination, forwarding, 
printing or copying of this email or any action taken in reliance on this 
e-mail is strictly prohibited and may be unlawful.

  

This e-mail and any files transmitted with it are for the sole use of the intended recipient(s) and may contain confidential and privileged information.
If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
Any unauthorized review, use, disclosure, dissemination, forwarding, printing or copying of this email or any action taken in reliance on this e-mail is strictly prohibited and may be unlawful.