Re: Unit of dimension for solr field

2013-11-12 Thread Erick Erickson
Yep, doing this outside Solr at ingestion should be a simpler model if you already have an external ingestion method. Otherwise a custom update processor would be reasonably easy. Best, Erick On Tue, Nov 12, 2013 at 8:04 AM, eakarsu wrote: > Erick, > > I haven't written any SOLR plugin before

Re: Unit of dimension for solr field

2013-11-12 Thread eakarsu
Erick, I haven't written any SOLR plugin before so it takes time to understand concepts. This is more simpler to implement and I think this way does not need to write any plugin SOLR, isn't it? Outside process analyses values with dimensions and prepare 2 fields as you described Erol Akarsu -

Re: Unit of dimension for solr field

2013-11-11 Thread Erick Erickson
You seem to be consistently missing the problem that your queries will not work as expected. How would you do a range query without writing a some kind of custom code that looked at the payloads to determine the normalized units? The simplest way to do this is probably have your ingestion side nor

Re: Unit of dimension for solr field

2013-11-11 Thread eakarsu
Can DelimitedPayloadTokenFilterFactory be used to store unit dimension information? This factory class can store extra information for field. -- View this message in context: http://lucene.472066.n3.nabble.com/Unit-of-dimension-for-solr-field-tp4100209p4100345.html Sent from the Solr - User mai

Re: Unit of dimension for solr field

2013-11-11 Thread eakarsu
Ryan and Upayavira, Do we have an example skeleton to do this for schema.xml and solrconfig.xml? Example java class that would help to build UnitResolvingFilterFactory class? Thanks Erol Akarsu -- View this message in context: http://lucene.472066.n3.nabble.com/Unit-of-dimension-for-solr-fie

Re: Unit of dimension for solr field

2013-11-11 Thread Jack Krupansky
easier to master. -- Jack Krupansky -Original Message- From: Ryan Cutter Sent: Monday, November 11, 2013 10:18 AM To: solr-user@lucene.apache.org Subject: Re: Unit of dimension for solr field I think Upayavira's suggestion of writing a filter factory fits what you're

Re: Unit of dimension for solr field

2013-11-11 Thread Ryan Cutter
I think Upayavira's suggestion of writing a filter factory fits what you're asking for. However, the other end of cleverness is to simple use solr.TrieIntField and store everything in MB. So for 1TB you'd write 51200. A range query for 256MB to 1GB would be field:[256 TO 1024]. Conversion from

Re: Unit of dimension for solr field

2013-11-11 Thread eakarsu
Thanks Upayavira It seems it needs too much work. I will have several more fields that will have unit values. Do we have more quicker way of implementing it? We have Currency filed coming as default with SOLR. Can we use it? Creating conversion rate table for each field? What I am expecting from

Re: Unit of dimension for solr field

2013-11-10 Thread Upayavira
It really depends upon how clever you want to be. If I were to do it, I would push two versions into Solr, one with MB or GB in, for display, and another, resolved to a number, for faceting and querying. I.e do the work outside Solr. If you did want to be clever, you could use a KeywordTokenizer