Would it serve to return the tf or ttf? You'd have to tack on clauses like fl=*,ttf(name,drive) or fl=*.ttf(name,drive)
Which implies that you'd have to do some work on the query side to add the tf or ttf clauses. See: http://wiki.apache.org/solr/FunctionQuery#tf Best, Erick On Wed, Nov 27, 2013 at 9:32 AM, Jamie Johnson <jej2...@gmail.com> wrote: > I am interested in retrieving the tf for terms that matched the query, not > all terms in the document. Is this possible? Looking at the example when > I search for the word cable I get the response that is shown below, ideally > I'd like to see only the tf for the word cable. Is this possible or would > I need to write a custom query component to do this? > > <response> > > <lst name="responseHeader"> > > <int name="status">0</int> > > <int name="QTime">2</int> > > </lst> > > <result name="response" numFound="4" start="0"> > > <doc/> > > <doc> > > <str name="includes">32MB SD card, USB cable, AV cable, battery</str> > > </doc> > > <doc> > > <str name="includes">USB cable</str> > > </doc> > > <doc> > > <str name="includes">earbud headphones, USB cable</str> > > </doc> > > </result> > > <lst name="termVectors"> > > <str name="uniqueKeyFieldName">id</str> > > <lst name="IW-02"> > > <str name="uniqueKey">IW-02</str> > > </lst> > > <lst name="9885A004"> > > <str name="uniqueKey">9885A004</str> > > <lst name="includes"> > > <lst name="32mb"> > > <int name="tf">1</int> > > </lst> > > <lst name="av"> > > <int name="tf">1</int> > > </lst> > > <lst name="battery"> > > <int name="tf">1</int> > > </lst> > > <lst name="cable"> > > <int name="tf">2</int> > > </lst> > > <lst name="card"> > > <int name="tf">1</int> > > </lst> > > <lst name="sd"> > > <int name="tf">1</int> > > </lst> > > <lst name="usb"> > > <int name="tf">1</int> > > </lst> > > </lst> > > </lst> > > <lst name="3007WFP"> > > <str name="uniqueKey">3007WFP</str> > > <lst name="includes"> > > <lst name="cable"> > > <int name="tf">1</int> > > </lst> > > <lst name="usb"> > > <int name="tf">1</int> > > </lst> > > </lst> > > </lst> > > <lst name="MA147LL/A"> > > <str name="uniqueKey">MA147LL/A</str> > > <lst name="includes"> > > <lst name="cable"> > > <int name="tf">1</int> > > </lst> > > <lst name="earbud"> > > <int name="tf">1</int> > > </lst> > > <lst name="headphones"> > > <int name="tf">1</int> > > </lst> > > <lst name="usb"> > > <int name="tf">1</int> > > </lst> > > </lst> > > </lst> > > </lst> > > </response> >