From java-user-return-64490-archive-asf-public=cust-asf.ponee.io@lucene.apache.org Fri Jun 28 11:32:34 2019 Return-Path: X-Original-To: archive-asf-public@cust-asf.ponee.io Delivered-To: archive-asf-public@cust-asf.ponee.io Received: from mail.apache.org (hermes.apache.org [207.244.88.153]) by mx-eu-01.ponee.io (Postfix) with SMTP id 7B32F18062B for ; Fri, 28 Jun 2019 13:32:34 +0200 (CEST) Received: (qmail 19384 invoked by uid 500); 28 Jun 2019 11:32:32 -0000 Mailing-List: contact java-user-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: java-user@lucene.apache.org Delivered-To: mailing list java-user@lucene.apache.org Received: (qmail 19364 invoked by uid 99); 28 Jun 2019 11:32:31 -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; Fri, 28 Jun 2019 11:32:31 +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 068EDC214A for ; Fri, 28 Jun 2019 11:32:31 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd4-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.799 X-Spam-Level: * X-Spam-Status: No, score=1.799 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, DKIM_VALID_EF=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, SPF_HELO_PASS=-0.001, 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=serpro.gov.br Received: from mx1-lw-eu.apache.org ([10.40.0.8]) by localhost (spamd4-us-west.apache.org [10.40.0.11]) (amavisd-new, port 10024) with ESMTP id sS1xR1CHAApl for ; Fri, 28 Jun 2019 11:32:27 +0000 (UTC) Received: from mailscan-out.serpro.gov.br (mailscan-out3.serpro.gov.br [161.148.21.214]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTP id F2CA560D49 for ; Fri, 28 Jun 2019 11:32:26 +0000 (UTC) Received: from pps.filterd (mailscan-out3.serpro.gov.br [127.0.0.1]) by mailscan-out3.serpro.gov.br (8.16.0.27/8.16.0.27) with SMTP id x5SBWJ0K009065 for ; Fri, 28 Jun 2019 08:32:19 -0300 DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=serpro.gov.br; h=date : from : to : message-id : subject : mime-version : content-type; s=selector2; bh=q5VQaF2ij68KADUmwsOqMRE2JMQW8GCyZ9/mhJNIAb4=; b=qnRr4Zjq/uQTP6f+KUVsVIGiImAvPBKzNG97IE7GYUZXclP7N8gaa8/PTgR/BANDBlPU OigSaeb4N+orVPaWqZg2rmUyCNYrAWZ6MzFolx8X5YlKFTWrf9Lj/F+/Lru8mrVUEOHh 5tlZtqq3ZYxanLhsSYOBuBKophnShqYlhqQHNllAiR4qNkRNdm+WGlCWe7j+r4BuBKC+ KC/mGe86twRKF/VrmmnhpetDAwuroz5BPagK6Coq492rnu6GcjLOWzhk2PF270BGMWQA A+MAteLEnHmcDZNbxsXQmSgV9pA9cBeu+ijuD67hqOR2aHluDzMpFzGS6AXtCgK07m7s 9A== Received: from corp-bsa-exp-feimapv2-05.localdomain ([161.148.28.134]) by mailscan-out3.serpro.gov.br with ESMTP id 2td6f5rkp6-1 for ; Fri, 28 Jun 2019 08:32:19 -0300 Received: from mailscan-exp1.serpro.gov.br (unknown [161.148.28.143]) by corp-bsa-exp-feimapv2-05.localdomain (Postfix) with ESMTP id 6C3EEA6 for ; Fri, 28 Jun 2019 08:32:19 -0300 (-03) Received: from pps.filterd (mailscan-exp1.serpro.gov.br [127.0.0.1]) by mailscan-exp1.serpro.gov.br (8.16.0.27/8.16.0.27) with SMTP id x5SBV3sv007874 for ; Fri, 28 Jun 2019 08:32:19 -0300 Received: from smtpsasl01-vdom.localdomain ([161.148.30.140]) by mailscan-exp1.serpro.gov.br with ESMTP id 2td0kahbrf-1 for ; Fri, 28 Jun 2019 08:32:17 -0300 Received: from zmb-mbox08.correio.bsa.serpro (zmb-mbox08.correio.bsa.serpro [161.148.29.46]) by smtpsasl01-vdom.localdomain (Postfix) with ESMTP id 3480C28A for ; Fri, 28 Jun 2019 08:32:17 -0300 (-03) Date: Fri, 28 Jun 2019 08:32:17 -0300 (BRT) From: Eduardo Costa Lopes To: java-user Message-ID: <11662141.852652.1561721537163.JavaMail.zimbra@serpro.gov.br> Subject: Query returning duplicated values MIME-Version: 1.0 Content-Type: multipart/alternative; boundary="=_2f539cad-874a-4642-9f5a-38432019f2fa" X-Originating-IP: [10.32.80.56] X-Mailer: Zimbra 8.8.12_GA_3803 (ZimbraWebClient - FF67 (Linux)/8.8.12_GA_3794) Thread-Index: Sn+4xxZrHVMZ9nOAN4R50uEZK80lGw== Thread-Topic: Query returning duplicated values X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-06-28_04:,, signatures=0 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=397 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906280137 X-Proofpoint-Spam-Details: rule=notspam policy=default score=0 suspectscore=0 malwarescore=0 phishscore=0 bulkscore=0 spamscore=0 mlxscore=0 mlxlogscore=504 adultscore=0 classifier=spam adjust=0 reason=mlx scancount=1 engine=8.0.1-1810050000 definitions=main-1906280136 X-Proofpoint-Virus-Version: vendor=fsecure engine=2.50.10434:,, definitions=2019-06-28_04:,, signatures=0 --=_2f539cad-874a-4642-9f5a-38432019f2fa Content-Type: text/plain; charset="utf-8" Content-Transfer-Encoding: 8bit Hi, I've indexed a database records with the following layout: Company Partner C1 P1 C1 P2 C2 P1 The system should support searching by partner and return the partner companies and, in the similar way, a query for a company name should return the companies matching the search, but with the layout above I'll get some results duplicated. Is there a way to select ** distinct ** values of certain fields? Thanks in advance, Eduardo. - "Esta mensagem do SERVIÇO FEDERAL DE PROCESSAMENTO DE DADOS (SERPRO), empresa pública federal regida pelo disposto na Lei Federal nº 5.615, é enviada exclusivamente a seu destinatário e pode conter informações confidenciais, protegidas por sigilo profissional. Sua utilização desautorizada é ilegal e sujeita o infrator às penas da lei. Se você a recebeu indevidamente, queira, por gentileza, reenviá-la ao emitente, esclarecendo o equívoco." "This message from SERVIÇO FEDERAL DE PROCESSAMENTO DE DADOS (SERPRO) -- a government company established under Brazilian law (5.615/70) -- is directed exclusively to its addressee and may contain confidential data, protected under professional secrecy rules. Its unauthorized use is illegal and may subject the transgressor to the law's penalties. If you're not the addressee, please send it back, elucidating the failure." --=_2f539cad-874a-4642-9f5a-38432019f2fa--