Summary:
Ref T10205. Ref T10246. This is general modernization, but also supports fixing the interface datasource in T10205.
  - Update Query.
  - Update SearchEngine.
  - Use an ngrams index for searching names efficiently.
Test Plan:
  - Ran migrations.
  - Searched Almanac devices by name.
  - Created a new device, searched for it by name.
{F1121303}
Reviewers: chad
Reviewed By: chad
Maniphest Tasks: T10205, T10246
Differential Revision: https://secure.phabricator.com/D15319
		
	
		
			
				
	
	
		
			12 lines
		
	
	
		
			216 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
			
		
		
	
	
			12 lines
		
	
	
		
			216 B
		
	
	
	
		
			PHP
		
	
	
	
	
	
<?php
 | 
						|
 | 
						|
$table = new AlmanacDevice();
 | 
						|
 | 
						|
foreach (new LiskMigrationIterator($table) as $device) {
 | 
						|
  PhabricatorSearchWorker::queueDocumentForIndexing(
 | 
						|
    $device->getPHID(),
 | 
						|
    array(
 | 
						|
      'force' => true,
 | 
						|
    ));
 | 
						|
}
 |