Issue with highlight and facetPivot

32 views
Skip to first unread message

David T.

unread,
Oct 24, 2016, 6:23:04 AM10/24/16
to SolrNet
Hi everyone,

This is the code i wrote :

var facetPivotQuery = new SolrFacetPivotQuery
{
    Fields = new[] { "field1,field2" },
    MinCount = 1,
               
};
           
var facetParams = new FacetParameters()
{
    Queries = new[] { facetPivotQuery },
    Limit = 15,
    MinCount = 1
};

return new QueryOptions
{
    Facet = facetParams,
    Highlight = new HighlightingParameters
    {
        Fields = new[] { "field_to_highlight },
    },
};

So basically, I put a limit of 15 for each group in facetparams, and
this code highlights everything that matches the initial query, but I
only want to highlight the items that are returned by the facet.
Is that possible ?

Kind regards.

Mauricio Scheffer

unread,
Oct 24, 2016, 7:03:58 PM10/24/16
to sol...@googlegroups.com
Hi David,

As far as I know, highlighting does not interact with faceting at all in Solr.
An obvious workaround would be running a second query feeding the facet values to the highlighting query.
Try asking on the Solr mailing list, perhaps someone will come up with a better workaround: http://lucene.apache.org/solr/resources.html#mailing-lists

Cheers,
Mauricio




--
Mauricio

--
You received this message because you are subscribed to the Google Groups "SolrNet" group.
To unsubscribe from this group and stop receiving emails from it, send an email to solrnet+unsubscribe@googlegroups.com.
To post to this group, send email to sol...@googlegroups.com.
Visit this group at https://groups.google.com/group/solrnet.
For more options, visit https://groups.google.com/d/optout.

Vincent Blain

unread,
Oct 24, 2016, 7:39:28 PM10/24/16
to sol...@googlegroups.com

I handled the highlights outside of the query and got ride of that in the request. Bootstrap, and other libraries are much more adapt at this.

Message has been deleted

Vincent Blain

unread,
Oct 24, 2016, 8:23:56 PM10/24/16
to sol...@googlegroups.com

How do you want it to display. I used Solr.net to create a faceted search which made the site I was working on really simple to use.


On Oct 24, 2016 5:03 PM, "David T." <zaqsza...@gmail.com> wrote:
Hi again, and thanks a lot for your answer.

I thought about doing a second query too, but I don't know how to do this.
Do you have a example about that ? Or a hint ?

Kind regards.


--
Mauricio

To unsubscribe from this group and stop receiving emails from it, send an email to solrnet+u...@googlegroups.com.

To post to this group, send email to sol...@googlegroups.com.
Visit this group at https://groups.google.com/group/solrnet.
For more options, visit https://groups.google.com/d/optout.
Reply all
Reply to author
Forward
0 new messages