Find data with lexicographical matching

Hybrid search, lexical search, and reranking are currently in public preview. Development is ongoing, and the features and functionality are subject to change. Astra DB Serverless, and the use of such, is subject to the DataStax Preview Terms.

You can use lexicographical matching to find a document.

Use lexicographical matching with the Data API

There are two ways to use lexicographical matching to find documents with the Data API:

You can use these strategies together or separately.

You can only use lexicographical matching on collections that have lexical enabled. For more information, see Create a collection that supports lexicographical matching.

Documents must have the $lexical field populated to be included in lexicographical matching. For examples, see Insert a document for retrieval with lexicographical matching and Insert documents for retrieval with lexicographical matching.

Was this helpful?

Give Feedback

How can we improve the documentation?

© 2025 DataStax, an IBM Company | Privacy policy | Terms of use | Manage Privacy Choices

Apache, Apache Cassandra, Cassandra, Apache Tomcat, Tomcat, Apache Lucene, Apache Solr, Apache Hadoop, Hadoop, Apache Pulsar, Pulsar, Apache Spark, Spark, Apache TinkerPop, TinkerPop, Apache Kafka and Kafka are either registered trademarks or trademarks of the Apache Software Foundation or its subsidiaries in Canada, the United States and/or other countries. Kubernetes is the registered trademark of the Linux Foundation.

General Inquiries: +1 (650) 389-6000, info@datastax.com