Re: Bitmap field in solr

2012-08-24 Thread Erick Erickson
There are a couple of open JIRAs, but native bitwise support isn't in
the code yet. See
SOLR-1913 and SOLR-1918

Best
Erick

On Thu, Aug 23, 2012 at 4:31 PM, Andy Lester a...@petdance.com wrote:

 On Aug 23, 2012, at 2:54 PM, Rohit Harchandani wrote:

 Hi all,
 Is there any way to have a bitmap field in Solr??
 I have a use case where I need to search specific attributes of a document.
 Rather than having an is_A, is_B, is_C (all related to each other)etc...how
 would i store all this data in a single field and still be able to query
 it?? Can it be done in any way apart from storing them as strings in a text
 field?


 You can have a field that is multiValued.  It still needs a base type, like 
 string or int.  For instance, in my book database, I have a field called 
 classifications and it is multivalued.

 field name=classifications  type=string 
 multiValued=true /

 A classification of 1 means spiralbound, and 2 means large print and 3 
 means multilingual and so on.  So if my user wants to search for a 
 multilingual book, I search for classifications:3.  If you want spiralbound 
 large print, you'd search for classifications:1 classifications:2.

 xoa

 --
 Andy Lester = a...@petdance.com = www.petdance.com = AIM:petdance



Re: Bitmap field in solr

2012-08-23 Thread Andy Lester

On Aug 23, 2012, at 2:54 PM, Rohit Harchandani wrote:

 Hi all,
 Is there any way to have a bitmap field in Solr??
 I have a use case where I need to search specific attributes of a document.
 Rather than having an is_A, is_B, is_C (all related to each other)etc...how
 would i store all this data in a single field and still be able to query
 it?? Can it be done in any way apart from storing them as strings in a text
 field?


You can have a field that is multiValued.  It still needs a base type, like 
string or int.  For instance, in my book database, I have a field called 
classifications and it is multivalued.  

field name=classifications  type=string multiValued=true 
/

A classification of 1 means spiralbound, and 2 means large print and 3 
means multilingual and so on.  So if my user wants to search for a 
multilingual book, I search for classifications:3.  If you want spiralbound 
large print, you'd search for classifications:1 classifications:2.

xoa

--
Andy Lester = a...@petdance.com = www.petdance.com = AIM:petdance