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 [email protected] [[email protected]]
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
[email protected]<mailto:[email protected]>

From: [email protected] [mailto:[email protected]]
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 [email protected]" <[email protected]>

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.


Reply via email to