lucene-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Vincenzo D'Amore (Jira)" <j...@apache.org>
Subject [jira] [Commented] (SOLR-13863) payload query function support for string encoded payloads (delimited_payloads_string)
Date Tue, 03 Dec 2019 13:50:01 GMT

    [ https://issues.apache.org/jira/browse/SOLR-13863?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=16986917#comment-16986917
] 

Vincenzo D'Amore commented on SOLR-13863:
-----------------------------------------

The number of stores is higher than 10k, to very much more, to start is around 15k and growing.
But I think the point is not only about the number of stores, I did the example of the stores
to explain the use case.
Consider that there are products with more string attributes that can vary, for example because
they are related to the country or the store. 
So you can have more prices for a product but not having strings you can't store the currency,
the country, where is stored, the position in shelf, and all those can be easily strings.
The current payload query function actually only handles float and integers. 

> payload query function support for string encoded payloads (delimited_payloads_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) 
>          Components: query parsers, search, SearchComponents - other
>            Reporter: Vincenzo D'Amore
>            Priority: Major
>              Labels: pull-request-available
>          Time Spent: 2h
>  Remaining Estimate: 0h
>
> I have the per-store pricing problem but payload function handles only numbers.
> Stores can also be in different countries, for example would be useful having with the
price also the currency and other attributes related to the store.
> We could have add support for string encoded payloads fixing function query named *payload*.
> Example document:
> {
>  {{  "id":"my sample doc",}}
>  {{  "currencyPayload":[}}
>  {{    "store1|EUR",}}
>  {{    "store1|USD",}}
>  {{    "store3|GBP"}}
>  {{  ]}}
>  }
> Querying Solr with
> {{fl=payload(currencyPayload,store3)}}
> would generate a response like the following:
> {
>  {{  "response": {}}
>  {{      "docs":[}}{
>  {{         "id":"my sample doc", }}
>  {{         "payload(currencyPayload,store3)":"GBP"}}
>  {{      }]}}
>     }
>  {{}}}
> And executing `payload(payloadCurrency,store2)` returns `EUR`, and so on.
> You can use `payload` even as sorting function.
> {{sort=payload(payloadField,value) asc}}
>  



--
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


Mime
View raw message