Hi, Teryl,

The call to ibis::tablex::addColumn should have four arguments, 
something like

table->addColumn("attr", ibis::TEXT, "some description of the column", 
"keywords");

Since both the 3rd and the 4th arguments have default values, and the 
fourth one is the index specification, in order to specify an index 
specification, you have to provide all four arguments.

Of course, it is also possible that you have called 
ibis::tablex::addColumn correctly, but the indexing building procedure 
had failed to build the index for some reason.  (In this case, it will 
overwrite the indexing option to index=noindex to prevent future 
attempts to build an index;-)  If you suspect this might be the case, 
please set ibis::gVerbose to something ridiculously large, say 8, and 
capture the log messages from FastBit.  I will be happy to take a look 
at the error messages to see if I can tell what is causing the error.

Thanks.

John


On 7/29/11 8:47 AM, Teryl Taylor wrote:
> Hi John,
>
> Thanks for your response.   Is there a way to force these indices to
> be created for the string column programmatically?   When I add my
> string column to the table I have tried doing the following:
>
> table->addColumn("attr", ibis::TEXT, "index=keywords"); <----------
> I've also tried just the word "keywords" here.
>
> But every time the partition generates indices, the partition file
> always gives me:
>
> Begin Column
> name = "attr"
> description = attr
> data_type = "TEXT"
> index=noindex
> End Column
>
> I would like to generate the index at the time I generate all the
> others programmatically.
>
> Thanks,
>
> Teryl
>
> On Thu, Jul 28, 2011 at 9:08 PM, K. John Wu <[email protected]
> <mailto:[email protected]>> wrote:
>
>     Hi, Teryl,
>
>     FastBit supports strings in two different ways, as categorical
>     values (keys) or text.  For categorical values, the string in each
>     row is treated as an atomic value.  FastBit will build a
>     dictionary for the values and build an index.  Let's say the
>     column name is 'mykey', in the data directory, you should see,
>     four files named as follows
>
>     mykey, mykey.sp, mykey.dic, mykey.idx.
>
>     They are the original string values (in raw binary with nil
>     terminators), the starting positions of the strings, the
>     dictionary, and the index.
>
>     For text values, by default, no index is built.  The only index
>     that is supported is a keyword index.  In this case, the text in
>     each row is broken into words and the index records the
>     appearances of each word (also called keyword) in any row.  To
>     tell FastBit to build a keyword index, modify the indexing
>     specification of the specific column in the metadata file
>     -part.txt to say something like
>
>     index=keywords
>
>     in the context of a column, the specification of the column in a
>     -part.txt file might look like the following
>
>     Begin Column
>     name = mytext
>     description = a free-form text describing the column content
>     type = TEXT
>     index = keywords
>     End Column
>
>
>     Please feel free to let us know if you have more questions.
>
>     John
>
>
>
>
>
>     On 7/28/11 12:14 PM, Teryl Taylor wrote:
>
>         Hi John,
>
>         I've created a column in my database that is a column of strings -
>         high cardinality (500,000 to 1,000,000).   I call buildIndexes
>         on the
>         partition, and it seems to build indices for all columns
>         except for
>         the string column.  Are string indices not supported?  Or do I
>         have to
>         do something special to get them to generate?
>
>
>         Best Regards,
>
>         Teryl
>
>
>
>         _________________________________________________
>
>         FastBit-users mailing list
>         [email protected] <mailto:[email protected]>
>         https://hpcrdm.lbl.gov/cgi-__bin/mailman/listinfo/fastbit-__users
>         <https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users>
>
>
_______________________________________________
FastBit-users mailing list
[email protected]
https://hpcrdm.lbl.gov/cgi-bin/mailman/listinfo/fastbit-users

Reply via email to