GroupDocs.Search for Node.js via Java

Find phrases in documents

Quickly locate specific phrases with GroupDocs.Search for Node.js via Java. Integrate fast and accurate search capabilities into your Node.js applications.

How to find phrases in PDF documents

GroupDocs.Search makes phrase searching in PDF documents easy. Apply different search options to refine results in Node.js via Java applications.

  1. Set up a search index folder.
  2. Define the folder containing PDF files.
  3. Configure search parameters.
  4. Retrieve and process search results.
const searchLib = require('@groupdocs/groupdocs.search')

// Specify the path for storing the search index
const index = new searchLib.Index("c:/MyIndex");

// Set the folder containing documents
index.add("c:/MyDocuments");

// Configure search settings
const word1 = searchLib.SearchQuery.createWordQuery("lorem");
const word2 = searchLib.SearchQuery.createWordQuery("ipsum");
const word3 = searchLib.SearchQuery.createWordQuery("dolor");

const query = searchLib.SearchQuery.createPhraseSearchQuery(word1, word2, word3);

// Run the search query
const result = index.search(query);
npm i @groupdocs/groupdocs.search
click to copy
copied
More examples Documentation

Discover Node.js document search engine

GroupDocs.Search for Node.js via Java enables phrase searches across 70+ file formats, making it easy to find and organize data with advanced search features.

Key capabilities of GroupDocs.Search

Phrase search

Find exact phrases in business documents like PDFs, Word files, presentations, and spreadsheets. Use wildcards and flexible search options when the full phrase is unknown.

Optimized data indexing

Boost search performance by creating reusable indexes. Structured indexing speeds up document searches and improves accuracy.

Multi-language compatibility

Search documents in over 80 languages with support for different keyboard layouts and morphological word variations, ensuring precise results.

Advanced search options

Customize searches with case sensitivity, fuzzy matching, homophone detection, document filtering, and other powerful features.

Using advanced search techniques

Learn how to construct queries for searching in PDF.

JavaScript

const searchLib = require('@groupdocs/groupdocs.search')

// Define the search index directory
const index = new searchLib.Index("c:/MyIndex");
    
// Set the path to the target documents
index.add("c:/MyDocuments");

// Create a query for the desired phrase
const word1 = searchLib.SearchQuery.createWordQuery("Lorem");
const wildcard = searchLib.SearchQuery.createWildcardQuery(1, 7);
const word2 = searchLib.SearchQuery.createWordQuery("dolor");

const query = searchLib.SearchQuery.createPhraseSearchQuery(word1, wildcard, word2);

// Retrieve the search results
const result = index.search(query);

// Process and use the results
console.log('Documents: ' + result.getDocumentCount());
console.log('Occurrences: ' + result.getOccurrenceCount());
npm i @groupdocs/groupdocs.search
click to copy
copied
More examples Documentation

GroupDocs.Search features

GroupDocs.Search for Node.js via Java is a high-performance library for indexing and searching text in documents. It supports over 70 file formats, including PDFs, Word documents, Excel spreadsheets, images, and ZIP archives, ensuring accurate and fast search results.
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.

Advanced search capabilities

Leverage powerful search features for faster and more accurate results.

Search phrases in business documents

GroupDocs.Search supports phrase searches in 70+ document formats. Use advanced options and indexing to streamline the search process.

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