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 Chris Finch <ch...@tangentlabs.co.uk> on 2010/06/21 12:14:44 UTC

Solr relational date & cost data

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

I want to be able to store property information in Solr, including
descriptions, tags, keywords etc. This is really easy to do.

But also I need to be able to store a range of dates that the property
is available along with costings. Currently we're using MySQL for this
storing a row for every possible date e.g. 21-Jun-2010 and a cost for
that date.

I was wondering if there would be a simple way of recreating this in
Solr, storing all property info + dates + costs and be able to reference
them, or would I need to store all property info + single date + cost
for that date?

Storing individual dates would mean we have over 4,000,000 records which
I think we could handle, but I wondered if someone might have a better
idea about it.

Thanks in advance and apologies for my noobiness.
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkwfO5AACgkQLOut9Un89NluvACghnJo9uS8IctC2kOHTpDHvDOa
B28AoI9qfjos9XAginTscSfNkxTxW5E9
=RQkc
-----END PGP SIGNATURE-----


Re: Solr relational date & cost data

Posted by Chris Finch <ch...@tangentlabs.co.uk>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Need to search, facet and filter, sadly.

Right now I am working on just storing the date ranges and min/max
prices as you suggested, seemed like the best solution so far.

Thanks for confirming the idea for me though.

On 21/06/10 12:33, Peter Karich wrote:
> Do you need to search (or facetting, filtering) through the dates or costs?
> Maybe you can store only the max and min price and the
> available-date-range in solr?
> And then get detailed information from an additional database-query?
> 
> Peter.
> 
>> I want to be able to store property information in Solr, including
>> descriptions, tags, keywords etc. This is really easy to do.
>>
>> But also I need to be able to store a range of dates that the property
>> is available along with costings. Currently we're using MySQL for this
>> storing a row for every possible date e.g. 21-Jun-2010 and a cost for
>> that date.
>>
>> I was wondering if there would be a simple way of recreating this in
>> Solr, storing all property info + dates + costs and be able to reference
>> them, or would I need to store all property info + single date + cost
>> for that date?
>>
>> Storing individual dates would mean we have over 4,000,000 records which
>> I think we could handle, but I wondered if someone might have a better
>> idea about it.
>>
>> Thanks in advance and apologies for my noobiness.
> 
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkwfTpYACgkQLOut9Un89NmtRACffuUammOg4k22yG9J+4984MiC
uOMAoKme9SY8EnbrrVjGIKuksUotvv3+
=oCk4
-----END PGP SIGNATURE-----


Re: Solr relational date & cost data

Posted by Chris Finch <ch...@tangentlabs.co.uk>.
-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Yep, houses are just basic commodities in this case.

I decided to go for a single entry in the index per date of each
property because it makes faceting and querying so much easier and means
I can also use facet.limit=-1 for distinct properties.

My question now I guess is is it possible to return a specific field
when using a facet.date query?

For example I have:

facet.date=Date&facet.date.start=2010-03-01T00:00:00Z&facet.date.end=2010-03-11T00:00:00Z&facet.date.gap=%2B1DAY&

But I would like to receive a list of with PropertyId for every property
available, rather than the date and the count of properties that fall
within the range.

