[ 
https://issues.apache.org/jira/browse/LUCENE-1421?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13032238#comment-13032238
 ] 

Bill Bell commented on LUCENE-1421:
-----------------------------------

Say we have 4 documents:

docid=1
hgid=1
age=10

docid=2
hgid=1
age=10

docid=3
hgid=2
age=12

docid=4
hgid=4
age=11

If we group by hgid, we would get:

hgid=1
  >docid=1
   hgid=1
   age=10
  >docid=2
   hgid=1
   age=10

hgid=3
   >docid=3
    hgid=2
    age=12

hgid=4
    >docid=4
     hgid=4
     age=11

If I set Facet Counts = POST

age: 10 (1 document)
age: 11 (1 document)
age: 12 (1 document)

If I set Facet Counts = PRE

age: 10 (2 document)
age: 11 (1 document)
age: 12 (1 document)

The only way grouping works in Solr now is Facet Counts = PRE.

Thanks.

> Ability to group search results by field
> ----------------------------------------
>
>                 Key: LUCENE-1421
>                 URL: https://issues.apache.org/jira/browse/LUCENE-1421
>             Project: Lucene - Java
>          Issue Type: New Feature
>          Components: Search
>            Reporter: Artyom Sokolov
>            Assignee: Michael McCandless
>            Priority: Minor
>             Fix For: 3.2, 4.0
>
>         Attachments: LUCENE-1421.patch, LUCENE-1421.patch, 
> lucene-grouping.patch
>
>
> It would be awesome to group search results by specified field. Some 
> functionality was provided for Apache Solr but I think it should be done in 
> Core Lucene. There could be some useful information like total hits about 
> collapsed data like total count and so on.
> Thanks,
> Artyom

--
This message is automatically generated by JIRA.
For more information on JIRA, see: http://www.atlassian.com/software/jira

---------------------------------------------------------------------
To unsubscribe, e-mail: [email protected]
For additional commands, e-mail: [email protected]

Reply via email to