Hi All I am getting Error in Solr Error loading class 'Solr.TrieField'
I have added following in Types of schema file <fieldType name="tint" class="solr.TrieField" omitNorms="true" /> And in custom fields of schema have added <field name="bitrate" type="tint" indexed="true" stored="true" /> I am using solr version 1.3 cant I handle filter(my example bitrate) with sint Thanks Prakash Ahmet wrote...... > Yep content is string, and bitrate is int. bitrate should be trie based tint, not int, for range queries work correctly. > I am digging more now Can we combine both the scenarios. > > q=rock&fq={!field f=content}mp3 > q=rock&fq:bitrate:[* TO 128] > > Say if I want only mp3 from 0 to 128 You can append filter queries (fq) as many as you want. &q=rock&fq={!field f=content}mp3&fq=bitrate:[* TO 128] -----Original Message----- From: Doddamani, Prakash [mailto:prakash.doddam...@corp.aol.com] Sent: Tuesday, May 18, 2010 9:06 PM To: solr-user@lucene.apache.org Subject: RE: how to achieve filters Hey q=rock&fq:bitrate:[* TO 128] bitrate is int This also return docs with more then 128 bitrate, Is there something I am doing wrong Regards prakash -----Original Message----- From: Doddamani, Prakash [mailto:prakash.doddam...@corp.aol.com] Sent: Tuesday, May 18, 2010 8:44 PM To: solr-user@lucene.apache.org Subject: RE: how to achieve filters Thanks much Ahmet, Yep content is string, and bitrate is int. I am digging more now Can we combine both the scenarios. q=rock&fq={!field f=content}mp3 q=rock&fq:bitrate:[* TO 128] Say if I want only mp3 from 0 to 128 Regards Prakash -----Original Message----- From: Ahmet Arslan [mailto:iori...@yahoo.com] Sent: Tuesday, May 18, 2010 8:24 PM To: solr-user@lucene.apache.org Subject: Re: how to achieve filters > I am using "dismax" query to fetch docs from solr where I have set > some boost to the each fields, > > > > If I search for query "Rock" I get following docs with some boost > value which I have specified, > > > > <doc> > <float name="score">19.494072</float> > <int name="bitrate">120</int> > <str name="content">mp3</str> > <str name="genre">Rock</str> > <str name="id">1</str> > <str name="name">st name 1</str> > </doc> > <doc> > <float name="score">19.494052</float> > <int name="bitrate">248</int> > <str name="content">aac+</str> > <str name="genre">Rock</str> > <str name="id">2</str> > <str name="name">st name 2</str> > </doc> > <doc> > <float name="score">19.494042</float> > <int name="bitrate">127</int> > <str name="content">aac+</str> > <str name="genre">Rock</str> > <str name="id">3</str> > <str name="name">st name 3</str> > </doc> > <doc> > <float name="score">19.494032</float> > <int name="bitrate">256</int> > <str name="content">mp3</str> > <str name="genre">Rock</str> > <str name="id">4</str> > <str name="name">st name 5</str> > </doc> > > > I am looking for something below What is the best way to achieve them > ? With filter queries. fq= > 1. Query=rock where content= mp3 where it should return only first and > last docs where content=mp3 Assuming that content is string typed. q=rock&fq={!field f=content}mp3 > 2. Query=rock where bitrate<128 where it should return only first and > third docs where bitrate<128 &q=rock&fq:bitrate:[* TO 128] for this bitrate field must be tint type.