Indexing
Indexing is the organization or use of positions, keys, or lookup structures to identify and retrieve selected data or elements.
Get Programming: Learn to code with Python
- How it is used
- Selects characters and list items by position, then supplies boundaries for splitting full names.
- How deep it goes
- Works through zero-based and negative character positions plus out-of-range list errors, without exploring implementation internals.
- Examples
- Uses a grocery list and a full-name splitting program to show element access and slice boundaries.
- What you can do after
- Apply it via Python square brackets to read elements, extract name substrings, and update mutable list items.
Read how Get Programming: Learn to code with Python explains indexing →
Grokking Data Structures
An array index is the position used to identify an element within an array.
- How it is used
- Locates array elements for access, insertion, counting, traversal, and array-backed heap relationships.
- How deep it goes
- Defines positions, explains zero-based bounds and memory-location calculation, and works through insertion and counting; defers fuller heap operations.
- Examples
- Uses numbered drawers, die-roll counters, a capacity-checked Python insertion method, and parent–child positions in a heap.
- What you can do after
- Apply it via Python arrays to translate positions into valid indexes, update counters, and avoid inserting beyond capacity.
Modern C, Third Edition
Array indexing is the C operation of selecting an array element with an index expression, such as A[i].
- How it is used
- Selects array and pointer elements in initialization examples, array-processing functions, and matrix multiplication.
- How deep it goes
- Defines zero-based positions, derives indexing from pointer addition and dereferencing, then addresses parameter rewriting and bounds constraints.
- Examples
- Uses a five-element designated initializer, pointer-based summation, and indexed matrix multiplication.
- What you can do after
- Evaluate/understand it by translating `A[i]` to `*(A+i)` and checking that accesses respect array bounds.
Learn Rust in a Month of Lunches
Indexing selects elements in an ordered collection by their numeric positions.
- How it is used
- Selects an array entry by position or identifies positions for an array slice.
- How deep it goes
- Works through square-bracket indexing and slice ranges, but does not develop array operations beyond getting entries and slices.
- Examples
- Uses a three-number array to get its second item and a ten-number array to compare slice ranges.
- What you can do after
- Practice/perform array entry selection and create slices with exclusive or inclusive range endpoints.
Read how Learn Rust in a Month of Lunches explains indexing →
Pro Angular 16
An array index is a numeric position used to access an element in an array.
- How it is used
- Uses positions to read or change array elements and to identify rows generated by Angular `*ngFor`.
- How deep it goes
- Shows bracket reads and assignments, then works through zero-based `ngFor` indices, counters, and position-dependent row styling.
- Examples
- Demonstrates replacing an array’s first value and numbering product-table rows as a position out of a total.
- What you can do after
- Apply it via TypeScript brackets and Angular `*ngFor` to update array values and display row positions.
Generative AI in Action
Data indexing is the organization of stored data into searchable structures that support efficient information retrieval.
- How it is used
- Supports RAG by organizing source data for retrieval, including enterprise information unavailable in an LLM’s training data.
- How deep it goes
- Defines Redis index fields and vector settings, while also addressing data selection and source-system constraints.
- Examples
- Uses blog posts read through RSS and a Redis `posts` index with metadata and an HNSW vector field.
- What you can do after
- Configure a Redis index schema for blog content, metadata, and vector search.
Modern C
An index is an integer position used to identify an item in an array.
- How it is used
- Uses integer positions to initialize, read, and traverse array elements in C.
- How deep it goes
- Defines zero-based positions, then explains pointer arithmetic and array-parameter rewriting without reconstructing lengths.
- Examples
- Uses designated initializers, pointer-based summation, array slices, and matrix multiplication to demonstrate indexed access.
- What you can do after
- Apply it via C array notation, designated initializers, pointer arithmetic, and multidimensional function parameters.
Build AI-Enhanced Web Apps
Document indexing is the organization of document content into searchable structures for efficient information retrieval.
- How it is used
- Prepares document content for semantic retrieval in a RAG workflow.
- How deep it goes
- Details collection, chunking, embeddings, metadata, and vector storage, with code focused on directory ingestion and index creation.
- Examples
- Uses a directory of PDF files, processed into chunks and indexed with HNSWLib.
- What you can do after
- Build a semantically searchable document index using embeddings and a vector store.
Deep Learning with R, Third Edition
Indexing is the mapping of text tokens to integer positions in a vocabulary.
- How it is used
- Converts split text tokens into integer IDs as the final stage of tokenization.
- How deep it goes
- Defines indexing and demonstrates vocabulary matching, without detailing model internals.
- Examples
- Uses a sentence, a word vocabulary, and R matching to show tokens mapped to integer positions.
- What you can do after
- Apply R's match() to map split tokens to vocabulary indices, with unmatched tokens returning 0 in the example.
Read how Deep Learning with R, Third Edition explains indexing →
Deep Learning with PyTorch, Second Edition
Selecting tensor elements or slices by using tensor values as indices or masks.
- How it is used
- Supports expressive tensor manipulation and data filtering while preparing inputs for neural-network work.
- How deep it goes
- Explains list-like ranges, multidimensional slices, Boolean filtering, and storage-level indexing, but defers broader tensor operations.
- Examples
- Uses Python lists, two-dimensional points, wine-quality masks, threshold predictions, and image, text, and source-code exercises.
- What you can do after
- Apply indexing in PyTorch to slice dimensions, filter rows with Boolean masks, and compare selected data categories.
Read how Deep Learning with PyTorch, Second Edition explains indexing →
Natural Language Processing in Action, Second Edition
Indexing is the construction of auxiliary structures that organize document content for efficient retrieval.
- How it is used
- Uses inverted indexing to speed full-text keyword search and retrieve human-authored sources for LLM grounding.
- How deep it goes
- Defines forward and inverted indexes, contrasts O(1) lookup with O(n) scanning, and notes trigram handling of word variants.
- Examples
- Uses a textbook index analogy and searches for “cat” and “cats” to illustrate retrieval and exact-match limits.
- What you can do after
- Apply indexing to retrieve documents matching search terms efficiently, including variants such as “cat” and “cats.”
Read how Natural Language Processing in Action, Second Edition explains indexing →
Deep Learning with Python, Third Edition
The stage of text preprocessing that maps tokens to integer indices for numeric model input.
- How it is used
- Converts tokenized text into integer IDs for numeric model input.
- How deep it goes
- Demonstrates vocabulary lookup and unknown-token handling, then defers mapping IDs into a model's latent space.
- Examples
- Uses a word-level vocabulary to index a sentence containing an out-of-vocabulary word.
- What you can do after
- Build it from scratch by mapping vocabulary tokens to IDs and assigning a fallback ID to unknown tokens.
Read how Deep Learning with Python, Third Edition explains indexing →
Grokking Simplicity
A numeric position identifying an element within an indexed array.
- How it is used
- Uses array positions to connect searches with cart updates, removals, and reusable lower-level functions.
- How deep it goes
- Traces indexing through for loops, comparisons, null results, and arrayGet/arraySet abstractions.
- Examples
- Uses cart searches, item removal, membership checks, and price updates as concrete indexed-array examples.
- What you can do after
- Diagnose/debug with it by tracing how array positions flow from searches into updates and removals.
Python Workout, Second Edition
An index is a numeric position identifying an element within an ordered sequence.
- How it is used
- Retrieves sequence elements, extracts ranges, and pairs iteration values with numeric positions.
- How deep it goes
- Explains element access, negative positions, slice boundaries, result types, bounds, and enumerate, without descending into implementation internals.
- Examples
- Demonstrates enumerate over a string, first-and-last retrieval, list and tuple slices, and out-of-range endpoints.
- What you can do after
- Apply it via Python brackets, slices, negative positions, and enumerate to retrieve or label sequence data.
The Well-Grounded Rubyist, Fourth Edition
An index is a numeric or key-based identifier for an element in a collection, including an ordinal position in an ordered collection.
- How it is used
- Retrieves collection elements by position or key, locates substrings, and labels items with iteration counters.
- How deep it goes
- Distinguishes string search positions, array indexes, hash keys, and iteration counters, including the absence of Hash#each_index.
- Examples
- Uses substring searches, numbered president lists, and hash iteration counters to illustrate indexing.
- What you can do after
- Apply indexing to locate substrings, retrieve collection entries, and label iterated items with their ordinal positions.
Read how The Well-Grounded Rubyist, Fourth Edition explains indexing →
Related concepts
- arrayused by · An array is an indexed, ordered collection of elements arranged in one or more dimensions, with elements accessed by position.
- partial indexincludes · A partial index is a database index containing entries only for records that satisfy a specified predicate.
- covering indexincludes · A covering index is an index containing all columns needed to evaluate and return a query, avoiding access to the base table.
- tuplepart of · A tuple is a finite, ordered collection of elements treated as a single composite value or record.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.














