lucene-solr-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Alisa Z. <>
Subject [nesting] JSON Facet API vs. BlockJoin Faceting: need help on queries (Facet API facets by wrong doc level VS. BlockJoin Faceting does not return top 10 most frequent)
Date Mon, 28 Mar 2016 19:39:07 GMT
 Hi all, 

I am trying to perform faceting of parent docs by nested document fields. I've tried 2 approaches
as in subject, yet in first the results are not quite correct and in the 2nd I cannot get
the query right. So I need help on either of them and any explication or documentation or
blogs on the behavior is much appreciated.   

Verbally the query is as follows: "Find top 10 keywords for all documents with "california"
in email subject line"

Here is the query with responses: 

==== Json Facet API ====  

curl http://localhost:8985/solr/my_collection/query -d 'q={!parent%20which="type_s:doc"}type_s:doc.userData%20%2BSubject_t:california&rows=0&
  filter_by_child_type :{
    domain: { blockChildren : "type_s:doc" },
      top_keywords_text : {
        type: terms,
        field: text_t,
        limit: 10


      "q":"{!parent which=\"type_s:doc\"}type_s:doc.userData +Subject_t:california",
      "json.facet":"{\n  filter_by_child_type :{\n    type:query,\n    q:\"type_s:doc.enriched.text.keywords\",\n   
domain: { blockChildren : \"type_s:doc\" },\n    facet:{\n      top_keywords_text
: {\n        type: terms,\n        field: text_t,\n        limit: 10\n     
}\n    }\n  }\n}",

QUESTION:  where do the counts greater than 19 (the total number of the top-level documents
returned by the query) comes from?  How to adjust the query to facet only on the top-level
documents (and consequently no count should be greater than 19)? 

===== BlockJoin Faceting ====== 
Following the example on
, I've tried this:  




QUESTION: This looks very close to what I want, yet why  child.facet.limit=10&child.facet.mincount=5
are ignored?  How to get top 10 most frequent? 

Thank you for your help in advance! 

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