internal HighlightingParameters BuildHighlightParameters() { HighlightingParameters parameters = new HighlightingParameters() { Fields = new List <string>() { "title" }, Fragsize = 200 }; return(parameters); }
private void PrepareHiglightOptions(SolrCompositeQuery query, QueryOptions options) { var extQuery = query as SolrCompositeQueryWithHighlights; if (extQuery == null || extQuery.HighlightParameters == null) { return; } var highlightOptions = new HighlightingParameters(); highlightOptions.Fields = extQuery.HighlightParameters; options.Highlight = highlightOptions; }
public static HighlightingParameters BuildParameters() { HighlightingParameters parameters = new HighlightingParameters(); parameters.Fields = new List <string>() { "coursetitle", "description" }; parameters.Fragsize = 2000; //parameters.BeforeTerm = "<span style='color:red'>"; //parameters.AfterTerm = "</span"; return(parameters); }
internal HighlightingParameters BuildHighlightParameters() { HighlightingParameters parameters = new HighlightingParameters() { Fields = new List <string>() { "*" }, Fragsize = 200, Snippets = 20, BeforeTerm = "<span class = 'highlight'>", AfterTerm = "</span>" };; return(parameters); }
private void PrepareHiglightOptions(SolrCompositeQuery query, QueryOptions options) { var extQuery = query as SolrCompositeQueryWithHighlights; if (extQuery == null || extQuery.HighlightParameters == null) { return; } var highlightOptions = new HighlightingParameters(); highlightOptions.Fields = extQuery.HighlightParameters; highlightOptions.Snippets = extQuery.Snippets; highlightOptions.BeforeTerm = "<" + extQuery.Htmltag + ">"; highlightOptions.AfterTerm = "</" + extQuery.Htmltag + ">"; highlightOptions.Fragsize = extQuery.FragmentSize; options.Highlight = highlightOptions; }
public DSLRun(ISolrConnection connection, ISolrQuery query, ICollection <SortOrder> order, ICollection <ISolrFacetQuery> facets, HighlightingParameters highlight) : this(connection, query, order) { this.facets = facets; this.highlight = highlight; }
public IDSLRun <T> WithHighlighting(HighlightingParameters parameters) { return(new DSLRun <T>(connection, query, order, facets, parameters)); }