Hi, Qian,

FastBit distinguishes two types of strings: text and categories.  Text
can be used for things like email messages or web documents, while
categories might be names or colors.  The only index supported on text
is the keyword index.  The query supported on this type of data is of
the form

text_column_name CONTAINS ('keyword1', 'keyword2', ...)

For categories (also known categorical values), each distinct value is
mapped to an integer and the integers are indexed.  The queries
supported on the categories is the basic equality comparisons and
SQL-style regular expression matching.  For example,

cat_column_name = 'red'
cat_column_name IN ('red', 'white', 'blue')
cat_column_name LIKE '%flag'

Hope this helps.

John




On 2/27/14, 6:51 AM, Qian Sun wrote:
> Thanks.
> 
> How is the string indexed in FastBit? Is that similar to other
> double/int types?
> 
> What kind of query supported in FastBit for strings, exact match/contains?
> 
> Regards,
> Qian
> 
> 
> On Thu, Feb 27, 2014 at 9:47 AM, K. John Wu <[email protected]
> <mailto:[email protected]>> wrote:
> 
>     Yes, FastBit can handle strings.  The test case you have is perfectly
>     reasonable for FastBit.  FastBit's indexes on strings and keywords
>     work quite well; but using FastBit to read strings is not particularly
>     efficient.
> 
>     Let me know if you have any specific questions.
> 
>     John
> 
> 
>     On 2/26/14, 7:45 PM, Qian Sun wrote:
>     > Hi John,
>     >
>     > I have question about the string support in FastBit.
>     >
>     > 1. Can FastBit index string values? I think the bitmap index can
>     only
>     > used for numbers such as double, int, short....right?
>     >
>     > 2. Can string value store in a column (no need to be indexed) in the
>     > FastBit and be retrieved by query?
>     > For example:
>     > name age
>     > Lily       20
>     > Sam     30
>     > Tom      27
>     > SELECT name WHERE age<30
>     > Result:  Lily, Tom
>     >
>     > Thanks.
>     >
>     > Regards,
>     > Qian
> 
> 
_______________________________________________
FastBit-users mailing list
[email protected]
https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users

Reply via email to