[ 
https://issues.apache.org/jira/browse/SOLR-1060?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=12683014#action_12683014
 ] 

Fergus McMenemie commented on SOLR-1060:
----------------------------------------

Thanks for the changes to SOLR-1059. I am now attempting to test document 
deletion; it is not going too well!

{code}
Mar 18, 2009 1:12:48 PM org.apache.solr.core.SolrCore execute
INFO: [] webapp=/apache-solr-1.4-dev path=/dataimport 
params={command=full-import&clean=false&entity=single-delete&single=/Volumes/spare/ts/schema/data/news/fdw2008/jn71796.xml}
 status=0 QTime=1 
Mar 18, 2009 1:12:48 PM org.apache.solr.handler.dataimport.SolrWriter 
readIndexerProperties
INFO: Read dataimport.properties
Mar 18, 2009 1:12:48 PM org.apache.solr.handler.dataimport.DataImporter 
doFullImport
INFO: Starting Full Import
Mar 18, 2009 1:12:48 PM org.apache.solr.handler.dataimport.SolrWriter 
readIndexerProperties
INFO: Read dataimport.properties
Mar 18, 2009 1:12:48 PM org.apache.solr.handler.dataimport.SolrWriter upload
WARNING: Error creating document : SolrInputDocument[{}]
org.apache.solr.common.SolrException: Document [null] missing required field: 
vdkvgwkey
        at 
org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:292)
        at 
org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProcessorFactory.java:59)
        at 
org.apache.solr.handler.dataimport.SolrWriter.upload(SolrWriter.java:67)
        at 
org.apache.solr.handler.dataimport.DataImportHandler$1.upload(DataImportHandler.java:274)
        at 
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:373)
        at 
org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:221)
        at 
org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:163)
        at 
org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:309)
        at 
org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:367)
        at 
org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:348)
Mar 18, 2009 1:12:48 PM org.apache.solr.handler.dataimport.SolrWriter upload
WARNING: Error creating document : SolrInputDocument[{}]
org.apache.solr.common.SolrException: Document [null] missing required field: 
vdkvgwkey
        at 
org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:292)
        at 
org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProcessorFactory.java:59)
        at 
org.apache.solr.handler.dataimport.SolrWriter.upload(SolrWriter.java:67)
        at 
org.apache.solr.handler.dataimport.DataImportHandler$1.upload(DataImportHandler.java:274)
        at 
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:373)
        at 
org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:221)
        at 
org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:163)
        at 
org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:309)
        at 
org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:367)
        at 
org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:348)
Mar 18, 2009 1:12:48 PM org.apache.solr.handler.dataimport.SolrWriter upload
WARNING: Error creating document : SolrInputDocument[{}]
org.apache.solr.common.SolrException: Document [null] missing required field: 
vdkvgwkey
        at 
org.apache.solr.update.DocumentBuilder.toDocument(DocumentBuilder.java:292)
        at 
org.apache.solr.update.processor.RunUpdateProcessor.processAdd(RunUpdateProcessorFactory.java:59)
        at 
org.apache.solr.handler.dataimport.SolrWriter.upload(SolrWriter.java:67)
        at 
org.apache.solr.handler.dataimport.DataImportHandler$1.upload(DataImportHandler.java:274)
        at 
org.apache.solr.handler.dataimport.DocBuilder.buildDocument(DocBuilder.java:373)
        at 
org.apache.solr.handler.dataimport.DocBuilder.doFullDump(DocBuilder.java:221)
        at 
org.apache.solr.handler.dataimport.DocBuilder.execute(DocBuilder.java:163)
        at 
org.apache.solr.handler.dataimport.DataImporter.doFullImport(DataImporter.java:309)
        at 
org.apache.solr.handler.dataimport.DataImporter.runCmd(DataImporter.java:367)
        at 
org.apache.solr.handler.dataimport.DataImporter$1.run(DataImporter.java:348)
Mar 18, 2009 1:12:48 PM org.apache.solr.handler.dataimport.DocBuilder execute
INFO: Time taken = 0:0:0.41

