To index data with Sphinx, you need to define a data source in the configuration file and then run the indexer command to index the data. You can find more details in the Sphinx documentation.