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 7B629200B5B for ; Fri, 5 Aug 2016 18:03:22 +0200 (CEST) Received: by cust-asf.ponee.io (Postfix) id 79F62160AAC; Fri, 5 Aug 2016 16:03:22 +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 C02A9160A64 for ; Fri, 5 Aug 2016 18:03:21 +0200 (CEST) Received: (qmail 8212 invoked by uid 500); 5 Aug 2016 16:03:20 -0000 Mailing-List: contact dev-help@lucene.apache.org; run by ezmlm Precedence: bulk List-Help: List-Unsubscribe: List-Post: List-Id: Reply-To: dev@lucene.apache.org Delivered-To: mailing list dev@lucene.apache.org Received: (qmail 8191 invoked by uid 99); 5 Aug 2016 16:03:20 -0000 Received: from arcas.apache.org (HELO arcas) (140.211.11.28) by apache.org (qpsmtpd/0.29) with ESMTP; Fri, 05 Aug 2016 16:03:20 +0000 Received: from arcas.apache.org (localhost [127.0.0.1]) by arcas (Postfix) with ESMTP id 8BCDE2C0D5D for ; Fri, 5 Aug 2016 16:03:20 +0000 (UTC) Date: Fri, 5 Aug 2016 16:03:20 +0000 (UTC) From: "Michael McCandless (JIRA)" To: dev@lucene.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Commented] (LUCENE-7404) prepared query for introducing evaluation expression in query (not fixed second comparation member) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: 7bit X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 archived-at: Fri, 05 Aug 2016 16:03:22 -0000 [ https://issues.apache.org/jira/browse/LUCENE-7404?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=15409624#comment-15409624 ] Michael McCandless commented on LUCENE-7404: -------------------------------------------- Can't you use the expressions module with function queries to get close to this? > prepared query for introducing evaluation expression in query (not fixed second comparation member) > ----------------------------------------------------------------------------------------------------- > > Key: LUCENE-7404 > URL: https://issues.apache.org/jira/browse/LUCENE-7404 > Project: Lucene - Core > Issue Type: Improvement > Reporter: Cristian Lorenzetto > > Lucene is very powerfull but has a limitation very important. It is impossible to use when you want create a query where is a expression inside. > field1: >= field2 where field1 and field2 is not possible. > field1:= field2^2 -4 *field3 > it is pratically impossible to index statically document for this query but it is possible to do 2 things: > 1) create a third field hidden here is saved the result. > 2) when you use a prepared query , it is saved automatically in a different writer this info that you can save. > Creating a prepared query lucene do all automatically for making this query using indexes. > PS. Pay attention that fields in expression could be not only inside the current document but also in different documents/readers. > It could be used also for join different document types(it is a subcase of the above problem). -- This message was sent by Atlassian JIRA (v6.3.4#6332) --------------------------------------------------------------------- To unsubscribe, e-mail: dev-unsubscribe@lucene.apache.org For additional commands, e-mail: dev-help@lucene.apache.org