简体   繁体   中英

Solr suggester filter at build time

Is it possible to create a suggestion dictionary using a pre-filtered query ? In other word is it possible to create a suggestion dictionary based on a subset of an existing index instead of the whole index ?

This is a feature very similar to context filtering, but beforehand.

In my case, I'd like to create a suggestion dictionary using semi-public data only (not owned by a tenant) and language, from my main index.

no that is not possible right now. I see 3 possible ways to do what you want:

  1. you create a new collection from scratch, indexing from the original source only the subset you want in a field, and use that field as DocumentDictionaryFactory for the suggester
  2. again, create a new index, but index it off the existing collection, either using DIH and the SolrEntityProcessor or with with Streaming expressions
  3. you create your custom FilteredDocumentDictionaryFactory that does what you need and plug it in into Solr.

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM