You are viewing a plain text version of this content. The canonical link for it is here.
Posted to solr-user@lucene.apache.org by Denis Kuzmenok <fo...@ukr.net> on 2011/06/02 17:18:25 UTC
Need Schema help
Hi)
What i need:
Index prices to products, each product has multiple prices, to each
region, country, and price itself.
I tried to do with field type "long" multiple:true, and form
value as "country code + region code + price" (1004000349601, for
example), but it has strange behaviour.. price:[* TO 1004000349600] do
include 1004000349601.. I am doing something wrong?
Possible data:
Country: 1-9
Region: 0-99
Price: 1-9999999
Re: Need Schema help
Posted by Erick Erickson <er...@gmail.com>.
This range behavior doesn't make sense. Are you completely sure
you're not dropping a digit out someplace?
Best
Erick
2011/6/2 Denis Kuzmenok <fo...@ukr.net>:
> Hi)
>
> What i need:
> Index prices to products, each product has multiple prices, to each
> region, country, and price itself.
> I tried to do with field type "long" multiple:true, and form
> value as "country code + region code + price" (1004000349601, for
> example), but it has strange behaviour.. price:[* TO 1004000349600] do
> include 1004000349601.. I am doing something wrong?
>
> Possible data:
> Country: 1-9
> Region: 0-99
> Price: 1-9999999
>
>
Re: Need Schema help
Posted by Denis Kuzmenok <fo...@ukr.net>.
Thursday, June 2, 2011, 6:29:23 PM, you wrote:
Wow. This sounds nice. Will try this way. Thanks!
> Denis,
> would dynamic fields help:
> field defined as *_price in schema
> at index time you index fields named like:
> [1-9]_[0-99]_price
> at query time you search the price field for a given country region
> 1_10_price:[10 TO 100]
> This may work for some use-cases i guess
> lee
Re: Need Schema help
Posted by lee carroll <le...@googlemail.com>.
Denis,
would dynamic fields help:
field defined as *_price in schema
at index time you index fields named like:
[1-9]_[0-99]_price
at query time you search the price field for a given country region
1_10_price:[10 TO 100]
This may work for some use-cases i guess
lee
2011/6/2 Denis Kuzmenok <fo...@ukr.net>:
> Hi)
>
> What i need:
> Index prices to products, each product has multiple prices, to each
> region, country, and price itself.
> I tried to do with field type "long" multiple:true, and form
> value as "country code + region code + price" (1004000349601, for
> example), but it has strange behaviour.. price:[* TO 1004000349600] do
> include 1004000349601.. I am doing something wrong?
>
> Possible data:
> Country: 1-9
> Region: 0-99
> Price: 1-9999999
>
>