On 4/1/2017 8:51 AM, John Blythe wrote: > Hi Rick. I should explain further. I'm not looking to have the input stored > but rather the final product, specifically the synonym that an input may be > mapped to. > > If I have McDonald, McD's, and Mac Donald all mapped to "McDonald's" I'd > like to be able to not only access which one was sent to solr for search > (e.g. "McD's") but _also_ the synonym it mapped to: "McDonald's" > > Does this make more sense? > > Thanks for any continued discussion
Generally speaking, search results contain EXACTLY the information that was submitted for indexing, assuming that the value was stored. In newer versions, docValues can be used instead of stored in order to have the field appear in results. Index analysis only affects the search index, what happens there will never show up in search results. This is a fundamental aspect of Solr's operation. You *can* use a custom UpdateRequestProcessor. For what you're talking about, that would probably be a custom processor that you write yourself and inject into Solr as a plugin. Update processors are executed on the indexed data, *before* it reaches the actual indexing part of Solr ... so stored/docValues data is also affected. https://cwiki.apache.org/confluence/display/solr/Update+Request+Processors Thanks, Shawn