: (e.g. defType=fooSpanQuery), along with token positions. I have this working : in straight lucene, so my challenge is to implement it half-intelligently in : solr. At the moment, I can't figure out where and how to customize the : 'inner' search process.
the first step is to really make sense of how you do this with lucene-java, so we can find the best corrisponding points in Solr. I suspect you are using a custom (Hit)Collector, which is an area in Solr that isn't easily customizable. Some other issues have brought up the need to allow custom code to provide a Collector that Solr would use in addition to it's own Collectors (for building up DocList and DocSet structiures) but no clear picture has surfaced as to what that API should really like like to be useful to plugin writers, and still be performant in the common case. The most straight forward way to add custom logic like this would be to use SolrIndexSearcher just like a regular IndexSearcher, passing your Collector to the same old methods you would outside of Solr -- this bypasses Solr's internal DocList & DocSet caching, but in many cases this may be exactly what you want -- it's the main problem that makes a generalized pluggable Collector implementation hard to implement: if the Collector has side effects, it's not clear that cached results are useful unless they can reproduce the same side effects on cache read. For response purposes (if you care) you can always then take the results of your own data structure, and use it to generate a DocLIst or a DocSet. -Hoss