From issues-return-5310-archive-asf-public=cust-asf.ponee.io@lucene.apache.org Sun Nov 24 23:21:02 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 744E418065E for ; Mon, 25 Nov 2019 00:21:02 +0100 (CET) Received: (qmail 48376 invoked by uid 500); 24 Nov 2019 23:21:01 -0000 Mailing-List: contact issues-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 issues@lucene.apache.org Received: (qmail 48367 invoked by uid 99); 24 Nov 2019 23:21:01 -0000 Received: from mailrelay1-us-west.apache.org (HELO mailrelay1-us-west.apache.org) (209.188.14.139) by apache.org (qpsmtpd/0.29) with ESMTP; Sun, 24 Nov 2019 23:21:01 +0000 Received: from jira-he-de.apache.org (static.172.67.40.188.clients.your-server.de [188.40.67.172]) by mailrelay1-us-west.apache.org (ASF Mail Server at mailrelay1-us-west.apache.org) with ESMTP id BD3F8E2C44 for ; Sun, 24 Nov 2019 23:21:00 +0000 (UTC) Received: from jira-he-de.apache.org (localhost.localdomain [127.0.0.1]) by jira-he-de.apache.org (ASF Mail Server at jira-he-de.apache.org) with ESMTP id 0FB71780492 for ; Sun, 24 Nov 2019 23:21:00 +0000 (UTC) Date: Sun, 24 Nov 2019 23:21:00 +0000 (UTC) From: "Vincenzo D'Amore (Jira)" To: issues@lucene.apache.org Message-ID: In-Reply-To: References: Subject: [jira] [Updated] (SOLR-13863) payload query function supports string encoded payloads (delimited_payloads_string) MIME-Version: 1.0 Content-Type: text/plain; charset=utf-8 Content-Transfer-Encoding: quoted-printable X-JIRA-FingerPrint: 30527f35849b9dde25b450d4833f0394 [ https://issues.apache.org/jira/browse/SOLR-13863?page=3Dcom.atlassia= n.jira.plugin.system.issuetabpanels:all-tabpanel ] Vincenzo D'Amore updated SOLR-13863: ------------------------------------ Description:=20 payload query function supports string encoded payloads (delimited_payloads= _string) have the per-store pricing problem but payload function handles only numbe= rs. Stores can also be in different countries, for example would be useful havi= ng with the price also the currency and other attributes related to the sto= re. We could have a new function query named *spayload* that helps to read and = sort payload field *delimited_payloads_string*. Example document: { {{=C2=A0 "id":"my sample doc",}} {{=C2=A0 "currencyPayload":[}} {{=C2=A0 =C2=A0 "store1|EUR",}} {{=C2=A0 =C2=A0 "store1|USD",}} {{=C2=A0 =C2=A0 "store3|GBP"}} {{=C2=A0 ]}} } Querying Solr with {{fl=3Dspayload(currencyPayload,store3)}} would generate a response like the following: { {{=C2=A0 "response": {}} {{=C2=A0 =C2=A0 =C2=A0 "docs":[}}{ {{=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"id":"my sample doc",=C2=A0}} {{=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"spayload(currencyPayload,store3)":"GB= P"}} {{=C2=A0 =C2=A0 =C2=A0 }]}} =C2=A0 =C2=A0 } {{}}} And executing `spayload(payloadCurrency,store2)` returns `EUR`, and so on. You can use `spayload` even as sorting function. {{sort=3Dspayload(payloadField,value) asc}} =C2=A0 was: payload query function supports string encoded payloads have the per-store pricing problem but payload function handles only numbe= rs. Stores can also be in different countries, for example would be useful havi= ng with the price also the currency and other attributes related to the sto= re. We could have a new function query named *spayload* that helps to read and = sort payload field *delimited_payloads_string*. Example document: { {{=C2=A0 "id":"my sample doc",}} {{=C2=A0 "currencyPayload":[}} {{=C2=A0 =C2=A0 "store1|EUR",}} {{=C2=A0 =C2=A0 "store1|USD",}} {{=C2=A0 =C2=A0 "store3|GBP"}} {{=C2=A0 ]}} } Querying Solr with {{fl=3Dspayload(currencyPayload,store3)}} would generate a response like the following: { {{=C2=A0 "response": {}} {{=C2=A0 =C2=A0 =C2=A0 "docs":[}}{ {{=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"id":"my sample doc",=C2=A0}} {{=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"spayload(currencyPayload,store3)":"GB= P"}} {{=C2=A0 =C2=A0 =C2=A0 }]}} =C2=A0 =C2=A0 } {{}}} And executing `spayload(payloadCurrency,store2)` returns `EUR`, and so on. You can use `spayload` even as sorting function. {{sort=3Dspayload(payloadField,value) asc}} =C2=A0 > payload query function supports string encoded payloads (delimited_payloa= ds_string) > -------------------------------------------------------------------------= ---------- > > Key: SOLR-13863 > URL: https://issues.apache.org/jira/browse/SOLR-13863 > Project: Solr > Issue Type: New Feature > Security Level: Public(Default Security Level. Issues are Public)=20 > Components: query parsers, search, SearchComponents - other > Reporter: Vincenzo D'Amore > Priority: Major > Labels: pull-request-available > Time Spent: 1h > Remaining Estimate: 0h > > payload query function supports string encoded payloads (delimited_payloa= ds_string) > have the per-store pricing problem but payload function handles only num= bers. > Stores can also be in different countries, for example would be useful ha= ving with the price also the currency and other attributes related to the s= tore. > We could have a new function query named *spayload* that helps to read an= d sort payload field *delimited_payloads_string*. > Example document: > { > {{=C2=A0 "id":"my sample doc",}} > {{=C2=A0 "currencyPayload":[}} > {{=C2=A0 =C2=A0 "store1|EUR",}} > {{=C2=A0 =C2=A0 "store1|USD",}} > {{=C2=A0 =C2=A0 "store3|GBP"}} > {{=C2=A0 ]}} > } > Querying Solr with > {{fl=3Dspayload(currencyPayload,store3)}} > would generate a response like the following: > { > {{=C2=A0 "response": {}} > {{=C2=A0 =C2=A0 =C2=A0 "docs":[}}{ > {{=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"id":"my sample doc",=C2=A0}} > {{=C2=A0 =C2=A0 =C2=A0 =C2=A0 =C2=A0"spayload(currencyPayload,store3)":"= GBP"}} > {{=C2=A0 =C2=A0 =C2=A0 }]}} > =C2=A0 =C2=A0 } > {{}}} > And executing `spayload(payloadCurrency,store2)` returns `EUR`, and so on= . > You can use `spayload` even as sorting function. > {{sort=3Dspayload(payloadField,value) asc}} > =C2=A0 -- This message was sent by Atlassian Jira (v8.3.4#803005) --------------------------------------------------------------------- To unsubscribe, e-mail: issues-unsubscribe@lucene.apache.org For additional commands, e-mail: issues-help@lucene.apache.org