lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Walter Underwood <>
Subject Re: Return docs with only the matched fields for a query
Date Tue, 12 Jul 2016 14:48:51 GMT
I’m not sure you need a custom component. Try using the standard highlighter. Configure hl.simple.pre
and to be empty strings. Configure it to return one maximum length snippet.
That should return the entire matching fields, though I haven’t tested it.

Walter Underwood  (my blog)

> On Jul 12, 2016, at 1:24 AM, Prasanna Josium <> wrote:
> Hi all,
> My  requirement is in line with
> I'm working on a project that has very low network bandwidth for the clients.
> I'm using Solr 4.10 
> The problem: 
> I have ~ 1M documents with multiple fields(~50),  many of them are indexed, stored and
some of them are multivalued.
> Queries are searched across all these fields and often, only a few of the fields have
matching terms in them.  
> When I search for a term="Hobbit", I want to return documents only with the matching
fields where "Hobbit" is found. 
> All other un matched fields in the result doc shall be dropped from the result set.
> Naïve solution:
> The obvious solution I could think of was to implement a custom search component based
on the "Highlighter" component to filter out unwanted fields.
> But I'm not sure of the performance penalty for large number of fields  or many multi
valued fields / document.
> Question:
> Is there a better way to solve this problem? Apparently I'm not the first person facing
such an issue.
> Thanks
> Cheers
> Prasanna 

  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message