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 B181F200CB0 for ; Fri, 9 Jun 2017 05:12:57 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id B045E160BE5; Fri, 9 Jun 2017 03:12:57 +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 F25C5160BD5 for ; Fri, 9 Jun 2017 05:12:56 +0200 (CEST) Received: (qmail 10497 invoked by uid 500); 9 Jun 2017 03:12:55 -0000 Mailing-List: contact user-help@lucy.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: user@lucy.apache.org Delivered-To: mailing list user@lucy.apache.org Received: (qmail 10485 invoked by uid 99); 9 Jun 2017 03:12:55 -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; Fri, 09 Jun 2017 03:12:55 +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 D09EF185F86 for ; Fri, 9 Jun 2017 03:12:54 +0000 (UTC) X-Virus-Scanned: Debian amavisd-new at spamd3-us-west.apache.org X-Spam-Flag: NO X-Spam-Score: -2.296 X-Spam-Level: X-Spam-Status: No, score=-2.296 tagged_above=-999 required=6.31 tests=[DKIM_SIGNED=0.1, DKIM_VALID=-0.1, HEADER_FROM_DIFFERENT_DOMAINS=0.001, RCVD_IN_DNSWL_NONE=-0.0001, RCVD_IN_MSPIKE_H2=-2.796, RCVD_IN_SORBS_SPAM=0.5, 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-eu.apache.org ([10.40.0.8]) by localhost (spamd3-us-west.apache.org [10.40.0.10]) (amavisd-new, port 10024) with ESMTP id wDGu0mLLELBh for ; Fri, 9 Jun 2017 03:12:52 +0000 (UTC) Received: from mail-yb0-f175.google.com (mail-yb0-f175.google.com [209.85.213.175]) by mx1-lw-eu.apache.org (ASF Mail Server at mx1-lw-eu.apache.org) with ESMTPS id 7F0D75F640 for ; Fri, 9 Jun 2017 03:12:51 +0000 (UTC) Received: by mail-yb0-f175.google.com with SMTP id 202so13368460ybd.0 for ; Thu, 08 Jun 2017 20:12:51 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=sender:reply-to:subject:to:references:from:message-id:date :user-agent:mime-version:in-reply-to:content-language :content-transfer-encoding; bh=c1XsFLJztP8nmbGvm9GUSV5dBcJkBntTIwjV30hbnKY=; b=kEGWiI11SexPFRr77UndUBHIHySQbERfcNwX06ikuFLl/gAdj95CF6hJFZ0rlTUp08 eKggk6eDZ6735ZkmzagreID7P4ZJ09gzcze88cM9NX8BxWCD92Kz6zsxj5L7wv3h8hED 1v0P9EqjOHrSY0dGcf0S5YIrhwbcvMwC4ARfI6xmQSOIVy8sd0j69Tt73jA6qyk3cD/l 92cJP6j9AF9I35ewEEd2O7eeYuVGRPu6jaH33HSP5JQwXwRJOngYzadkO/6sFGda/U5O GiQovjE9isr1Yu3q2RsYhXVAdNXWyD8q2OaaKP/wbbGwmbz0WAFcs4XsjQfeU83jOEHm CwHA== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:sender:reply-to:subject:to:references:from :message-id:date:user-agent:mime-version:in-reply-to :content-language:content-transfer-encoding; bh=c1XsFLJztP8nmbGvm9GUSV5dBcJkBntTIwjV30hbnKY=; b=RIJ0u2mphk4Od6D0NstWwfGIJq2Qp78Lf/ElnmDXq0VfAPRRcuSPW1hclAC8xDgcHe AYnPYHxm63m5asvkM6GWT95/gx4EZcvDA/Nta8svwc0kGPIPKmy1b/Kxk7sEulhBv+Jn EwqqjIFnz6Lzkjo0h8TchfpmgxuSFpcdeOfvNlRZM+ozlPLvcmEu42a1XPE+1Ezn4x8B hQn5+cYzFLuZObcw4jy5LuXGxvL1UmAgbhIIZBoxAXWJ0qy5RDU6Swj77/tdUzR0v8mO Vw/T5axKoiZzQh+KuKsy4kocHBhsnD99fV6dm9k/kHP/aN2RSoFNMsd4Jz43N9vEh1C7 L/MQ== X-Gm-Message-State: AODbwcDdVbx5/JOQM82xnIim0ENF7JMfL+7eAL05ioj3FWiu7n8oQRTk WWb7Tf81Zll381ueC3s= X-Received: by 10.37.231.205 with SMTP id e196mr12561634ybh.88.1496977970098; Thu, 08 Jun 2017 20:12:50 -0700 (PDT) Received: from pekmac.local (64.56.124.24.cm.sunflower.com. [24.124.56.64]) by smtp.googlemail.com with ESMTPSA id o65sm2821531ywf.56.2017.06.08.20.12.48 for (version=TLS1_2 cipher=ECDHE-RSA-AES128-GCM-SHA256 bits=128/128); Thu, 08 Jun 2017 20:12:49 -0700 (PDT) Sender: Peter Karman Reply-To: peter@peknet.com To: user@lucy.apache.org References: From: Peter Karman Message-ID: Date: Thu, 8 Jun 2017 22:12:48 -0500 User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.12; rv:52.0) Gecko/20100101 Thunderbird/52.1.1 MIME-Version: 1.0 In-Reply-To: Content-Type: text/plain; charset=utf-8; format=flowed Content-Language: en-US Content-Transfer-Encoding: 7bit Subject: Re: [lucy-user] C Library: Regex query archived-at: Fri, 09 Jun 2017 03:12:57 -0000 Serkan Mulayim wrote on 6/8/17 7:12 PM: > Hi guys, > > I would like to ask if it is possible to do regex queries (without adding new fields, and tokenizing differently) in the C library. What I need to do is to be able to be able to return documents based on file name suffix. So that a query as (*.pdf) should return all documents that contain a PDF file type. > > I can understand the complexity it creates for the searcher to do a suffix query. But in my use case there would not be many files that are associated with the documents. So that attachment fields will exist for small number of documents. > > If this is not possible, I will also index the documents with their file types in a new field. (or reverse the attachment names). > afaik there is no C implementation of the Regex query. I wrote the Perl version. https://metacpan.org/release/LucyX-Search-WildcardQuery You will be *much* happier with storing the file extension as a separate field and searching on that. Far far more efficient at search time than munging a regex. -- Peter Karman . https://karpet.github.io . https://keybase.io/peterkarman