Using DSE Search with the DataStax drivers
You can use DataStax drivers to perform DSE Search queries.
With DSE Search, your applications can query data using features such as the following:
-
general
-
indexing
-
full-text
-
faceted (categorization)
-
hit prioritization
-
spatial and temporal filtering
-
social media matchups
With DataStax drivers, your applications can access these features using solr_query search index syntax in the WHERE
clause or normal CQL semantics.
Prerequisites
Before using DSE Search capabilities in an application, you must do the following:
-
Enable the target DSE nodes for DSE Search.
-
Create search indexes for the columns that will be accessed by the queries.
It is a best practice to plan ahead for columns and types that are indexed because adding search indexes has a resource and performance cost. |
Configuration
Use dse.yaml
to configure DSE Search settings.
The location of the dse.yaml
file depends on the type of installation:
-
Package installations:
/etc/dse/dse.yaml
-
Tarball installations:
installation_location/resources/dse/conf/dse.yaml
For more information, see dse.yaml configuration file.
Load balancing
DSE Search queries must be directed to a datacenter with DSE Search enabled by using the load balancing policy in the driver. Use a datacenter-aware load balancing policy with the DSE Search local datacenter. For more, see Working with multi-workload clusters.
Paging
DSE Search paging is integrated in the DataStax driver execution implementation.
The drivers use cursors for deep pagination.
Enable paging through the cql_solr_query_paging
option in dse.yaml on the server, or dynamically in the application in the solr_query
parameters.
Geospatial data types
Location-based search is a key feature for a personalized user experience. DataStax Enterprise (DSE) enables this through special geospatial data types:
-
Point
-
LineString
-
Polygon
Date ranges
Filtering by date and time is a common use case in search queries. DSE Search delivers powerful filtering on single point-in-time or open bound date ranges through the CQL DateRangeType.