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 28596200C61 for ; Tue, 25 Apr 2017 08:49:53 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 27014160BB3; Tue, 25 Apr 2017 06:49:53 +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 6F689160B9E for ; Tue, 25 Apr 2017 08:49:52 +0200 (CEST) Received: (qmail 67698 invoked by uid 500); 25 Apr 2017 06:49:51 -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 Delivered-To: moderator for java-user@lucene.apache.org Received: (qmail 5737 invoked by uid 99); 25 Apr 2017 06:00:16 -0000 X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.88 X-Spam-Level: * X-Spam-Status: No, score=1.88 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, DKIM_VALID_AU=-0.1, HTML_MESSAGE=2, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H3=-0.01, RCVD_IN_MSPIKE_WL=-0.01, SPF_PASS=-0.001, URIBL_BLOCKED=0.001] autolearn=disabled Authentication-Results: spamd3-us-west.apache.org (amavisd-new); dkim=pass (2048-bit key) header.d=gmail.com DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:from:date:message-id:subject:to; bh=lUhQthQNgnwpjIeUySiMosZVJjrtgiIdInun6eS1B+w=; b=AKRYZ/PMieHKWSG06jwFNIrwx0EpNQI6RMDuqUUSiDoUOc3XWmm6CMgyoi0uQ3St3U Yp+uP/mPNvpWQRntsEKHLYPAZ9khEAizEbG5xSJ8ZkYaQIXV140RB/t/Zgp/VrZLirX8 P5uVRXgREb6OUxKFy303gQaQIlEpyfkCQjvVb2iyvZtRncW3++JeGLCgcbPpG6UEsCtT zTM14sdA52MCPbVtwtuweG4OkKRUUD3HTt2lNXvxk+iAaUMCgM58EF5n0Dv/60n72K69 AgeNbQzgD4ZOMYyw2du6wLT3iLVX6NVyv+uxOlJWpCt1mDe0Hne4YPIBxXMnD+6jCKyl TzoQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:from:date:message-id:subject:to; bh=lUhQthQNgnwpjIeUySiMosZVJjrtgiIdInun6eS1B+w=; b=n/B21o3g0Xc50pcrGwraOkb2bNk7C+df7J5iOkHrawrji0KKfaCNEsNOHMG5Ut+rJL Nx2rop1lq0xcvHszTO5hs9RAwBc/48Vnt4DVPELH4iWqLs6kfbNY27uXNsVjrADOgHH9 +901aUjVF/nRlOvYq+qBxxA8Lg5M+ejdVLgK9l45s+u0a8J63I0JbZ3Vls/K+JCW2Kfu m1rMLMzhc5O5Ndm94aJNkGGdp8mfxendgNursmrTe0pnKKdASjxhwpv4mqplc4GfR6vc swjbK+PvZ8DA1UK0+Hpur21xu6G4h2Hsbb38tPKLCQR2SoWq/xgJWTajRW4ooufXvpvM 877w== X-Gm-Message-State: AN3rC/5V7PLaDX4oX55BLSRe1eFHbEqvw+wIAdKPPDfWwnxhrP1/L/OP zICKseEzHhxq5jO5ttJpqdRF6r9WVKNV X-Received: by 10.31.50.9 with SMTP id y9mr4410605vky.14.1493100009904; Mon, 24 Apr 2017 23:00:09 -0700 (PDT) MIME-Version: 1.0 From: "JavaTech ." Date: Tue, 25 Apr 2017 11:30:09 +0530 Message-ID: Subject: Lucene linking/joining or AND operation on multiple documents To: java-user@lucene.apache.org Content-Type: multipart/alternative; boundary=001a11431808b460ae054df76f56 archived-at: Tue, 25 Apr 2017 06:49:53 -0000 --001a11431808b460ae054df76f56 Content-Type: text/plain; charset=UTF-8 Hi All, I am beginner in lucene . I will come to matter first, actually We are planning to use lucene as search engine for our application. We will have to manage many type of search queries like combination of OR and AND with multiple docs. Currently I am stuck in one search query, it need to have combination of multiple queries. we store some mail information into lucene as by number documents. One mail can have 5-6 docs . Added below a sample structure of data, 1) "id": "1","sendr_name": "*sender1*", "recip_name": "*recipient1*", "subject": "*subject1*" 2) "id": "1","attachment": "*attachment1*" 3) "id": "1","domain": "*domain1*", "ip": "ip1" 5) "id": "1","mid": "*mid1*" 6) "id": "1","type": "type1" 7) "id": "2","sendr_name": "sender1", "recip_name": "recipient1", "subject": "subject1" 8) "id": "2","attachment": "attachment2" 9) "id": "2","domain": "domain1", "ip": "ip2" 10) "id": "2","mid": "mid2" 11) "id": "2","type": "type2" 12) "id": "3","sendr_name": "sender1", "recip_name": "recipient3", "subject": "subject3" 13) "id": "3","attachment": "attachment3" 14) "id": "3","domain": "domain1", "ip": "ip3" 15) "id": "3","mid": "mid3" 16) "id": "3","type": "type3" *Note :* serial no. 1-16 are documents for different mails and field "*id*" get generated internally , so id value cannot use as query value by user. My need is to extract one mail or some mail info as by querying like +sendr_name:sender1 + recip_name:recipient1 +subject:subject1 +attachment:attachment1 +domain:domain1 +mid:mid1 This is to get mail 1 info(1-6 docs for mail 1) . But above query fails to return result because attachment, mid and domain in different docs. Is there any way that we can span AND condition to multiple docs? or is there anyway that we can join query on a field like doc1.id = doc2.id. I request you all to provide your suggestions or help to solve this issue. Regards, Jayan --001a11431808b460ae054df76f56--