[
https://issues.apache.org/jira/browse/LUCENE-4626?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=13531867#comment-13531867
]
zyfan commented on LUCENE-4626:
-------------------------------
yes i know
> lucene totalGroupCount always 0
> -------------------------------
>
> Key: LUCENE-4626
> URL: https://issues.apache.org/jira/browse/LUCENE-4626
> Project: Lucene - Core
> Issue Type: Bug
> Components: modules/grouping
> Affects Versions: 4.0
> Environment: win7 + JDK6.0
> Reporter: zyfan
> Labels: group, totalGroupCount
> Original Estimate: 5h
> Remaining Estimate: 5h
>
> i want group in lucene ,i find group demo for lucene 4.0 API,
> this is my code:
> Analyzer analyzer=new WhitespaceAnalyzer(Version.LUCENE_40);
>
> DirectoryReader indexReader=DirectoryReader.open(FSDirectory.open(new
> File(indexDir)));
> IndexSearcher isearcher = new IndexSearcher(indexReader);
>
> GroupingSearch groupingSearch = new GroupingSearch("CsCode");
> groupingSearch.setGroupSort(Sort.INDEXORDER);
> groupingSearch.setFillSortFields(true);
>
>
> if (true) {
> // Sets cache in MB
> groupingSearch.setCachingInMB(100.0, true);
> }
>
> if (true) {
> groupingSearch.setAllGroups(true);
>
> }
>
> QueryParser parser = new QueryParser(Version.LUCENE_40, "OneBestText1",
> analyzer);
> Query query = parser.parse("你好");
> TopGroups<String> result = groupingSearch.search(isearcher, query, 0, 5000);
>
> // Render groupsResult...
> if (true) {
> int totalGroupCount = result.totalGroupCount;
>
> System.out.println(totalGroupCount);
> }
> the totalGroupCount always 0 but result.groups.length is 590.
> i donot know why ,please help
--
This message is automatically generated by JIRA.
If you think it was sent incorrectly, please contact your JIRA administrators
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]