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 B7E69200B17 for ; Tue, 21 Jun 2016 20:36:42 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B4D60160A4F; Tue, 21 Jun 2016 18:36:42 +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 0634C160A07 for ; Tue, 21 Jun 2016 20:36:41 +0200 (CEST) Received: (qmail 23078 invoked by uid 500); 21 Jun 2016 18:36:40 -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 23066 invoked by uid 99); 21 Jun 2016 18:36:40 -0000 Received: from pnap-us-west-generic-nat.apache.org (HELO spamd3-us-west.apache.org) (209.188.14.142) by apache.org (qpsmtpd/0.29) with ESMTP; Tue, 21 Jun 2016 18:36:40 +0000 Received: from localhost (localhost [127.0.0.1]) by spamd3-us-west.apache.org (ASF Mail Server at spamd3-us-west.apache.org) with ESMTP id 0409118028E for ; Tue, 21 Jun 2016 18:36:40 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: 1.198 X-Spam-Level: * X-Spam-Status: No, score=1.198 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_LOW=-0.7, RCVD_IN_MSPIKE_H2=-0.001, SPF_PASS=-0.001] autolearn=disabled Authentication-Results: spamd3-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 (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id VYKZm97BpuLZ for ; Tue, 21 Jun 2016 18:36:39 +0000 (UTC) Received: from mail-io0-f171.google.com (mail-io0-f171.google.com [209.85.223.171]) by mx1-lw-us.apache.org (ASF Mail Server at mx1-lw-us.apache.org) with ESMTPS id E19ED5F484 for ; Tue, 21 Jun 2016 18:36:38 +0000 (UTC) Received: by mail-io0-f171.google.com with SMTP id f30so24125705ioj.2 for ; Tue, 21 Jun 2016 11:36:38 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=1XJBaaF2i5WviPFQROuAiSAB4j2GBsOmSvl+4S8X71U=; b=dV8lAcJLB4beTOwgG6rUyZ3clu+L7nPSM/ukzHnWBTzp3ywvcJfmzgU/gDFSz/4YPA GbLne5ont5pH3cYXw9bkUHSgDbd4DCOymkyQjIen8ze61XXjs6zwaDLJcH5ENPBeaPOD 45U6juEcQJ7G0wrRa56jAnmAxPX60Wu2BalwB5N1a9w5xtKFeHR8W/ATpukmaPcfN0Ow 43bv//JF4JzsSsjxN/x2EE5EZYglG8IupVeeIBnzjeTc7nzB94PAGSm2IyEEMZDWPXio RLB/cJYRowREznjyw8PO0aN35IXyg1pN61y0gMMar4TJ6JeM5PqOTQ7VrN2S6MBpbZu/ nvEQ== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=1XJBaaF2i5WviPFQROuAiSAB4j2GBsOmSvl+4S8X71U=; b=N2bfrsUaG8s0bbifw0mPVlAgI4IYFvFnN3ABcrg5P4g/tG7LWCcXx8eAoJJ4cf4t5F H0HafNEh3fXChx+jp7xkgsbhjrxWUxq/HHufSCVkRMeespiGCZaOBNqEnumxZCqWgQR3 1k3HKNUSrXSgtTAxJhCp0TIYk2Ryf7NpYl3caHunlAK2DK4KTU0U+7qO6ZNjg6Fuf0P0 PcUwXtvxkLK2KdUASiXxrUVKxcxVNve6iIiuvtFRQcBJAqN/ZjW2kPETNsx+KJsvW24p 8BZAHhzj4fdepDFAnUnybP3ZG2O1FRtbsnlVgdtW+F6QNqoXQjwMJ/HglLLxP3Teaiyc Ziew== X-Gm-Message-State: ALyK8tKek2q4RW5/V1bCoCem7uc7eMv6MKddSlxiBrKs0DwptZWUX8A2BW7cD3cdDZ+2PMXYN4sN/JmgbEUdOQ== X-Received: by 10.157.14.115 with SMTP id n48mr17263856otd.106.1466534198032; Tue, 21 Jun 2016 11:36:38 -0700 (PDT) MIME-Version: 1.0 References: In-Reply-To: From: =?UTF-8?B?S3VkcmV0dGluIEfDvGxlcnnDvHo=?= Date: Tue, 21 Jun 2016 18:36:28 +0000 Message-ID: Subject: Re: debugging IndexSearcher.search performance To: "java-user@lucene.apache.org" Content-Type: multipart/alternative; boundary=001a113e3036ecbf9e0535ce19d8 archived-at: Tue, 21 Jun 2016 18:36:42 -0000 --001a113e3036ecbf9e0535ce19d8 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: quoted-printable Thanks for the response and sorry for not updating the thread. issue turned out to be not related to IndexSearcher.search() Further looking in the code, found that the method was called multiple times. Issue resolved after refactoring. Thanks, Kudret On Thu, Mar 10, 2016 at 2:03 AM Adrien Grand wrote: > There is a lot of things happening under this method. Since it seems that > you ran this under a profiler, do you have a breakdown of which methods > this CPU time is spent in? > > Le mar. 8 mars 2016 =C3=A0 17:16, Kudrettin G=C3=BClery=C3=BCz a > =C3=A9crit : > > > Hi, > > > > The code I am working on is spending long time in this function: > > Searcher.java:221 org.apache.lucene.search.IndexSearcher.search(Query, > int, > > Sort) 94400ms 95% > > > > Query fed to the function looks ugly at first and I first thought that = it > > could be the culprit: > > +body:/.*foo/ +((+dir1:foo +dir2:bar) (+dir1:baz) (+dir1:bin) ...(the > list > > goes on for all top level directories indexed. For a total of ~60 > > directories)) > > > > However same query completes much faster in Luke. It shouldn't be becau= se > > of Sort either because it takes long time for no matches, too. > > > > Any suggestions while I debug this issue? Lucene 5 is what I am using > > currently. > > > > Thanks, > > Kudret > > > --001a113e3036ecbf9e0535ce19d8--