On 21/06/10 13:51, Dennis Gearon wrote:
> Interesting, pre calculated, different prices on different days of the week? So houses are like groceries, huh? :-)
> Dennis Gearon
> 
> Signature Warning
> ----------------
> EARTH has a Right To Life,
>   otherwise we all die.
> 
> Read 'Hot, Flat, and Crowded'
> Laugh at http://www.yert.com/film.php
> 
> 
> --- On Mon, 6/21/10, Peter Karich <pe...@yahoo.de> wrote:
> 
>> From: Peter Karich <pe...@yahoo.de>
>> Subject: Re: Solr relational date & cost data
>> To: solr-user@lucene.apache.org
>> Date: Monday, June 21, 2010, 4:33 AM
>> Do you need to search (or facetting,
>> filtering) through the dates or costs?
>> Maybe you can store only the max and min price and the
>> available-date-range in solr?
>> And then get detailed information from an additional
>> database-query?
>>
>> Peter.
>>
>>> I want to be able to store property information in
>> Solr, including
>>> descriptions, tags, keywords etc. This is really easy
>> to do.
>>>
>>> But also I need to be able to store a range of dates
>> that the property
>>> is available along with costings. Currently we're
>> using MySQL for this
>>> storing a row for every possible date e.g. 21-Jun-2010
>> and a cost for
>>> that date.
>>>
>>> I was wondering if there would be a simple way of
>> recreating this in
>>> Solr, storing all property info + dates + costs and be
>> able to reference
>>> them, or would I need to store all property info +
>> single date + cost
>>> for that date?
>>>
>>> Storing individual dates would mean we have over
>> 4,000,000 records which
>>> I think we could handle, but I wondered if someone
>> might have a better
>>> idea about it.
>>>
>>> Thanks in advance and apologies for my noobiness.
>>
>>
-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.9 (GNU/Linux)

iEYEARECAAYFAkwfbE0ACgkQLOut9Un89Nl4CACePDMQMjSkIBXEFvENKR6C2YMV
1McAnjZHgG918FFuf85k/95TrNP0eXA7
=glsh
-----END PGP SIGNATURE-----


Re: Solr relational date & cost data

Posted by Dennis Gearon <ge...@sbcglobal.net>.
Interesting, pre calculated, different prices on different days of the week? So houses are like groceries, huh? :-)
Dennis Gearon

Signature Warning
----------------
EARTH has a Right To Life,
  otherwise we all die.

Read 'Hot, Flat, and Crowded'
Laugh at http://www.yert.com/film.php


--- On Mon, 6/21/10, Peter Karich <pe...@yahoo.de> wrote:

> From: Peter Karich <pe...@yahoo.de>
> Subject: Re: Solr relational date & cost data
> To: solr-user@lucene.apache.org
> Date: Monday, June 21, 2010, 4:33 AM
> Do you need to search (or facetting,
> filtering) through the dates or costs?
> Maybe you can store only the max and min price and the
> available-date-range in solr?
> And then get detailed information from an additional
> database-query?
> 
> Peter.
> 
> > I want to be able to store property information in
> Solr, including
> > descriptions, tags, keywords etc. This is really easy
> to do.
> >
> > But also I need to be able to store a range of dates
> that the property
> > is available along with costings. Currently we're
> using MySQL for this
> > storing a row for every possible date e.g. 21-Jun-2010
> and a cost for
> > that date.
> >
> > I was wondering if there would be a simple way of
> recreating this in
> > Solr, storing all property info + dates + costs and be
> able to reference
> > them, or would I need to store all property info +
> single date + cost
> > for that date?
> >
> > Storing individual dates would mean we have over
> 4,000,000 records which
> > I think we could handle, but I wondered if someone
> might have a better
> > idea about it.
> >
> > Thanks in advance and apologies for my noobiness.
> 
> 

Re: Solr relational date & cost data

Posted by Peter Karich <pe...@yahoo.de>.
Do you need to search (or facetting, filtering) through the dates or costs?
Maybe you can store only the max and min price and the
available-date-range in solr?
And then get detailed information from an additional database-query?

Peter.

> I want to be able to store property information in Solr, including
> descriptions, tags, keywords etc. This is really easy to do.
>
> But also I need to be able to store a range of dates that the property
> is available along with costings. Currently we're using MySQL for this
> storing a row for every possible date e.g. 21-Jun-2010 and a cost for
> that date.
>
> I was wondering if there would be a simple way of recreating this in
> Solr, storing all property info + dates + costs and be able to reference
> them, or would I need to store all property info + single date + cost
> for that date?
>
> Storing individual dates would mean we have over 4,000,000 records which
> I think we could handle, but I wondered if someone might have a better
> idea about it.
>
> Thanks in advance and apologies for my noobiness.