Title Back Colour Keyoti Title Line Title Curve
Blue Box Top

add documents to the index incrementally. - SearchUnit - Forum

Welcome Guest Search | Active Topics | Log In | Register

Options
prashant
#1 Posted : Wednesday, February 4, 2015 10:28:52 AM
Rank: Member

Groups: Registered

Joined: 2/3/2015
Posts: 12
Hello,

when i try to add an uploaded document for indexing,it gives an error as

1. cannot convert from 'Aspose.Words.Document' to 'Keyoti.SearchEngine.Documents.Document'.

2. cannot convert from 'Keyoti.SearchEngine.Configuration' to 'Aspose.Words.LoadOptions'.

3.'Keyoti.SearchEngine.Index.DocumentIndex.AddDocument(Keyoti.SearchEngine.Documents.Document)' has some invalid arguments.

I had written following code to add the uploaded document to index increamentally.

Configuration configuration = new Configuration();
configuration.IndexDirectory = indexDirPath;
DocumentIndex documentIndex = new DocumentIndex(configuration);

try{
string strUrl = HttpContext.Current.Request.Url.AbsoluteUri.ToLower().Replace("workflow/uploadhandler.ashx", "Uploads/") + DIR + "/Contract Documents";

documentIndex.AddDocument(new Document("http://localhost/CM/Uploads/CM/Contract%20Documents/PDF/04Feb15-01.pdf", configuration));
}
finally
{
documentIndex.Close();
}
Jim
#2 Posted : Wednesday, February 4, 2015 2:36:55 PM
Rank: Advanced Member

Groups: Administrators, Registered

Joined: 8/13/2004
Posts: 2,667
Location: Canada
You just need to be more specific about which class 'Document' is in "new Document".

So change to

documentIndex.AddDocument(new Keyoti.SearchEngine.Documents.Document("http://localhost/CM/Uploads/CM/Contract%20Documents/PDF/04Feb15-01.pdf", configuration));
}

Jim

-your feedback is helpful to other users, thank you!

-your feedback is helpful to other users, thank you!


prashant
#3 Posted : Thursday, February 5, 2015 2:13:24 AM
Rank: Member

Groups: Registered

Joined: 2/3/2015
Posts: 12
thanks! it Woks fine.
Forum Jump  
You cannot post new topics in this forum.
You cannot reply to topics in this forum.
You cannot delete your posts in this forum.
You cannot edit your posts in this forum.
You cannot create polls in this forum.
You cannot vote in polls in this forum.




About | Contact | Site Map | Privacy Policy

Copyright © 2002- Keyoti Inc.