This feature is powering tag autocomplete and username autocomplete which supports partial matches, and non-prefix lookups on SpaceBattles.
- Require XenForo 2.2+, removes xf2.0/xf2.1 support
- Add "Specialized index" support
- Specialized search index allows generating single-purpose elastic search indexes while re-using as much XF search infrastructure as possible.
- Elasticsearch index is more akin to an SQL table than an entire database, so for very specific tasks a single purpose search index works better.
- A separate index also allows changing indexing properties and re-indexing just that one index without impacting the main search index
- Implementation of a specialized index notes;
At the core, a XenForo search handler is used to drive the functionality.
- The search handler should implement the interface \SV\SearchImprovements\Search\Specialized\SpecializedData
- Use the types MetadataStructure::KEYWORD or MetadataStructure::STR fields in setupMetadataStructure.
These types will be rewritten to add .exact & [/icode].ngram[/icode] subfields. To skip this pass ['skip-rewrite' => true] to the MetadataStructure::addField's 3rd argument.
- MetadataStructure::KEYWORD - shortish text which is semi-structured such as tags or usernames
- MetadataStructure::STR - Arbitrary text which uses phrases of text
- Register the search handler with the following content type fields
- specialized_search_handler_class
- entity
- This handler really shouldn't be registered with search_handler_class content type field.
- Add the behavior SV\SearchImprovements:SpecializedIndexable to the entity.
Example of the 'indexes page'