AnsweredAssumed Answered

API UPLOAD problem - ERROR - SEARCH can not find any document uploaded

Question asked by rodrigo.huerta on Apr 28, 2018

Hi folks.


I have some strange problem here with Upload API and Search engine after I upload files (10,000 tiff).


I'm using /alfresco/service/api/upload API. After upload the file I get the NodeRef and using that NodeRef I load 10 properties for each file. This procedure repeats for all 10,000 files. So far so good for that.


My problem is the search afther that upload process. Using Alfresco GUI and the search area I couldn't find any file. I tried by file name, properties, etc. No one could be found. Also using Alfresco API search I couldn't find no one.


The most strange here is this:


Using Alfresco GUI, I upload 10 files to some folder and sourprice!, I could find any of that files by name. Also if I change the properties using the Alfresco GUI I could find any of those 10 documents for any properties. So, more strange was after be working with that 10 files uploaded by the GUI, I ran the upload API to change all those properties and same problem!, no one couldn't be find from that moment, even using the name of the file.




  • After using the upload API do I must run any command to force indexation of these files?
  • Why those files are not being indexing is these files are upload using UPLOAD API?
  • Something missed in this procedure?  (I upload a file, get the NodeRef and the load properties to that Node Ref, all using Alfresco API's).


I appreciate your soon asnwer, comments, critics, etc.



Rodrigo Huerta


Here are two codes I use. One for upload the files and the other one for change the properties of that file. Hope these code are ussefull for you....


Code to Upload The File


curl -X POST -F filename=MAWER_CAJA_001_0002_000000.tif -F contenttype="PROP:PROPIEDADES" -F filedata=@/data_cliente/ingesta_2018_04_27_08_08_40_AM/MAWER_CAJA_001_0002.tif -F siteid=MAHUER -F containerid=DocumentLibrary -F uploaddirectory=/DATA_CLIENTE/RECOVERY_SYSTEMS/BASE_1/FLD_1 "http://admin:xxxxxx@"


Code to Upload The Properties of the File Already Uploaded


curl -X PUT -d '{ "properties": { "PROP:RUC":"20600133800","PROP:NUMERO_DOCUMENTO":"1000","PROP:MONTO":"100000","PROP:DATO_1":"ABC000001","PROP:DATO_2":"DEF000001","PROP:DATO_3":"GHI000001","PROP:DATO_4":"JKL000001","PROP:AREA":"CONTABILIDAD","PROP:TIPO_DOCUMENTO":"FACTURA","PROP:FECHA":"1744-01-01" } }' 'http://admin:xxxxxxx@{NodeRef}'