Created
July 1, 2019 08:43
-
-
Save init90/10728f89e70c11b585055872af80fcc8 to your computer and use it in GitHub Desktop.
Drupal 7, create Search API query programatically.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
$index = search_api_index_load('index_name'); | |
$query = new SearchApiQuery($index); | |
$query->condition('type', 'blog', '='); | |
$results = $query->execute(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment