Unanswered DSOFILE.DLL and MSIDXS

  • Tuesday, February 01, 2011 10:17 PM
     
     

    Hi 

    I have an Historical application which uses msdixs (Index server) to search for documents.  I have been using DSOFILE.DLL to update the custom properties on all different types of file. All these different files are stored in a directory with the same extension of HST.

    So for example I will store  test1.doc , test2.rtf , test3.html and test4.msg as 001.hst , 002.hst , 003.hst and 004.hst.

    On each I have a custom property called filecode.

    I should then theoretically be able to search using MSIDXS for all documents with this property.

    I.e (excuse the code sample it is Progress OpenEdge 4gl but you'll get the gist)

    Def var ObjRecordset     as com-handle no-undo.

     Def var ObjConnection    as com-handle no-undo.

     Def var L-OBJCONNECTION  as Character  no-undo.

     

     Create "ADODB.Connection" OBJCONNECTION No-error.

     

     OBJCONNECTION:CursorLocation = 3.

     OBJCONNECTION:CommandTimeout = 5.

     OBJCONNECTION:open ("provider=MSIDXS","","",0).

     

     

     L-OBJCONNECTION = "SET PROPERTYNAME 'd5cdd505-2e9c-101b-9397-08002b2cf9ae' PROPID 'FILECODE' AS FILECODE".  

     OBJCONNECTION:Execute(L-OBJCONNECTION,output L-STATUS,0) No-error.

     

      L-FINAL-QUERY = "SELECT filename , PATH , DOCAUTHOR , FILECODE , FILEHOLDER  from Visualfiles..scope ('" + '"' +

      "C:\Vfile\visualfiles\visdocs\history" + '"' + "')  WHERE  MATCHES(Filecode,'1490')".

     

      Create "ADODB.RecordSet" OBJRECORDSET .

     

      OBJRECORDSET:maxrecords = Int("50") .

     

      OBJRECORDSET:open (L-FINAL-QUERY , OBJCONNECTION,2,3,0) .

      L-COUNT          = ObjRecordSet:RecordCount .

      MESSAGE L-COUNT VIEW-AS ALERT-BOX INFO BUTTONS OK.

     

    So the search returns only one HIT.  The HST file which was originally a .DOC.

    If I initiate a RESCAN of the directory from the indexing service console in Computer Management and then re-run this bit of code it returns 4 HITS.  Then after a few minutes goes back to returning 1 HIT.

    Also I search on document content rather than a property. I always get 4 HITS and if I query each record returned in the dataset each one has a property called FILECODE as expected.

    Can anyone think why a RESCAN would allow the documents to be found via the custom property but then after the scan is complete it goes back to only giving me 1 HIT.

    Help would be much appreciated.

     

     

     

     

     

All Replies

  • Thursday, February 03, 2011 10:51 AM
     
     

    I have a little more info on this

     

    I have found that if I do a search for FILECODE using LIKE  it works and returns all 4 results. If I search using MATCHES it returns 1.  

     

    I wondered if this was because I had hidden characters on the property or spaces or something.

     

    BUT 

     

    If I start a rescan and run the Matches it returns 4 results and then after a while goes back to returning 1

  • Friday, February 04, 2011 5:08 PM
     
     

    I've revisted this again and have some more consise info,

     

    I have 3 types of document   RTF , HTML , DOC

    Each has a custom property called filecode.  added through DSOFILE.dll

     

    If I search using MSIDXS for  MATCHES(filecode,'1490')  I get 1 Hit.

    If I do  LIKE then I get 3 hits.

    If I do MATCHES(filecode,'*1490') I get 3 hits

    if I rescan I get 3 hits then 1 hit once the scan has finished.

    You might think that it means I have an odd character on the front of the property i.e.  X1490   which is why a wildcard search finds it. But I have messaged out the properties values and the length of the value and it is always 1490  which is correct.

    What can index server be doing? Is it adding some character to the index in front of the value that means when I do a search RTF and HTML documents are not found?

    I'm baffled and deperately want some advice