Search
Contenu
[
Cacher
]
Search(string)
Recherche dans tous les index du référentiel.
public SearchResult Search(string query)
Paramètre | Taper | La description |
---|---|---|
query | String | La requête de recherche. |
Return_Value
Le résultat de la recherche.
Exemples
L’exemple montre comment effectuer une recherche dans le référentiel d’index.
string indexFolder = @"c:\MyIndex\";
string documentsFolder = @"c:\MyDocuments\";
string query = "Einstein";
IndexRepository repository = new IndexRepository();
Index index = repository.Create(indexFolder); // Création de l'index
index.Add(documentsFolder); // Indexation des documents
SearchResult result = repository.Search(query); // Recherche
Voir également
- class SearchResult
- class IndexRepository
- espace de noms GroupDocs.Search
- Assemblée GroupDocs.Search
Search(string, SearchOptions)
Recherche dans tous les index du référentiel.
public SearchResult Search(string query, SearchOptions options)
Paramètre | Taper | La description |
---|---|---|
query | String | La requête de recherche. |
options | SearchOptions | Les possibilités de recherche. |
Return_Value
Le résultat de la recherche.
Exemples
L’exemple montre comment effectuer une recherche dans le référentiel d’index.
string indexFolder = @"c:\MyIndex\";
string documentsFolder = @"c:\MyDocuments\";
string query = "Einstein";
IndexRepository repository = new IndexRepository();
Index index = repository.Create(indexFolder); // Création de l'index
index.Add(documentsFolder); // Indexation des documents
SearchOptions options = new SearchOptions();
options.UseCaseSensitiveSearch = true; // Définition du drapeau de recherche sensible à la casse
SearchResult result = repository.Search(query, options); // Recherche
Voir également
- class SearchResult
- class SearchOptions
- class IndexRepository
- espace de noms GroupDocs.Search
- Assemblée GroupDocs.Search
Search(SearchQuery)
Recherche dans tous les index du référentiel.
public SearchResult Search(SearchQuery query)
Paramètre | Taper | La description |
---|---|---|
query | SearchQuery | La requête de recherche. |
Return_Value
Le résultat de la recherche.
Exemples
L’exemple montre comment effectuer une recherche dans le référentiel d’index.
string indexFolder = @"c:\MyIndex\";
string documentsFolder = @"c:\MyDocuments\";
IndexRepository repository = new IndexRepository();
Index index = repository.Create(indexFolder); // Création de l'index
index.Add(documentsFolder); // Indexation des documents
SearchQuery query = SearchQuery.CreateWordQuery("Einstein"); // Création d'une requête de recherche sous forme d'objet
SearchResult result = repository.Search(query); // Recherche
Voir également
- class SearchResult
- class SearchQuery
- class IndexRepository
- espace de noms GroupDocs.Search
- Assemblée GroupDocs.Search
Search(SearchQuery, SearchOptions)
Recherche dans tous les index du référentiel.
public SearchResult Search(SearchQuery query, SearchOptions options)
Paramètre | Taper | La description |
---|---|---|
query | SearchQuery | La requête de recherche. |
options | SearchOptions | Les possibilités de recherche. |
Return_Value
Le résultat de la recherche.
Exemples
L’exemple montre comment effectuer une recherche dans le référentiel d’index.
string indexFolder = @"c:\MyIndex\";
string documentsFolder = @"c:\MyDocuments\";
IndexRepository repository = new IndexRepository();
Index index = repository.Create(indexFolder); // Création de l'index
index.Add(documentsFolder); // Indexation des documents
SearchOptions options = new SearchOptions();
options.UseCaseSensitiveSearch = true; // Définition du drapeau de recherche sensible à la casse
SearchQuery query = SearchQuery.CreateWordQuery("Einstein"); // Création d'une requête de recherche sous forme d'objet
SearchResult result = repository.Search(query, options); // Recherche
Voir également
- class SearchResult
- class SearchQuery
- class SearchOptions
- class IndexRepository
- espace de noms GroupDocs.Search
- Assemblée GroupDocs.Search