{code}

my entity is as follows:-
{code}
     <entity name="single-delete"
                 dataSource="myFILEreader"
                 processor="XPathEntityProcessor"
                 url="${dataimporter.request.single}"
                 rootEntity="true"
                 flatten="true"
                 stream="false"
                 forEach="/record | /record/mediaBlock"
                 transformer="RegexTransformer">

      <!-- the following columns are only defined if the regex matches -->
      <field column="fileAbsolutePath"    
template="${dataimporter.request.single}" /> 
      <field column="$deleteQuery"        
template="fileAbsolutePath:${dataimporter.request.single}" />                
      <field column="vdkvgwkey"           
template="${dataimporter.request.single}" /> 
      </entity>
{code}

And repeating what was shown in the traceback my test was:-

get 
'http://localhost:8080/apache-solr-1.4-dev/dataimport?command=full-import&entity=single-delete&clean=false&single=/Volumes/spare/ts/ford/schema/data/news/fdw2008/jn71796.xml'

> a new DIH EnityProcessor allowing text file lists of files to be indexed
> ------------------------------------------------------------------------
>
>                 Key: SOLR-1060
>                 URL: https://issues.apache.org/jira/browse/SOLR-1060
>             Project: Solr
>          Issue Type: New Feature
>          Components: contrib - DataImportHandler
>    Affects Versions: 1.4
>            Reporter: Fergus McMenemie
>            Assignee: Shalin Shekhar Mangar
>             Fix For: 1.4
>
>         Attachments: SOLR-1060.patch, SOLR-1060.patch
>
>   Original Estimate: 120h
>  Remaining Estimate: 120h
>
> I have finished a new DIH EntityProcessor. It is designed around the idea 
> that whatever demon is used to maintain your content store it is likely to 
> drop a report or log file explaining what has changed within your content 
> store. I wish to use this report file to control the indexing of the new or 
> changed content and the removal of old content. The report files, perhaps 
> from un-tar or un-zip, are likely to reference jpegs and directory stubs 
> which need to be ignored. I assumed a file based content repository but this 
> should be expanded to handle URI's as well
> I feel that the current FileListEntityProcessor is poorly named. It should be 
> called the dirWalkEntityProcessor or dirCrawlEntityProcessor or such. And 
> this new EntityProcessor should have the name FileListEntityProcessor. 
> However what is done is done. I then came up with manifestEnityProcessor 
> which I thought suited, manifest files are all over the content sets I deal 
> with and the dictionary definition seemed close enough ("ships manifest"). 
> However how about ChangeListEntityProcessor
> {code}
>        <entity name="jc"
>                processor="ManifestEntityProcessor"
>                baseDir="/Volumes/Techmore/ts/aaa/schema/data"
>                rootEntity="false"
>                dataSource="null"
>                allowRegex="^.*\.xml$"
>                blockRegex="usc2009"
>                manifestFileName="/Volumes/ts/man-find.txt"
>                docAddRegex=".*"
>                >
> {code}
> The new entity fields are as follows.
>  
>    *manifestFileName* is the required location of the manifest file. If this 
> value is relative, it assumed to be relative to baseDir.
>    *allowRegex* is an optional attribute that if present discards any line 
> which does not match the regExp
>  
>    *blockRegex* is an optional attribute that is applied after any allowRegex 
> and discards any line which matches the regExp
>    *docAddRegex* is a required regex to identify lines which when matched 
> should cause docs to be added to the index. As well as matching the line it 
> should also return the portion of the line which contains the filepath as 
> group(1)
>    *docDeleteRegex* is an optional value of a regex to identify documents 
> which when matched should be deleted from the index. As well as matching the 
> line it should also return the portion of the line which contains the 
> filepath as group(1) **PLANNED**

-- 
This message is automatically generated by JIRA.
-
You can reply to this email to add a comment to the issue online.

Reply via email to