Instead of Sending whole Folder path,i need to specify some files,that should be indexed and search should happen
string documentsFolder = Utils.DocumentsPath; // Specify the path to a folder containing documents to search
Index index = new Index(indexFolder);
index.Events.ErrorOccurred += (sender, args) =>
{
Console.WriteLine(args.Message);
};
index.Add(documentsFolder);
I gone through the filter,but my requirement is,
For Example,i stored all files in one folder(common for storing all files),from that ,i used to share files to others,if user or DataRoom has access to that particular file means,i need to search that particular file only
i have an another doubt in indexing.
For Example- initially i have 5 files inside the storage folder.When i do searching,it will create an index for those 5 files.After that i’m adding another file into that storage folder,so in this case how index will update?..it will update or create as a new index?
If you have let’s say 50 files in a folder and you search for a file “ABC.docx” and it is available in the storage. API will surely return it. Have a look at this article and you can see what could be done using search results.
You can update existing index. Calling the Update method starts re-indexing of changed, new and deleted documents. Please go through this update index article to learn more.
Please note that the updating process when calling the update method is performed only for those documents that have been changed (the update date of the document is changed). The rest of the indexed documents will not be updated.