Return-Path: X-Original-To: archive-asf-public-internal@cust-asf2.ponee.io Delivered-To: archive-asf-public-internal@cust-asf2.ponee.io Received: from cust-asf.ponee.io (cust-asf.ponee.io [163.172.22.183]) by cust-asf2.ponee.io (Postfix) with ESMTP id 61833200BCB for ; Thu, 10 Nov 2016 04:17:49 +0100 (CET) Received: by cust-asf.ponee.io (Postfix) id 60038160AFD; Thu, 10 Nov 2016 03:17:49 +0000 (UTC) Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [140.211.11.3]) by cust-asf.ponee.io (Postfix) with SMTP id 7DEE1160AFA for ; Thu, 10 Nov 2016 04:17:48 +0100 (CET) Received: (qmail 18986 invoked by uid 500); 10 Nov 2016 03:17:47 -0000 Mailing-List: contact user-help@lucenenet.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@lucenenet.apache.org Delivered-To: mailing list user@lucenenet.apache.org Received: (qmail 18969 invoked by uid 99); 10 Nov 2016 03:17:46 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd4-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Thu, 10 Nov 2016 03:17:46 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd4-us-west.apache.org (ASF Mail Server at spamd4-us-west.apache.org) with ESMTP id C0B7FC0FDB for ; Thu, 10 Nov 2016 03:17:45 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.781 X-Spam-Level: * X-Spam-Status: No, score=1.781 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, HTML_MESSAGE=2, RCVD_IN_DNSWL_LOW=-0.7, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, RCVD_IN_SORBS_SPAM=0.5, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd4-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com Received: from mx1-lw-us.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id snvDKlCkcNlz for ; Thu, 10 Nov 2016 03:17:43 +0000 (UTC) Received: from mail-lf0-f46.google.com (mail-lf0-f46.google.com [209.85.215.46]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id 7D95A5FC6D for ; Thu, 10 Nov 2016 03:17:43 +0000 (UTC) Received: by mail-lf0-f46.google.com with SMTP id c13so179194656lfg.0 for ; Wed, 09 Nov 2016 19:17:43 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:sender:in-reply-to:references:from:date:message-id :subject:to; bh=dlmPOt0cthTIqbDPRUHvMN01XhBE05Z5tprw3AJVjTU=; b=QwtjcMojzc9vt8pRGlpqx5slyQ6ogVj8n7ihsnRTZwEbBId8LqrFwFSTrvzUwgnYXW QekVXr8duqccecu7Ix/mepdomN0hm8LgWjuu9fgu4yveGaExqhniSHCDRlB1j3k759ph x2JTCQpPdk9Pr3soiYN+LdQbtsNs0HipGGG/3eB2aqG/LyzlVOOm59mPLGrn077fzw83 ioEiDDMllYan+26/FTUigCR+nIJKCPsxorgYg7W513UtEi78vpaP6m4YYEIvUoU1iYpk v/joAlWseKhezwmWeJNlyJy9flPmtAJKssUgGrEWGYX7ElAJfkYCJEVly/jHltzMjLxS +tUw== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:sender:in-reply-to:references:from :date:message-id:subject:to; bh=dlmPOt0cthTIqbDPRUHvMN01XhBE05Z5tprw3AJVjTU=; b=dbtM0oyQxq2duxPlT2Bme+TEO0TRKEuAUeuZM0sOfbGw5qW47I0rQ6ajcpoDPzRbaE 7AQfiLYJkVhy5IwyRCZXEHFzlJ+cdCAaczm3hKcuHSKBMEGyvGOpVn4p7+DuI8inNwgD lqQDhD4rkHGJuQ7eWTUYLZp/hZDuKbH0u92ERLSUekpdl6whAFZXvZRS79gjPAw3U48w NqIbSROhH514c2lOgWzIlcd/s3LtLGmNrqlx/HmA0KsBRL54SyuNRYypeeZxkE/LSxZD qkbsFSxuLn4c6vU5pyEMlywHeAmQw08Tjt6qlDtzWMgRgZYk3k6gOCFcuZfGWntOSA3h lMYA== X-Gm-Message-State: ABUngvf8zP4uUEEzhhvsifNgcnhV2X5bkmRFS3QyTL+9uUUGUSSexkRmZp2vFMFCK5Vdm58i8KX+2XQyfDkdNQ== X-Received: by 10.25.33.131 with SMTP id h125mr1127353lfh.49.1478747846115; Wed, 09 Nov 2016 19:17:26 -0800 (PST) MIME-Version: 1.0 Sender: itamar.synhershko@gmail.com Received: by 10.25.125.133 with HTTP; Wed, 9 Nov 2016 19:17:25 -0800 (PST) In-Reply-To: <4606B227B7AF19498F107C2C59CC984986738C22@Ex10DAG10-N1.apps4rent.net> References: <4606B227B7AF19498F107C2C59CC984986738C22@Ex10DAG10-N1.apps4rent.net> From: Itamar Syn-Hershko Date: Wed, 9 Nov 2016 19:17:25 -0800 X-Google-Sender-Auth: K1M6QvOLugk5w5m1AMTy4XYVlyg Message-ID: Subject: Re: TermDistinctValuesCollector To: user@lucenenet.apache.org Content-Type: multipart/alternative; boundary=001a114115661486de0540e9d01d archived-at: Thu, 10 Nov 2016 03:17:49 -0000 --001a114115661486de0540e9d01d Content-Type: text/plain; charset=UTF-8 The Java docs have it explained nicely https://lucene.apache.org/core/4_8_1/grouping/org/apache/lucene/search/grouping/package-summary.html -- Itamar Syn-Hershko http://code972.com | @synhershko Freelance Developer & Consultant Lucene.NET committer and PMC member On Tue, Nov 8, 2016 at 12:12 AM, Shad Storhaug wrote: > Hi Julian, > > Just to be sure we are on the same page, the grouping functionality was > posted as a pull request mere hours ago https://github.com/apache/ > lucenenet/pull/193. This doesn't yet exist in the master branch or on > NuGet. But since most of these types are missing from the master branch and > it sounds like you are compiling fine, you are probably on the right page > (just need to check). If not, you should pull down that branch and compile > it. > > I can't tell you exactly how the functionality works, but I can point you > to the tests. Unfortunately, the tests are very complex and there are not > many of them so I am not sure how helpful they will be. At least they will > give you some idea of what is required for a common grouping scenario. The > test are at: https://github.com/NightOwl888/lucenenet/tree/ > grouping/src/Lucene.Net.Tests.Grouping. > > > Perhaps someone else can give you some better insight on how the > functionality works - you might want to try the Lucene (Java) user group if > you are having trouble finding detailed documentation. The API is very > similar in .NET. > > Thanks, > Shad Storhaug (NightOwl888) > > -----Original Message----- > From: Julian Ohrt [mailto:julian.ohrt@aploris.com] > Sent: Tuesday, November 8, 2016 2:43 PM > To: user@lucenenet.apache.org > Subject: TermDistinctValuesCollector > > Hi: > > I am trying to use the class TermDistinctValuesCollector from Core > namespace Lucene.Net.Search.Grouping. > Studying http://www.solr-start.com/javadoc/solr-lucene/org/ > apache/lucene/search/grouping/term/TermDistinctValuesCollector.html > I found a short explanation for the three parameters of the constructor: > > groupField - The field to group by > countField - The field to count distinct values for groups - The top N > groups, collected during the first phase search > > I am still not sure what the group is (is it the field for which the > content is counted?), why a lucene field is needed for counting, and what > the "first phase search" is. > I tried something like this: > > Collection groups = new Collection(); > TermDistinctValuesCollector collector = new TermDistinctValuesCollector("groupField", > "countField", groups); mIndexSearcher.Search(query, null, collector); > > Of course to no avail. Groups is empty. It did give me any result at all. > > Is there any documentation I missed? I did not even find any second hit > for "TermDistinctValuesCollector" in the lucenenet repository except for > TermDistinctValuesCollector.cs itself. Not even a unit test. > > A short example how to use it would be awesome. But I'd also like to > understand how it works (should work) internally. What are member variables > ordSet, groupFieldTermIndex, etc. used for? Not knowing the internals of > lucene I just don't understand the source code. > > Thanks a lot! > Julian > > > --001a114115661486de0540e9d01d--