GroupDocs.Search for Java

Boolean text search

Use GroupDocs.Search for Java to create advanced boolean (AND, OR, NOT) search queries in your Java projects with ease.

How to perform boolean searches in XLSX documents

GroupDocs.Search enables easy text searches within XLSX documents. With support for boolean conditions, you can enhance search accuracy in Java applications.

  1. Specify the folder to store the search index.
  2. Select the folder containing XLSX documents.
  3. Execute the search query and retrieve results.
  4. Process the obtained results.
// Set the path for the index folder
Index index = new Index("c:/MyIndex");

// Provide the folder path containing documents for the search
index.add("c:/MyDocuments");

// Run a search with a complex query
SearchResult result = index.search("lorem AND impsum");
Maven XML
click to copy
copied
More examples Documentation

Powerful tools for document search and indexing

GroupDocs.Search for Java simplifies text searches and data indexing for over 70 formats. Its advanced tools let you find and manage content effortlessly.

Key features of GroupDocs.Search

Comprehensive text search

Search across multiple formats like PDFs, Word documents, presentations, spreadsheets, and more. Use options such as exact matching, fuzzy search, and wildcard queries to refine results.

Efficient data indexing

Build and maintain indexes for faster document searches. This feature organizes data efficiently, making it easy to handle large document collections.

Multi-language support

Search in documents written in over 80 languages. Enhance accuracy by leveraging morphological word forms and different keyboard layouts.

Flexible search customization

Adjust search settings with features like case sensitivity, date range filters, and exclusions to refine your results.

Using complex boolean search queries

This example demonstrates how to perform Boolean searches in XLSX files.

Java

// Set the folder for the search index
Index index = new Index("c:/MyIndex");
    
// Provide the path to the documents to search
index.add("c:/MyDocuments");

// Construct the query using Boolean logic
SearchQuery wordQuery1 = SearchQuery.createWordQuery("Lorem");
SearchQuery wordQuery2 = SearchQuery.createWordQuery("ipsum");
SearchQuery booleanQuery = SearchQuery.createAndQuery(wordQuery1, wordQuery2);

// Retrieve the search results
SearchResult result = index.search(booleanQuery);

// Process the retrieved results
System.out.println("Documents: " + result.getDocumentCount());
System.out.println("Occurrences: " + result.getDocumentCount());
Maven XML
click to copy
copied
More examples Documentation

About GroupDocs.Search

GroupDocs.Search for Java is a versatile library designed for text search and data indexing in documents. It supports over 70 file types, including PDF, Word, Excel, PowerPoint images, and ZIP archives, enabling efficient searches through large data collections.
Learn more
About illustration

Ready to get started?

Download GroupDocs.Search for free or get a trial license for full access!

Useful resources

Explore documentation, code samples, and community support to enhance your experience.

Key features at a glance

Unlock powerful and efficient search capabilities

Search popular document formats

GroupDocs.Search supports over 70 file formats, enabling you to customize search rules and use indexing to optimize performance.

Temporary license tips

1
Sign up with your work email.
Free mail services are not allowed.
2
Use Get a temporary license button on the second step.
 English