Tag by folder #205
Comments
Everything looks good. Check in debug mode that your condition |
So I tried this: def SetFolderNameTag(self, AmbarFile): and this: def SetFolderNameTag(self, AmbarFile): but after using the 'sudo docker logs pipelineContainerID' command the output was this: Dec 18, 2018 2:04:31 PM org.apache.tika.config.InitializableProblemHandler$3 handleInitializableProblem Dec 18, 2018 2:04:31 PM org.apache.tika.config.InitializableProblemHandler$3 handleInitializableProblem Is that the correct command to view the proper log? I ask because on line 96 of autotagging.py there is this statement: self.logger.LogMessage('verbose', '{0} tag added to {1}'.format(Tag, FullName)) but I am not seeing any of that output in the log file above EDIT: So now (after using docker-compose down and reloading the images) I am getting this in the log (after the previously stated output): 2018-12-18 14:50:09.066066: [info] [0] started 2018-12-18 14:51:09.128585: [verbose] [0] add task received for (then comes the full_name data) This second 2 line chunk repeats a bunch of times, presumably for each time the new tag is supposed to be applied. After grepping the language ('meta found for') in that output it looks like it's coming from the pipeline.py file, specifically lines 78 and 113. Thanks again for your help! |
Did you crawl a file with 'folderName' in the path? |
yes |
Can you please put the full path here as example? |
Sure, //mycrawler/outerFolder/subFolder/testDocument.pdf folder name is outerFolder |
So your code snippet is:
Am I right? |
Yes, that looks right. |
Did you change the ambar pipeline image source in docker-compose file? |
Yes |
Can you share your docker-compose file please |
I think I may have figured it out. Once I ran docker's prune command I was able to see a change in the tag (I had changed ocr to ocr-test like the poster did in Issue #175 ). Rerunning it now to see if the new tags show up. |
Yep, that did it. It's working as expected now. Thanks so much for your help! |
I'm trying to follow what happened in Issue #175 but am unable to reproduce his results.
Here's my code:
def AutoTagAmbarFile(self, AmbarFile):
self.SetOCRTag(AmbarFile)
self.SetSourceIdTag(AmbarFile)
self.SetArchiveTag(AmbarFile)
self.SetImageTag(AmbarFile)
self.SetFolderTag(AmbarFile)
Followed by this:
def SetFolderTag(self, AmbarFile):
if('folderName' in AmbarFile['meta']['full_name']):
self.AddTagToAmbarFile(AmbarFile['file_id'], AmbarFile['meta']['full_name']
,self.AUTO_TAG_TYPE, 'folderName')
I've tried altering a pre-existing tag as did the poster in Issue #175 , but was unable to see any change after I rebuilt the Pipeline image, pulled the new image, and spun up a new instance of AMBAR. I've tried clearing my browser cache, as that had caused issues in the past, but there was no change.
Is there somewhere else I need to change some code in order for the new tag to show up on the search page?
Thanks in advance for any help you can offer!
The text was updated successfully, but these errors were encountered: