GroupDocs.Search for Python via .NET Overview
Leave feedback
On this page
What is GroupDocs.Search?
GroupDocs.Search for Python via .NET is a native Python library for full-text search across documents of more than 80 formats. It extracts the text and metadata of PDF, Word, Excel, PowerPoint, OpenDocument, email, eBook, archive and image files into an index on your own disk, so that a search over thousands of documents takes moments. It runs entirely on-premise, requires no Microsoft Office installation, and ships as a pre-built wheel for Windows, Linux, and macOS.
Typical uses include:
Search inside an application - let users find documents by their content, with queries that tolerate typos and know synonyms.
Retrieval for AI pipelines - find the documents and the passages an LLM needs, locally; see AI agents and LLM integration.
E-discovery and compliance - find every document that mentions a name or a contract number, or that matches a pattern such as a date or an account number.
Archive and knowledge-base search - index mail archives, ZIP files and the text of scans, and keep the index current as files are added, changed and deleted.
Image search - find the documents that contain a given picture with reverse image search.
Key Capabilities
Capability
Description
Indexing
Create an index in a folder or in memory, add files, folders and streams, and update it with only the documents that changed.
A search network of shards that shares indexing and search across nodes.
On-premise
No cloud calls, no Microsoft Office install, no network traffic.
Quick Example
Index a folder of documents in different formats and search it with just a few lines of code:
importosfromgroupdocs.searchimportIndexdefquick_example():# Create an index in the "index" folder, or open the one already therewithIndex("./index")asindex:# Index every supported document in the "documents" folderindex.add("./documents")# Search the index and list the documents foundresult=index.search("relativity")print("Documents found:",result.document_count)# Most relevant first: the result lists the documents in the order they were indexedfordocumentinsorted(result,key=lambdafound:found.relevance,reverse=True):print(os.path.basename(document.document_info.file_path),"-",document.occurrence_count,"occurrences")if__name__=="__main__":quick_example()
importosfromgroupdocs.searchimportIndexfromgroupdocs.search.optionsimportSearchOptionsdefsearch_with_options():withIndex("./index")asindex:index.add("./documents")# Fuzzy search also finds words that differ from the query by a few charactersoptions=SearchOptions()options.fuzzy_search.enabled=Trueresult=index.search("Einstien",options)print("Documents found:",result.document_count)fordocumentinsorted(result,key=lambdafound:found.relevance,reverse=True):print(os.path.basename(document.document_info.file_path),"-",document.occurrence_count,"occurrences")if__name__=="__main__":search_with_options()