2015-05-06 46 views
0

Loving Solrnet,它很棒。Solrnet的分面搜索

我成功創建了一個返回構面的Solrnet搜索。

articles = solr.Query(new SolrQuery(sQuery), new QueryOptions 
     { 
     Facet = new FacetParameters 
     { 
      Queries = new[] { new SolrFacetFieldQuery("content_type") } 
     }, 
     Highlight = new HighlightingParameters 
     { 
      Fields = new[] { "description" }, 
      Snippets = 4, 
      MaxAnalyzedChars = 10000, 
     }, 
     Rows = sr.recordsPerPage, 
     Start = pageI, 
    }); 

現在我需要當用戶點擊一個單獨的方面進行Solrnet搜索,然後他們去點擊更多方面的結果狹窄? Solrnet API是如何完成的?你使用過濾器嗎?

+0

退房https://github.com/mausch/SolrNet/blob/master/Documentation/Sample-application.md –

回答

-1

我建立了下面的每個以下字段的查詢字符串...

Queries = new[] { 
    new SolrFacetFieldQuery("content_type"), 
    new SolrFacetFieldQuery("subject"), new SolrFacetFieldQuery("category"), 
    new SolrFacetFieldQuery("timestamp") 
},