Add documents to SearchResults.
public AddDocs(ref String indexPath, ref array<long> docIds);
Public Sub AddDocs(ByRef indexPath As String, ByRef docIds As array<long>)
|
Parameters |
Description |
|
indexPath |
Path of the index that contains the documents. |
|
docIds |
Document ids of the documents to add. |
When adding more than one document to SearchResults, AddDocs is faster than AddDoc because the index is only opened once.
SearchResults.AddDocs can be used to convert a SearchFilter to a SearchResults object containing the same documents. First call SearchFilter.GetItems() to get an array the of document ids in the SearchFilter, and then call SearchResults.AddDocs() to add the document ids to a SearchResults object. Example:
private SearchResults ConvertFilterToResults(SearchFilter filter, int iIndex) { int[] docIds = filter.GetItems(iIndex); SearchResults results = new SearchResults(); results.AddDocs(filter.getIndexPath(iIndex), docIds); return results; }
|
Copyright (c) 1998-2012 dtSearch Corp. All rights reserved.
|